feross / SpoofMAC

:briefcase: Change your MAC address for debugging
https://feross.org/spoofmac/
3.02k stars 271 forks source link

Odd response when trying to spoof en0 #60

Closed JakeSobelman closed 8 years ago

JakeSobelman commented 8 years ago

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
feross commented 8 years ago

It looks like you're running an old version (2.0.0). Try installing the latest version of SpoofMAC, which is 2.1.1.

sudo pip install SpoofMAC