Skip to content

Instantly share code, notes, and snippets.

@hackingbutlegal
Created February 25, 2013 03:05
Show Gist options
  • Select an option

  • Save hackingbutlegal/5027184 to your computer and use it in GitHub Desktop.

Select an option

Save hackingbutlegal/5027184 to your computer and use it in GitHub Desktop.
OS X: MAC address spoofing
# macbook with no ethernet port, en0 is usually airport
#
# those with ethernet port will probably use en1 for airport
#
# be sure to note the default address before beginning
# set the mac to something specific
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
sudo ifconfig en1 ether 00:11:22:33:44:55
# or generate random mac
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'
# verify
ifconfig en0 | grep ether
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment