Advertisement
The_GBM

MAC Spoofer

Jun 18th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.08 KB | None | 0 0
  1. #!/bin/bash
  2. clear
  3. RED=$(tput setaf 1 && tput bold)
  4. GREEN=$(tput setaf 2 && tput bold)
  5. STAND=$(tput sgr0)
  6. BLUE=$(tput setaf 6 && tput bold)
  7. echo $RED"##################################################"
  8. echo $RED"##       This script will Help Prep Your        ##"
  9. echo $RED"##    Wireless Card for Penetration Testing     ##"
  10. echo $RED"##     We are going to Spoof your MACs and      ##"
  11. echo $RED"## Optionally Place Your Card into Monitor Mode ##"
  12. echo $RED"##################################################"
  13. echo
  14. echo "Press ENTER to Continue to the MAC Address Spoofing"
  15. echo "Press 'm' to Place Interface into Monitor Mode as Well"
  16. read choice
  17. echo $STAND""
  18. if [[ $choice = "" ]]; then
  19. echo
  20. iwconfig
  21. echo
  22. echo $RED"What is your WLAN device?"
  23. echo $STAND ""
  24. read IFACE
  25. echo $RED"Please Specify the MAC to be Spoofed: xx:xx:xx:xx:xx:xx"
  26. echo $RED"Enter R for random MAC"
  27. echo $STAND ""
  28. read MMAC
  29. if [ ${MMAC,,} = "r" ]; then
  30. ifconfig $IFACE down
  31. macchanger -r $IFACE
  32. ifconfig $IFACE up
  33. else
  34. ifconfig $IFACE down
  35. macchanger -m $MMAC $IFACE
  36. ifconfig $IFACE up
  37. fi
  38. if [ ${MMAC,,} = "r" ]; then
  39. echo $BLUE"-""Your MAC has been set to a Random Value"
  40. else
  41. echo $BLUE"-""Your MAC has been set to $MMAC"
  42. fi
  43. else
  44. if [ ${choice,,} = "m" ]; then
  45. echo
  46. iwconfig
  47. echo
  48. echo $RED"What is your WLAN device?"
  49. echo $STAND ""
  50. read IFACE
  51. echo $RED"Please Specify the MAC to be Spoofed: xx:xx:xx:xx:xx:xx"
  52. echo $RED"Enter R for random MAC"
  53. echo $STAND ""
  54. read MMAC
  55. if [ ${MMAC,,} = "r" ]; then
  56. ifconfig $IFACE down
  57. macchanger -r $IFACE
  58. ifconfig $IFACE up
  59. airmon-ng start $IFACE
  60. echo
  61. sleep 1
  62. ifconfig mon0 down
  63. macchanger -r mon0
  64. ifconfig mon0 up
  65. else
  66. ifconfig $IFACE down
  67. macchanger -m $MMAC $IFACE
  68. ifconfig $IFACE up
  69. airmon-ng start $IFACE
  70. echo
  71. sleep 1
  72. ifconfig mon0 down
  73. macchanger -m $MMAC mon0
  74. ifconfig mon0 up
  75. fi
  76. if [ ${MMAC,,} = "r" ]; then
  77. echo $BLUE"-""Your MAC has been set to a Random Value"
  78. else
  79. echo $BLUE"-""Your MAC has been set to $MMAC"
  80. fi
  81. echo $BLUE"-""$IFACE Has Been Placed Into Monitor Mode"
  82. echo $STAND ""
  83. fi
  84. fi
  85. echo $STAND""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement