Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@matthiassturm
Created December 13, 2018 12:19
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 matthiassturm/eb3889696819e78a6d4097be2d49e567 to your computer and use it in GitHub Desktop.
Save matthiassturm/eb3889696819e78a6d4097be2d49e567 to your computer and use it in GitHub Desktop.
Reassign MAC Dddress (MacOS)
#!/bin/sh
function remac {
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
sudo networksetup -detectnewhardware
echo $(ifconfig en0 | grep ether)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment