GithubHelp home page GithubHelp logo

00mjk / mac-spoofer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from angusshire/mac-spoofer

0.0 0.0 0.0 379 KB

:black_joker: Script for spoofing network adapter's MAC address on Windows.

License: GNU General Public License v3.0

Makefile 1.03% C++ 98.97%

mac-spoofer's Introduction

mac-spoofer

mac-spoofer is a script for spoofing a network adapter's MAC address on Windows 7 64-bit.

How it Works

mac-spoofer uses the WMI API and Win32 API to retrieve your network adapter's properties, like its device id and globally unique identifier (GUID). The adapter's MAC address is modified by setting the value NetworkAddress in a key in the registry path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}. The registry key where NetworkAddress is set is found by matching your adapter's GUID to the NetCfgInstanceId value.

Note that the second nibble of the MAC address must be '2', '6', 'A', or 'E'. This is because the second-least significant bit of the most significant byte of the address is 1 if your address is locally administered, or 0 if it is universally administered. Universally administered addresses are assigned by the device's manufacturer, so your universally administered address is your original address. Since we are locally changing the MAC address, the second-least significant bit of the first byte must be 1. The least significant bit of the first byte must also be 0 because your adapter is using unicast transmission (i.e., only one NIC is receiving frames).

With the second-least significant bit of the first byte as 1 and the least significant bit of the first byte as 0, only '2', '6', 'A', or 'E' are possible hex values for the second nibble.

How to Use

By default, mac-spoofer modifies the MAC address of the network adapter that currently has a connection, so make sure you are connected to the internet before it is used. Alternatively, you can specify the name of the adapter you want to change with

mac-spoofer -n <name>

and the executable will set the named adapter to the new MAC address.

The new MAC addresss of the adapter is pseudo-randomly generated, unless specified. You can use the -s option to specify a specific address to set the MAC address too, like

mac-spoofer -s <address>

When using the -s option, only valid MAC addresses are accepted. Valid MAC addressses are 12 character hexadecimal strings where the second nibble is '2', '6', 'A', or 'E'. e.g., this is a valid MAC Address argument AAAAAAAAAAAA.

You can combine both the -n and -s options also:

mac-spoofer -n <name> -s <address>

In addition, you can also reset (disable then enable) a specified network adapter, using -r:

mac-spoofer -r <name>

Platforms

This script supports only Windows 7 64-bit. You can try on other versions of Windows to see if it works. If all else fails, you can change it manually. See this link for how to do so.

If you're on a Mac changing your MAC address can be done with just one line in the terminal:

sudo ifconfig en0 ether $(perl -e 'for ($i=0;$i<5;$i++){@m[$i]=int(rand(256));} printf "02:%X:%X:%X:%X:%X\n",@m;') && sudo ifconfig en0 down && sudo ifconfig en0 up

License

mac-spoof is distributed under the GNU General Public License v3.0 (GPLv3).

mac-spoofer's People

Contributors

4148 avatar angusshire 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.