Last active
September 28, 2015 19:38
-
-
Save alexmuller/1486669 to your computer and use it in GitHub Desktop.
Change MAC address
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
# Works on a MacBook Pro running OS X 10.6.8 up to 10.8.5 at least | |
# May break other stuff | |
# Take a note of your current MAC address to restore it later | |
ifconfig en1 | grep ether | |
# Disassociate from any connected Wi-Fi networks | |
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -z | |
# Set wireless MAC address to something random | |
# The Python comes from @pearfalse on Twitter | |
sudo ifconfig en1 ether $(python -c 'import random;print":".join(["%02x"%random.randint(0,255)for x in range(6)])') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment