Skip to content

Instantly share code, notes, and snippets.

View danielronnkvist's full-sized avatar

Daniel Rönnkvist danielronnkvist

View GitHub Profile
@danielronnkvist
danielronnkvist / sj.sh
Created June 2, 2017 07:43
SJ Mac changer
#!/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"