Giter Site home page Giter Site logo

spoofmac's Introduction

SpoofMAC - Spoof your MAC address in Mac OS X

Works on 10.8 (Mountain Lion) and 10.7 (Lion). Probably works on older versions, but not tested.

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.

Installation & Usage

Install by running this in Terminal:

mkdir ~/Scripts
git clone https://github.com/feross/SpoofMAC.git ~/Scripts/SpoofMAC
cd ~/Scripts/SpoofMAC

Change your MAC address like this:

sudo python SpoofMAC.py <interface> <mac_address>

Substitute <interface> with en0 for ethernet or en1 for Wi-Fi. Substitute <mac_address> with the address you want to set.

Example: sudo python SpoofMAC.py en1 12:12:12:12:12:12

Note that sudo is required because this script runs ifconfig which requires admin privledges to change the MAC address.

Also, note that if you're using a Macbook Air or retina Macbook Pro, en0 is Wi-Fi, not en1.

Optional: Run automatically on startup

OS X doesn't let you permanently change your MAC address. Every time you restart your computer, your address gets reset back to whatever it was before. Fortunately, SpoofMAC contains the necessary files for setting this script to run at startup time, so your computer will always have the MAC address you want.

Startup Installation Instructions

If you want to automatically change your MAC address on computer startup, then run the following commands in Terminal:

mkdir ~/Scripts
git clone https://github.com/feross/SpoofMAC.git ~/Scripts/SpoofMAC
cd ~/Scripts/SpoofMAC
sudo mkdir /Library/StartupItems/SpoofMAC
sudo cp SpoofMAC StartupParameters.plist /Library/StartupItems/SpoofMAC
cd /Library/StartupItems/SpoofMAC
sudo chown root:wheel SpoofMAC StartupParameters.plist
sudo chmod 0755 SpoofMAC
sudo chmod 0644 StartupParameters.plist

This last command will open a text editor. You need to update the path to the location of the SpoofMAC.py file. It will be something like /Users/your_username/Scripts/SpoofMAC/SpoofMAC.py

sudo nano SpoofMAC

Lastly, don't forget to set the WIRELESS_INTERFACE and WIRED_INTERFACE variables at the top of the SpoofMac.py file to whatever you want your MAC address to be! You can open the file for editing with open ~/Scripts/SpoofMAC/SpoofMAC.py.

That's it! Improvements welcome!

Handy links for reference

spoofmac's People

Contributors

feross avatar orangewarp avatar zachorr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.