Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Boba Fett

By: a guest on Jun 18th, 2010  |  syntax: Bash  |  size: 1.34 KB  |  views: 364  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/sh
  2. #Macchanger-Script
  3. #Script by CAG (aka BobaFett)
  4. #May 2010 (updated June 2010)
  5.  
  6. #This is a very simple script thats soul purpose is to change the mac address of the specified card (WIFIMAN) to the specified mac address (MACSPOOF).
  7.  
  8. #To run script, paste it into an empty text file and save it as "Macchanger-Script" (or whatever you like), modify the "Customizable Variables" section to meet your needs, make it executable using chmod, or simply right click->properties->permissions->check "is executable", then type ./Macchanger-Script in terminal.
  9.  
  10. ############### Customizable Variables ################
  11. #You must change these to meet your system needs
  12. WIFIMAN="wlan0"                         #Your card interface (i.e. wlan0, eth0, etc)
  13. MACSPOOF="00:11:22:33:44:55"            #Mac that macchanger defaults too. Can be any mac address
  14. ############### Customizable Variables ################
  15.  
  16. ################## Static Variables ###################
  17. #Don't change any of these variables unless you know what you're doing
  18. ROOT_UID=0                              # Only users with $UID 0 have root privileges.
  19. E_NOTROOT=87                            # Non-root exit error.
  20. ################## Static Variables ###################
  21.  
  22. if [ "$UID" -ne "$ROOT_UID" ]
  23. then
  24.   echo "Must be root to run this script."
  25.   exit $E_NOTROOT
  26. fi  
  27.  
  28. ifconfig $WIFIMAN down
  29.  
  30. macchanger $WIFIMAN -m $MACSPOOF
  31.  
  32. ifconfig $WIFIMAN up