Coder Social home page Coder Social logo

Comments (12)

thewood avatar thewood commented on May 13, 2024

are you running the script with admin priv?

from spoofmac.

feross avatar feross commented on May 13, 2024

It appears that that's the issue. Run the script as an admin.

from spoofmac.

RomaEcho avatar RomaEcho commented on May 13, 2024

I definitely launch command prompt with admin priv, dont know what the problem...

from spoofmac.

feross avatar feross commented on May 13, 2024

Okay, re-opening.

from spoofmac.

pteek avatar pteek commented on May 13, 2024

2.0.6 is working on my windows 7 system. Will look into this.

from spoofmac.

Akarius avatar Akarius commented on May 13, 2024

Same error here. spoofMAC 2.1.1 with python 2.7.10 on Win7 as admin.
Traceback (most recent call last):
File "spoof-mac.py", line 4, in
import('pkg_resources').run_script('spoofmac==2.1.1', 'spoof-mac.py')
File "build\bdist.win32\egg\pkg_resources__init__.py", line 745, in run_script
File "build\bdist.win32\egg\pkg_resources__init__.py", line 1677, in run_script
File "C:\Python\Python27\lib\site-packages\spoofmac-2.1.1-py2.7.egg\EGG-INFO\scripts\spoof-mac.py", line 138, in

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
nterfaces

File "build\bdist.win32\egg\spoofmac\interface.py", line 266, in find_interfaces
File "build\bdist.win32\egg\spoofmac\interface.py", line 230, in get_ipconfig_all
UnicodeDecodeError: 'ascii' codec can't decode byte 0x93 in position 46: ordinal not in range(128)

from spoofmac.

Akarius avatar Akarius commented on May 13, 2024

Just checked in code...and I find why.
In the code of interface.py, subprocess.popen is use to get the output of ipconfig /all
My system is in french, there are accented characters in the results and the decode('ascii') fails.

from spoofmac.

feross avatar feross commented on May 13, 2024

@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.

from spoofmac.

Akarius avatar Akarius commented on May 13, 2024

@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.
As this project is about spoofing and not getting your MAC address, a solution would be to use netifaces to get infos about the adapter(s) instead of using subprocess with ipconfig. netifaces does a good job for this but is not included in the standard distribution of python, you have to add it (easy_install and pip can do it easily)

from spoofmac.

feross avatar feross commented on May 13, 2024

@Akarius PR welcome for the doc fix. Also, if you're interested in becoming a maintainer I'll add you.

from spoofmac.

Marshall13 avatar Marshall13 commented on May 13, 2024

image

I have exactly the same problem..Has anyone found a solution?
My system is also French ^^ I do not know if there is a link

from spoofmac.

junglist565 avatar junglist565 commented on May 13, 2024

I solved the problem by changing the charset from "ascii" to "latin1" on Windows 10 (my system is italian :D ).
You also have to change the regex in find_interfaces(self, targets=None) method in your language, by comparing the original English output with yours.

In my case it's something like this:

# search for specific adapter gobble through mac address
details = re.findall("Scheda (.*?):[\\n\\r]+(.*?)\\s*Indirizzo fisico[^\\d]+(\\s\\S+)", output, re.DOTALL)

In any case the script seems to work fine, but in facts it doesn't change the MAC of the specified device (by typing ipconfig /all command nothing has changed).

Anyway it works fine on Linux (I never tried on MacOS), but on Windows has some bugs

from spoofmac.

Related Issues (20)

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.