Created
June 9, 2014 02:23
-
-
Save AustinW/0ff962f699c293666a75 to your computer and use it in GitHub Desktop.
Change Mac address
This file contains 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
alias generateMac="openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'" | |
alias currentMac="ifconfig en0 | grep ether" #b8:f6:b1:16:4d:bd | |
alias defaultMac="echo b8:f6:b1:16:4d:bd" | |
alias changeMac="sudo airport -z && sudo ifconfig en0 down && sudo ifconfig en0 up && sleep 2 && sudo ifconfig en0 ether $1" | |
alias newMac="sudo airport -z && changeMac $(generateMac) && currentMac" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment