Coder Social home page Coder Social logo

spoofmac's Introduction

SpoofMAC - Spoof your MAC address

NOTE: Consider using spoof, a node.js port of this package.

For OS X, Windows, and Linux (most flavors)

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. Now for Windows and Linux, too!

Note for Windows 10: While it may appear that this script does not work anymore, it does. The reason for this is that the change only appears in the Network Adapter properties in the Control Panel. Commands such as getmac or ipconfig will still show the original MAC address even though it has been changed. (Note: this actually appears to depend on the NIC (Network Interface Card). I tested it with my desktop and ipconfig showed the change, however it does not show the change on my laptop)

To see this for yourself, follow the below steps:

  1. Open Control Panel
  2. Click 'Network and Internet'
  3. Click 'Network and Sharing Center'
  4. On the panel to the left, click 'Change adapter settings'
  5. A new window will appear showing all of the network adapters. Right-click the one that is currently active/enabled, and click 'Properties'
  6. Near the top, click the button that says 'Configure'
  7. Another window will open. At the top, click the 'Advanced' tab.
  8. In the list to the left, select either 'Network Address' or 'Locally Administered Address'. This will depend on your system. You should see your MAC address in the text box to the right. This MAC address should change when you run this script on Windows 10. If the text box is empty and 'Not Present' is selected, run the script once to generate a new MAC address and follow the above steps. The 'Value' checkbox should now be selected and there should be a new MAC address in the text box.

Installation

You can install from PyPI using pip or easy_install:

pip install SpoofMAC
easy_install SpoofMAC

or clone/download the repository and install with setup.py. Ex:

git clone git://github.com/feross/SpoofMAC.git
cd SpoofMAC
python setup.py install

If you're not using the system Python (because you use Homebrew, for example), make sure you add '/usr/local/share/python/' (or equivalent) to your path.

Or, consider using spoof, a node.js port of this package.

Usage

SpoofMAC installs a command-line script called spoof-mac.py. You can always see up-to-date usage instructions by typing spoof-mac.py --help.

Examples

Some short usage examples.

List available devices:

spoof-mac.py list
- "Ethernet" on device "en0" with MAC address 70:56:51:BE:B3:00
- "Wi-Fi" on device "en1" with MAC address 70:56:51:BE:B3:01 currently set to 70:56:51:BE:B3:02
- "Bluetooth PAN" on device "en1"

List available devices, but only those on wifi:

spoof-mac.py list --wifi
- "Wi-Fi" on device "en0" with MAC address 70:56:51:BE:B3:6F

Randomize MAC address (requires root)

You can use the hardware port name, such as:

spoof-mac.py randomize wi-fi

or the device name, such as:

spoof-mac.py randomize en0

Set device MAC address to something specific (requires root)

spoof-mac.py set 00:00:00:00:00:00 en0

Reset device to its original MAC address (requires root)

