Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Pythonic tool to change the MAC address of an existing interface
Python Shell
tree: b960ffc9a2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
DEBIAN
macfaker
stable_releases
.gitignore
.gitmodules
LICENSE.md
README.md
make_deb_package.sh
setup.py

README.md

macfaker

Pythonic tool to change the MAC address of an existing interface
Version 0.00.11


Author: Timo Furrer tuxtimo@gmail.com
License: GPL (See LICENSE)

What the fuck?

With this python tool you can easily change the MAC address of an interface from your computer.

Require

To get this smart macfaker you must have installed git and python (minimum in version 2.7) on a GNU/Linux (What else?!)

For Debian systems:

# apt-get install git-core python

For Fedora systems:

# yum install git-core python

Get it to your computer

Note: This is to get the whole project (with source etc.). If you just want to install it, go to the section Install from debian package

First you have to clone this repositroy with git:

$ git clone git://github.com/timofurrer/macfaker.git

After you have cloned this you have to update the submodules:

$ git submodule init
$ git submodule update

How to install

You can install it quickly with the integrated setup tool:

# python setup.py install

Note: You must have root privileges to install it

Install from debian package

It is also possible to install macfaker from a stable debian package. You can simply download the latest or another release and install it with dpkg as the following line shows:

# dpkg -i macfaker_latest.deb

How can I make my own debian package?

You can also create your own package with the script make_deb_package.sh There are two ways to execute:

$ ./make_deb_package.sh

This will create a new package with the name macfaker.deb, but if you want to specify another name, start it like this:

$ ./make_deb_package.sh my_macfaker

... And it will create a package with the name my_macfaker.deb

How to use

For help you can type macfaker --help:

usage: macfaker [-h] [-a ADDRESS] [-r] [-f] [-k] [-v VENDOR] [-g] [-V VENDORS]
                [-s] [-S]
                interface

Tool to change the MAC address of an existing interface

positional arguments:
  interface             Specify the interface from which to change the MAC
                        address

optional arguments:
  -h, --help            show this help message and exit
  -a ADDRESS, --address ADDRESS
                        The MAC address to change to
  -r, --random          Change the MAC address to a random address but with a
                        known vendor
  -f, --fully-random    If the argument -r is set, this causes a fully random
                        MAC address
  -k, --keep-vendor     Change the MAC address to a random address but keep
                        the vendor
  -v VENDOR, --vendor VENDOR
                        Change MAC address to a random address of a known
                        vendor
  -g, --vendor-good-luck
                        If the argument -v is set, this causes that a choice
                        is done automatically for more than one result
  -V VENDORS, --vendors VENDORS
                        Get all vendors with the passed keyword
  -s, --show            Shows the current MAC address of the given interface
  -S, --show-with-vendor
                        Shows the current MAC address and the vendors name of
                        the given interface

You must have root privileges to change your MAC address.

Examples

Some examples to change the MAC address of interface eth0:

# macfaker -a 63:F0:50:F6:6B:04 eth0

This will change your MAC address to 63:F0:50:F6:6B:04 on interface eth0

# macfaker -r eth0

This will change your MAC address to a random valid MAC address on interface eth0, but the vendor is from the list. To get a fully random mac address (ignoring the vendor as well) you have to pass also -f as argument:

# macfaker -r -f eth0

# macfaker -k eth0

This will change your MAC address to a random valid MAC address with the current vendor on interface eth0

# macfaker -v Apple eth0

This will give you a choice from all known Apple OUI's. You can easily type in the id from the vendor and then a random mac address with this vendor will be set. If you don't want to make this choice and instead want just a random OUI from Apple you can pass the argument -g as well:

# macfaker -v Apple -g eth0

If you want to pass a vendor with spaces in the name, so but the full name in quotes:

# macfaker -v "Apple, Inc" eth0

Note: After you have changed your MAC address successfully you'll be disconnected from your network a short time. You'll be reconnected soon!

With the following command you can get the OUI of a given vendor:

$ macfaker -V Apple eth0

And with this command you can get your current MAC address:

$ macfaker -s eth0

If you want the vendor name of your current MAC address too, you can pass a capitalized -S, like this:

$ macfaker -S eth0

How can I get my original MAC address back?

You will get your original MAC address back after a reboot! If you want the faked MAC address for ever you have to make a script which starts with your computer and change the MAC address every time!

Todo

-> Reset MAC address to permanent value

If you know something: Create a new issue or fork this repository, make your changes and start a pull request.

Contributing

If you want to contribute my smart macfaker you can fork this project on GitHub and create your own branch. After you have done your awesome changes you can make a pull request and I'll probalby merge your change to my repository.

More projects

You can find more project of me on my GitHub Site - Check out!

Something went wrong with that request. Please try again.