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/sh | |
# Script for quickly swicthing MAC-adress on SJ trains! | |
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z | |
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//') | |
networksetup -detectnewhardware | |
networksetup -setairportnetwork en0 "SJ" |