Created
June 6, 2016 10:56
-
-
Save sigmaris/b0dd2d1015b78c44fe2d1538dc30c924 to your computer and use it in GitHub Desktop.
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/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