New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.5 UnicodeDecodeError #56
Comments
are you running the script with admin priv? |
It appears that that's the issue. Run the script as an admin. |
I definitely launch command prompt with admin priv, dont know what the problem... |
Okay, re-opening. |
2.0.6 is working on my windows 7 system. Will look into this. |
Same error here. spoofMAC 2.1.1 with python 2.7.10 on Win7 as admin. File "C:\Python\Python27\lib\site-packages\spoofmac-2.1.1-py2.7.egg\EGG-INFO\scripts\spoof-mac.py", line 76, in main File "C:\Python\Python27\lib\site-packages\spoofmac-2.1.1-py2.7.egg\EGG-INFO\scripts\spoof-mac.py", line 56, in list_i File "build\bdist.win32\egg\spoofmac\interface.py", line 266, in find_interfaces |
Just checked in code...and I find why. |
@Akarius Thanks for digging into this. I don't write Python very often, so I don't know how to fix this. If you send a PR, I will merge it and release a new version. |
@feross I manage to make "spoof-mac.py list" working by altering the encoding of the output to remove the accented characters. I got no result. The problem is that there are many searches for strings like "Physical Address" and "adapter" in the ipconfig /all output (in interface.py) and these are language-dependants and will only work in english and no other languages. You should add a note about it in the README.md to avoid confusion. |
@Akarius PR welcome for the doc fix. Also, if you're interested in becoming a maintainer I'll add you. |
I solved the problem by changing the charset from "ascii" to "latin1" on Windows 10 (my system is italian :D ). In my case it's something like this:
In any case the script seems to work fine, but in facts it doesn't change the MAC of the specified device (by typing Anyway it works fine on Linux (I never tried on MacOS), but on Windows has some bugs |
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)
The text was updated successfully, but these errors were encountered: