I made this because changing your MAC address in Mac OS X is harder than it should be. The biggest annoyance is that the Wi-Fi card (Airport) needs to be manually disassociated from any connected networks in order for the change to be applied correctly. Doing this manually every time is tedious and lame.
Instead of doing that, just run this Python script and change your MAC address in one command.
sudo python SpoofMAC.py <interface> <mac_address>
(For <interface>
, use en0
for wired ethernet and en1
for wireless)
sudo python SpoofMAC.py en1 12:12:12:12:12:12
If you want to automatically change your MAC address on computer startup, then do the following:
- Make a folder called /Library/StartupItems/SpoofMAC
- Add
SpoofMAC
andStartupParameters.plist
to the folder. - chown the files to
root:wheel
. - chmod
SpoofMAC
to0755
andStartupParameters.plist
to 0644. - Update the path in
SpoofMAC
to the location of theSpoofMAC.py
file. (I keep mine in ~/Scripts for easy editing)
Also, don't forget to set the WIRELESS_INTERFACE
and WIRED_INTERFACE
variables at the top of SpoofMac.py
!
That's it! Improvements welcome!