Skip to content

Instantly share code, notes, and snippets.

@benfoxall
Last active August 8, 2022 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benfoxall/a70c7776796dcfdde93f2e78412b8e67 to your computer and use it in GitHub Desktop.
Save benfoxall/a70c7776796dcfdde93f2e78412b8e67 to your computer and use it in GitHub Desktop.
Reset MAC address (for rejoining time-limited wifi)
# turn off wifi
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
# set mac address to random value
NEW_MAC=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
sudo ifconfig en0 lladdr $NEW_MAC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment