Skip to content

Instantly share code, notes, and snippets.

@ArnisL
Created April 24, 2013 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArnisL/5450831 to your computer and use it in GitHub Desktop.
Save ArnisL/5450831 to your computer and use it in GitHub Desktop.
change_mac.sh
#!/bin/sh
clear
sudo service network-manager stop
NEW_MAC=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//; s/..:/00:/';`
sudo ifconfig wlan0 hw ether $NEW_MAC
sudo ifconfig mon0 down
sudo macchanger mon0 --mac=$NEW_MAC
sudo ifconfig mon0 up
sudo service network-manager start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment