feross / SpoofMAC

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

Added python3 support and fixed Windows compatiblity. #30

Closed pteek closed 9 years ago

pteek commented 10 years ago

I tested this on Windows 7 ultiamte 32bit.

Doesn't work on ubuntu 14. It seems to have something to do with new chages in 14.

pteek commented 10 years ago

The 2to3 conversion breaks linux compatiblity. I will fix that and send another pull request.

asmeurer commented 10 years ago

See https://github.com/feross/SpoofMAC/pull/26

pteek commented 10 years ago

The current version does not work on ubuntu with pyhton 2.7.

The command string passed to subprocess 'ifconfig ...' raises OSError: [Errno 2] No such file or directory

The same error is also raised on the 2to3ed version. It can be fixed by calling subprocess.call() with a list as argument rather than a string.

It seems like a lot is broken and full compatiblity on Debian and Fedora based linux flavors and all the Winodws will require quite some work.

TkTech commented 10 years ago

@pteek You can keep this PR open while you're working on it if you would like feedback on changes.

pteek commented 10 years ago

Alright. But this do note this only works on windows 7.

TkTech commented 10 years ago

Aware, there are other issues as well like all of the line endings in setup.py being converted to MSDOS. These things can be fixed :)

pteek commented 10 years ago

Does https://github.com/pteek/SpoofMAC/commit/f23c5e027b8ed42f9a7d1cdcf7f859e6d0511f0f fix the line edings issue?

The linux file is 908 bytes while windows one is 941 bytes.

asmeurer commented 10 years ago

Note that my branch has only been tested on OS X (and only minimally tested at that). The Windows changes there are just the ones that were suggested by 2to3.

feross commented 10 years ago

Except for my one comment, I think this looks reasonable. @TkTech can you merge this in when you're happy with it?

pteek commented 10 years ago

Fixed all of those. Thanks!

More fixes including legacy winxp support.

feross commented 9 years ago

Merged and published as 2.0.0.

Since no one has stepped up as maintainer, and my python skills are out-of-date (I do node.js now; see spoof for the equivalent npm module), let's live on the wild side. Merged and published with minimal testing.

Please test on all platforms. Send PRs for bugfixes and I'll publish them to PyPI promptly.