-
-
Save sunpig/e660a58932b147283c1148ca44ba581f to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
IF=en0 | |
MAC=`python << EOF | |
import random | |
print ":".join("%02X"%x for x in (random.randint(0, 255) for _ in range(6))) | |
EOF | |
` | |
echo "resetting wifi on $IF, rotating mac $MAC" | |
scselect -n | |
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z | |
ifconfig $IF link $MAC | |
networksetup -setairportnetwork $IF VirginTrainsEC-WiFi | |
echo "= MAC is now: =" | |
ifconfig $IF link |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment