Created
September 6, 2015 03:07
-
-
Save ghecho/ff56c49bb69634db47d0 to your computer and use it in GitHub Desktop.
Bash function that remaps the computer's MAC
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
# taken from: http://jezenthomas.com/free-internet-on-trains/ | |
# it goes into the .bashrc | |
function remac { | |
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z | |
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//') | |
sudo networksetup -detectnewhardware | |
echo $(ifconfig en0 | grep ether) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment