Created
April 24, 2013 09:13
-
-
Save ArnisL/5450831 to your computer and use it in GitHub Desktop.
change_mac.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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