feross / SpoofMAC

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

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

Closed yariza closed 11 years ago

yariza commented 11 years ago

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
cjbarker commented 11 years ago

Looks like it's complaining that 'ifconfig' command is not found. You need to run this command as ROOT on your machine; otherwise, I believe on a Mac it looks for it in /sbin/ifconfig (don't own Mac to confirm). Please make sure you run the command as root or sudo user w/ root privileges.

TkTech commented 11 years ago

@yariza Did you ever resolve your issue?

yariza commented 11 years ago

Yes, I did - by reverting my machine to a previous backup. I'm guessing that I did something bad to my filesystem.