While not always possible (because the original physical MAC isn't available), you can try setting the MAC address of a device back to its burned-in address using reset:

spoof-mac.py reset wi-fi

(older versions of OS X may call it "airport" instead of "wi-fi")

Another option to reset your MAC address is to simply restart your computer. OS X doesn't store changes to your MAC address between restarts. If you want to make change your MAC address and have it persist between restarts, read the next section.

Optional: Run automatically at 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 can easily be set to run at startup time so your computer will always have the MAC address you want.

Startup Installation Instructions

First, make sure SpoofMAC is installed. Then, run the following commands in Terminal:

# Download the startup file for launchd
curl https://raw.githubusercontent.com/feross/SpoofMAC/master/misc/local.macspoof.plist > local.macspoof.plist

# Customize location of `spoof-mac.py` to match your system
cat local.macspoof.plist | sed "s|/usr/local/bin/spoof-mac.py|`which spoof-mac.py`|" | tee local.macspoof.plist

# Copy file to the OS X launchd folder
sudo cp local.macspoof.plist /Library/LaunchDaemons

# Set file permissions
cd /Library/LaunchDaemons
sudo chown root:wheel local.macspoof.plist
sudo chmod 0644 local.macspoof.plist

By default, the above will randomize your MAC address on computer startup. You can change the command that gets run at startup by editing the local.macspoof.plist file.

sudo vim /Library/LaunchDaemons/local.macspoof.plist

Changelog

  • 2.1.1 - Use ip command when available, in more situations
  • 2.1.0 - Use ip command when available; ifconfig is deprecated on Arch Linux
  • 2.0.6 - Increase MAC address randomness
  • 2.0.5 - Allow 2nd character in MAC address to be a letter

  • 2.0.4 - Warn when trying to use a multicast address
  • 2.0.3 - More Python 2.7 compatibility fixes
  • 2.0.2 - Python 2.7 compatibility fixes
  • 2.0.0 - Python 3 support
  • 1.2.2 - Fix for Ubuntu 14.04
  • 1.2.1 - Fix line endings (dos2unix)
  • 1.2.0 - Add Windows and Linux support (thanks CJ!)
  • 1.1.1 - Fix "ValueError: too many values to unpack" error
  • 1.1.0 - Fix regression: List command now shows current MAC address
  • 1.0.0 - Complete rewrite to conform to PEP8 (thanks Tyler!)
  • 0.0.0 - Original version (by Feross)

Contributors

Improvements welcome! (please add yourself to the list)

Ports

MIT License

Copyright (c) 2011-2017

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

spoofmac's People

Contributors

aldur avatar anthonytw avatar ccninja86 avatar cjbarker avatar feross avatar joostrijneveld avatar lublud avatar orangewarp avatar princemaple avatar pteek avatar theeandre avatar thewood avatar tkelman avatar tktech avatar yasoob avatar zachorr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spoofmac's Issues

MAC OS 10.11.1 (15B42)

Hello,

Are there any reports with the WIFI loosing it's ip address. The script Spoofmac worked flawlessly and the connectivity was stable and then I upgraded to MAC OS 10.11.1 since then I lose the connectivity.
I am not entirely sure that the ^problem is stemming from Spoofmac.

And I may need to uninstall the script to further troubleshoot the issue.

uninstall

i did:
git clone git://github.com/feross/SpoofMAC.git
cd SpoofMAC
python setup.py install
now i want to uninstall completely. how?

Rand Readme

Add instructions for randomizing the mac to README.md

sudo python SpoofMAC.py en0
sudo python SpoofMAC.py en1

Mac: Wont Load On Startup

SpoofMAC wont load on startup. I'm running MacOS Sierra and this is in system.log

Aug 11 09:33:01 HQ-CIO-60 com.apple.xpc.launchd[1] (MacSpoof[101]): Service exited with abnormal code: 1
Aug 11 10:53:26 HQ-CIO-60 com.apple.xpc.launchd[1] (MacSpoof[101]): Service exited with abnormal code: 1
Aug 11 10:57:44 HQ-CIO-60 com.apple.xpc.launchd[1] (MacSpoof[101]): Service exited with abnormal code: 1
Aug 11 11:12:01 HQ-CIO-60 com.apple.xpc.launchd[1] (MacSpoof[101]): Service exited with abnormal code: 1
Aug 11 11:32:52 HQ-CIO-60 com.apple.xpc.launchd[1] (MacSpoof[101]): Service exited with abnormal code: 1

Print not change?

Is it possible to just generate a random mac address (to stdout) with this tool without affecting change on any actual network interface?

"Connection Timeout"

Whenever I change the MAC address I am unable to connect to any access point. I get a "Connection Timeout" message.

The changed ethernet address appears in the "ifconfig" output, but not in the output of "networksetup -listallhardwareports".

OSX Lion on a MBP from 2007 using my wi-fi en1 adapter.

Issue when showing all Wi-Fi interface names

The program in the "Show only Wi-Fi interfaces" mode, currently only shows those interfaces that are exactly named "Wi-Fi". But in my PC, I often end up having names like "Wi-Fi 2", "Wi-Fi 3" etc (after changing network configs). I guess we should change line 352 in interface.py something like,

if port.lower() in wireless_port_names:
to
if port.lower().startswith("wi-fi") or (port.lower() == "airport"):

Print warning when not running with `sudo`

This would be much better than throwing an error like:

root required to disassociate
ifconfig: ioctl (SIOCAIFADDR): permission denied
Traceback (most recent call last):
  File "/Users/feross/code/SpoofMAC/bin/spoof-mac", line 5, in <module>
    pkg_resources.run_script('SpoofMAC==1.0.0', 'spoof-mac')
  File "/Users/feross/code/SpoofMAC/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 499, in run_script

Odd response when trying to spoof en0

Getting a strange response whenever I try to spoof en0, it fails on all interfaces. Recently installed python on my machine again, but this was working just a few days ago.

sudo spoof-mac.py set 00:00:00:00:00 en0
Password:
ifconfig: ioctl (SIOCAIFADDR): Invalid argument
Traceback (most recent call last):
  File "/usr/local/bin/spoof-mac.py", line 5, in <module>
    pkg_resources.run_script('SpoofMAC==2.0.0', 'spoof-mac.py')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 492, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1357, in run_script
    exec_(script_code, namespace, namespace)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 47, in exec_
    exec("""exec code in globs, locs""")
  File "<string>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/SpoofMAC-2.0.0-py2.7.egg/EGG-INFO/scripts/spoof-mac.py", line 136, in <module>

  File "/Library/Python/2.7/site-packages/SpoofMAC-2.0.0-py2.7.egg/EGG-INFO/scripts/spoof-mac.py", line 116, in main

  File "build/bdist.macosx-10.9-intel/egg/spoofmac/interface.py", line 456, in set_interface_mac
  File "build/bdist.macosx-10.9-intel/egg/spoofmac/interface.py", line 373, in set_interface_mac
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ifconfig', 'en0', 'ether', '00:00:00:00:00']' returned non-zero exit status 1

I can't get this to work on python 3.4 windows.

I 2to3ed the whole folder because I saw some incompatible functions.
I had to rename the script spoof-mac to spoof-mac.py to get a prompt. This was in C:\python34\Scripts

spoof-mac list gives this:

Traceback (most recent call last):
File "C:\Python34\Scripts\spoof-mac.py", line 5, in
pkg_resources.run_script('SpoofMAC==1.2.1', 'spoof-mac')
File "C:\Python34\lib\site-packages\setuptools-3.3-py3.4.egg\pkg_resources.py"
, line 528, in run_script
self.by_key[dist.key] = dist
File "C:\Python34\lib\site-packages\setuptools-3.3-py3.4.egg\pkg_resources.py"
, line 1401, in run_script
def _has(self, path):
File "C:\Python34\lib\site-packages\spoofmac-1.2.1-py3.4.egg\EGG-INFO\scripts
spoof-mac", line 123, in
AttributeError: 'module' object has no attribute 'geteuid'

This is of course a *nix call.

What now?

en0 and en1 are not always wired and wireless

On my MacBook Air (2012), en0 is Wi-Fi and en1 at the moment is my Bluetooth connection (tethered). Executing networksetup -setairportpower en1 on (line 37 of SpoofMAC.py) returns the error: "en1 is not a Wi-Fi interface."

Error when mac adresse begin with a number and letter (ie 9C:11:22:33:44:55)

This is the error I got :

sudo spoof-mac.py set "9C:11:22:33:44:55" "Wi-Fi"
Traceback (most recent call last):
  File "/usr/local/bin/spoof-mac.py", line 4, in <module>
    __import__('pkg_resources').run_script('SpoofMAC==2.0.4', 'spoof-mac.py')
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 534, in run_script
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 1445, in run_script
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SpoofMAC-2.0.4-py2.7.egg/EGG-INFO/scripts/spoof-mac.py", line 138, in <module>

  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SpoofMAC-2.0.4-py2.7.egg/EGG-INFO/scripts/spoof-mac.py", line 94, in main

ValueError: invalid literal for int() with base 10: 'C'

if i replace 9C by 9D I got the same error, if I replace the 'C' by a number, it works.

Script Run On Startup Question

"By default, the above will randomize your MAC address on computer startup. You can change the command that gets run at startup by editing the local.macspoof.plist file."

Does this mean, the original randomised MAC address will be applied on startup, or that it will randomise it every time the computer turns on?

OUI set to a VMware

The randomization protocol automatically sets the first three hexadecimal values the same every time (00:05:69). This is not particularly random, and tells any device that you are either operating a VMware virtual machine or are using this software to spoof your MAC. I read through the source code and saw that you chose this range because it would have a very low chance of colliding with another device on the network (one in 16.7 million for any other random VMware MAC), however I would recommend throwing in some code to switch between a couple of different possible VM designations:
00:50:56, 00-0C-29 for manually assigned VMware MACs
00:16:3E for Xen VMs
00-03-FF Microsoft Hyper-V, Virtual Server, Virtual PC
00-1C-42 Parallells
00-0F-4B Virtual Iron 4
08-00-27 Sun Virtual Box

Doing this will increase the anonymity without greatly increasing the risk of collision.

Python 3 support

On ubuntu 14.04 e 13.10
sudo spoof-mac randomize wlan0

Traceback (most recent call last):
File "/usr/local/bin/spoof-mac", line 5, in
pkg_resources.run_script('SpoofMAC==1.2.1', 'spoof-mac')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/SpoofMAC-1.2.1-py2.7.egg/EGG-INFO/scripts/spoof-mac", line 123, in
sys.exit(main(arguments, os.geteuid()))
File "/usr/local/lib/python2.7/dist-packages/SpoofMAC-1.2.1-py2.7.egg/EGG-INFO/scripts/spoof-mac", line 108, in main
set_interface_mac(device, target_mac, port)
File "/usr/local/lib/python2.7/dist-packages/SpoofMAC-1.2.1-py2.7.egg/spoofmac/interface.py", line 437, in set_interface_mac
spoofer.set_interface_mac(device, mac, port)
File "/usr/local/lib/python2.7/dist-packages/SpoofMAC-1.2.1-py2.7.egg/spoofmac/interface.py", line 108, in set_interface_mac
subprocess.call(cmd)
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(_popenargs, *_kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

error when second digit is c

Here's the command that caused the error:

08:16:55 (master) ~/PycharmProjects/SpoofMAC$ sudo spoof-mac.py set 5C:96:9d:05:69:a5 en0
Traceback (most recent call last):
  File "/usr/local/bin/spoof-mac.py", line 5, in <module>
    pkg_resources.run_script('SpoofMAC==2.0.4', 'spoof-mac.py')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 492, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1357, in run_script
    exec_(script_code, namespace, namespace)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 47, in exec_
    exec("""exec code in globs, locs""")
  File "<string>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/SpoofMAC-2.0.4-py2.7.egg/EGG-INFO/scripts/spoof-mac.py", line 138, in <module>

  File "/Library/Python/2.7/site-packages/SpoofMAC-2.0.4-py2.7.egg/EGG-INFO/scripts/spoof-mac.py", line 94, in main

ValueError: invalid literal for int() with base 10: 'C'

I fixed the problem by commenting out lines 94 and 95 in spoof-mac.py, but I'm guessing you want a prettier solution.

Not working with OSX Maverick

[502][chimkan: /Users/chimkan]$ sudo spoof-mac randomize Wi-Fi
Password:
Traceback (most recent call last):
File "/usr/local/bin/spoof-mac", line 4, in
import pkg_resources
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: SpoofMAC==1.2.1
[503][chimkan: /Users/chimkan]$

Belkin USB-C LAN does not work

I am using Macbook pro late 2016 with Belkin USB-C LAN adapter.
It doesn't work on mac spoofing.
There are no errors after command issued. The mac address stays the same.

sudo spoof-mac set xx:xx:xx:xx:xx:xx en7
spoof-mac list
...

  • "Belkin USB-C LAN" on device "en7" with MAC address xx:xx:xx:xx:xx:xx
    ...

Thanks.

"Run automatically at startup" problem...

Hi, sorry for silly question but I can't get the script to run on system startup properly (according to steps described in readme file)...

I'm getting an error "$1: unbound variable" if I try to run the script manually.

Any ideas how to fix it?

Best regards,
Dmitry.

UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 20: ordinal not in range(128)

Hi!
I usually use osX and Linux - but I have a small project and a group of ppl that need to spoof there MAC-adres and keep getting a UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 20: ordinal not in range(128) error. Tried to use UTF-8 but keep getting the same error.

Any tips?

PS C:\program files (x86)\Python35-32\Scripts> python spoof-mac.py list
Traceback (most recent call last):
File "spoof-mac.py", line 138, in
sys.exit(main(arguments, root_or_admin))
File "spoof-mac.py", line 76, in main
list_interfaces(args, spoofer)
File "spoof-mac.py", line 56, in list_interfaces
for port, device, address, current_address in spoofer.find_interfaces(targets=targets):
File "C:\Program Files (x86)\Python35-32\lib\site-packages\spoofmac\interface.py", line 266, in find_interfaces
output = self.get_ipconfig_all()
File "C:\Program Files (x86)\Python35-32\lib\site-packages\spoofmac\interface.py", line 230, in get_ipconfig_all
return result.decode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 in position 20: ordinal not in range(128)

Administrative Privileges Error

Started with the run command: cmd /user:admin

C:\windows\system32>spoof-mac.py randomize Ethernet
Error: Must run this with administrative privileges to set MAC addresses

My user account is the primary administrator account.

Randomizing "Thunderbolt 1" and "Thunderbolt 2" on OSX 10.11

Hi,
when running 'list', it shows me that both Thunderbolt connections run on en1 and en2, respectively. However when I try to randomize en1 and en2 there is no change, or at least 'list' doesn't show any change.

Any idea why that could be happening?

Thank you for this tool. It's awesome.

How to completely remove it

Hi
Just gave it a shot and still I can see this in my terminal.
What is the exact location where changes are made.
How to completely remove it

Not working with windows 10

Tried running your script on a windows 10 machine with an Intel 8260 WiFi module, The mac address did not change ..

Find new maintainers!

SpoofMAC is looking for new maintainers. I haven't written Python in much too long, so I'm not the best maintainer for this package going forward. @TkTech (who did the v1 rewrite and made it PEP8 compliant) is very busy and could use some help.

There are many open issues regarding Python 3 support (#22, #25, #28) so if someone wants to tackle that with a PR, if it looks good, we'll add you as a GitHub collaborator. :)

Thanks in advance to anyone who steps up!

we want you

Cannot Import MD5 Name

On OSX 10.10 DP1, 'Cannot Import MD5 Name'. Potentially a 10.10 issue as Apple has changed quite a lot of the system packages from Mavericks, but opening this issue to check if there's something wrong with SpoofMAC's pip installation. Any ideas?

This is the full Terminal readout:

ERROR:root:code for hash md5 was not found.

Traceback (most recent call last):

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
globals()[__func_name] = __get_hash(__func_name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/
Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
return __get_builtin_constructor(name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
  raise ValueError('unsupported hash type ' + name)
  ValueError: unsupported hash type md5
  ERROR:root:code for hash sha1 was not found.
  Traceback (most recent call last):

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
  globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
  return __get_builtin_constructor(name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
  raise ValueError('unsupported hash type ' + name)
  ValueError: unsupported hash type sha1
  ERROR:root:code for hash sha224 was not found.
  Traceback (most recent call last):

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
  globals()[__func_name] = __get_hash(__func_name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
  return __get_builtin_constructor(name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
  raise ValueError('unsupported hash type ' + name)
  ValueError: unsupported hash type sha224
  ERROR:root:code for hash sha256 was not found.
  Traceback (most recent call last):

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
  globals()[__func_name] = __get_hash(__func_name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
  return __get_builtin_constructor(name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
  raise ValueError('unsupported hash type ' + name)
  ValueError: unsupported hash type sha256
  ERROR:root:code for hash sha384 was not found.
  Traceback (most recent call last):

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
  globals()[__func_name] = __get_hash(__func_name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
  return __get_builtin_constructor(name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
  raise ValueError('unsupported hash type ' + name)
  ValueError: unsupported hash type sha384
  ERROR:root:code for hash sha512 was not found.
  Traceback (most recent call last):

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
  globals()[__func_name] = __get_hash(__func_name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 103, in __get_openssl_constructor
  return __get_builtin_constructor(name)

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
  raise ValueError('unsupported hash type ' + name)
  ValueError: unsupported hash type sha512
  Traceback (most recent call last):

File "/usr/local/bin/pip", line 9, in <module>
  load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()

File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 356, in load_entry_point

File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 2439, in load_entry_point

File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 2155, in load

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 11, in <module>
  from pip.vcs import git, mercurial, subversion, bazaar  # noqa

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/vcs/mercurial.py", line 9, in <module>
  from pip.download import path_to_url

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/download.py", line 22, in <module>
  from pip._vendor import requests, six

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/__init__.py", line 58, in <module>
  from . import utils
  File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/utils.py", line 25, in <module>
  from .compat import parse_http_list as _parse_list_header

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/compat.py", line 7, in <module>
  from .packages import chardet

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/packages/__init__.py", line 3, in <module>
  from . import urllib3

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/__init__.py", line 16, in <module>
  from .connectionpool import (

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 36, in <module>
  from .connection import (

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connection.py", line 43, in <module>
  from .util import (

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/__init__.py", line 10, in <module>
  from .ssl_ import (

File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py", line 2, in <module>
  from hashlib import md5, sha1

ImportError: cannot import name md5

AttributeError on randomize attempt

I'm getting this error when I try to randomize my Wi-fi MAC address:

ya$ sudo spoof-mac randomize Wi-fi
Traceback (most recent call last):
  File "/usr/local/bin/spoof-mac", line 5, in <module>
    pkg_resources.run_script('SpoofMAC==1.2.1', 'spoof-mac')
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 489, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 1214, in run_script
    exec script_code in namespace, namespace
  File "/Library/Python/2.6/site-packages/SpoofMAC-1.2.1-py2.6.egg/EGG-INFO/scripts/spoof-mac", line 123, in <module>

  File "/Library/Python/2.6/site-packages/SpoofMAC-1.2.1-py2.6.egg/EGG-INFO/scripts/spoof-mac", line 78, in main

  File "build/bdist.macosx-10.7-intel/egg/spoofmac/interface.py", line 425, in find_interface
  File "build/bdist.macosx-10.7-intel/egg/spoofmac/interface.py", line 324, in find_interface
  File "build/bdist.macosx-10.7-intel/egg/spoofmac/interface.py", line 291, in find_interfaces
AttributeError: 'module' object has no attribute 'check_output'

Error when using spoof-mac.py

Hello.

I found your script and installed it, but I'm unable to use it, because it gives me some kind of error which I don't understand.
First I downloaded packed version manualy which is in tar.gz and unpacked it.
Installed it using python 2.7.9 with sudo's help (otherwise I'd get access denied) and tried spoof-mac.py --help, but got an error.
I thought I must do something more so I wrote those commands for Startup Installation Instructions, yet this error occurs anyway.
Everytime it's the same error:

89-24-232-109:bin stsiddenus$ spoof-mac.py
Traceback (most recent call last):
File "/usr/local/bin/spoof-mac.py", line 5, in
pkg_resources.run_script('SpoofMAC==2.0.0', 'spoof-mac.py')
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 442, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 1167, in run_script
exec script_code in namespace, namespace
File "/usr/local/bin/spoof-mac.py", line 29, in

File "build/bdist.macosx-10.5-ppc/egg/spoofmac/init.py", line 3, in
File "/Library/Python/2.5/site-packages/SpoofMAC-2.0.0-py2.5.egg/spoofmac/interface.py", line 264
except WindowsError as err:
^
SyntaxError: invalid syntax

I also tried installing it via pip install SpoofMac, but I still get same error.
What did I do wrong?
Specifications:
Python 2.7.9
OSX 10.5.8 PowerPC G4 eMac

Thanks in advance. :)

[Errno 2] No such file or directory - on randomize Wi-fi

I'm running Python 2.7.4, and I get this error when I run spoof-mac randomize Wi-fi:

Traceback (most recent call last):
  File "/usr/local/bin/spoof-mac", line 5, in <module>
    pkg_resources.run_script('SpoofMAC==1.2.1', 'spoof-mac')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 489, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1214, in run_script
    exec script_code in namespace, namespace
  File "/Library/Python/2.7/site-packages/SpoofMAC-1.2.1-py2.7.egg/EGG-INFO/scripts/spoof-mac", line 123, in <module>

  File "/Library/Python/2.7/site-packages/SpoofMAC-1.2.1-py2.7.egg/EGG-INFO/scripts/spoof-mac", line 78, in main

  File "build/bdist.macosx-10.7-intel/egg/spoofmac/interface.py", line 425, in find_interface
  File "build/bdist.macosx-10.7-intel/egg/spoofmac/interface.py", line 324, in find_interface
  File "build/bdist.macosx-10.7-intel/egg/spoofmac/interface.py", line 305, in find_interfaces
  File "build/bdist.macosx-10.7-intel/egg/spoofmac/interface.py", line 374, in get_interface_mac
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 530, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

No results on 3.17.6-1-ARCH Linux

It might be my hardware or system configuration limitation because I have tried multiple methods with no result. However I though I would mention this and see if there is something that could be done to accomplish mac spoofing in my environment.

When I run
$ sudo spoof-mac.py list
It has no output

$ ifconfig
// Other devices removed for brevity
wlp4s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether a0:88:69:0c:87:67 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Issue with Windows MAC address formatting

Correct me if I'm wrong but I read in several articles like this one that in Windows, the following restriction applies:

Some adapters (especially Wi-Fi cards) are unforgiving of MAC addresses changes if the first octet's 2nd half isn't a 2,6,A,E or begins with a zero. This requirement has been observed as far back as Windows XP and is formatted as:

D2XXXXXXXXXX
D6XXXXXXXXXX
DAXXXXXXXXXX
DEXXXXXXXXXX

Now, AFAIK, D stands for 1-9. But all randomly generated MACs in SpoofMAC start with 0.

No script named 'spoof-mac.py'(MacBookPro)

I use tool Homebrew to install both python2.7 and the python3.6 on my MacBookPro.
And the SpoofMAC I install by python3 setup.py install.

I successful finish installs a command-line script called spoof-mac.py, but it couldn't work when I use command "spoof-mac.py --help".

sicmatr1xdeMacBook-Pro:~ sicmatr1x$ spoof-mac.py --help Traceback (most recent call last): File "/usr/local/bin/spoof-mac.py", line 4, in <module> __import__('pkg_resources').run_script('SpoofMAC==2.1.1', 'spoof-mac.py') File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 748, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1509, in run_script raise ResolutionError("No script named %r" % script_name) pkg_resources.ResolutionError: No script named 'spoof-mac.py'

Python 3.5 UnicodeDecodeError

Hi, trying to launch spoofmac on python3.5, windows 8.
command spoof-mac -help works correct,
but spoof-mac list :

C:\Python35\Scripts> spoof-mac list
Traceback (most recent call last):
File "C:\Python35\Scripts\spoof-mac.py", line 138, in
sys.exit(main(arguments, root_or_admin))
File "C:\Python35\Scripts\spoof-mac.py", line 76, in main
list_interfaces(args, spoofer)
File "C:\Python35\Scripts\spoof-mac.py", line 56, in list_interfaces
for port, device, address, current_address in spoofer.find_interfaces(targets=targets):
File "c:\python35\lib\site-packages\spoofmac\interface.py", line 185, in find_interfaces
output = self.get_ipconfig_all()
File "c:\python35\lib\site-packages\spoofmac\interface.py", line 149, in get_ipconfig_all
return result.decode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8d in position 2: ordinal not in range(128)

Sppofmac not automating

Hello,
I installed the following on my mac book running 10.10.4 pip install SpoofMAC and easy_install SpoofMAC and I also wanted to automate this.
if I run sudo spoof-mac.py randomize en1 it does what it does
then I run spoof-mac.py list and shows what it's supposed to.
But I installed the Startup Installation . And restarted my system and there is no changes on the WIFI card and also is the local.macspoof.plist supposed to be empty?

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.