Closed asmeurer closed 9 years ago
@asmeurer Thanks for the PR!
@TkTech Are you free to take a look?
Thanks for the tool. I made the mistake of not downloading it soon enough at the Dallas airport (which has only 30 min. of free WiFi), but I got it on my other laptop and did this PR on the airplane. :airplane:
Or @otrebor
@TkTech feel free to merge/publish whenever you're happy. I can give you permission to publish to PyPI since I haven't written Python in a while and I don't want to be the gatekeeper on this anymore.
Superceded by #30
@feross can you please merge this pull request. The coding change is relevant, and the latest release of spoof mac fails for me
Traceback (most recent call last):
File "/Users/aaronmeurer/anaconda/bin/spoof-mac.py", line 4, in <module>
__import__('pkg_resources').run_script('SpoofMAC==2.0.0', 'spoof-mac.py')
File "/Users/aaronmeurer/anaconda/lib/python3.4/site-packages/pkg_resources.py", line 505, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Users/aaronmeurer/anaconda/lib/python3.4/site-packages/pkg_resources.py", line 1253, in run_script
exec(script_code, namespace, namespace)
File "/Users/aaronmeurer/anaconda/lib/python3.4/site-packages/SpoofMAC-2.0.0-py3.4.egg/EGG-INFO/scripts/spoof-mac.py", line 136, in <module>
File "/Users/aaronmeurer/anaconda/lib/python3.4/site-packages/SpoofMAC-2.0.0-py3.4.egg/EGG-INFO/scripts/spoof-mac.py", line 82, in main
File "/Users/aaronmeurer/anaconda/lib/python3.4/site-packages/SpoofMAC-2.0.0-py3.4.egg/spoofmac/interface.py", line 444, in find_interface
File "/Users/aaronmeurer/anaconda/lib/python3.4/site-packages/SpoofMAC-2.0.0-py3.4.egg/spoofmac/interface.py", line 343, in find_interface
File "/Users/aaronmeurer/anaconda/lib/python3.4/site-packages/SpoofMAC-2.0.0-py3.4.egg/spoofmac/interface.py", line 313, in find_interfaces
File "/Users/aaronmeurer/anaconda/lib/python3.4/re.py", line 206, in findall
return _compile(pattern, flags).findall(string)
(but it works in this branch)
I contributed the last changes to the master branch.
There is no difference in the current master and your PR except the universal_newlines option and my changes to windows wrapper and admin rights error message. I have not made any change to the MAC wrapper.
Only global change I made was renaming the script to spoof-mac.py because the .py is needed on windows and *nix can be fine with it being there.
Is there any other info about the fail? The trackback only tells so much.
I wonder why is this the only regex expression(line 309, interface.py) to be prefixed by "r"?
Also, I had problems with line endings where the script would just stop at some random point. Except this, I have no clue why your version works and mine doesn't on MAC.
@pteek any reason to not use universal_newlines
and change utf8
to utf-8
?
@feross Looks good in my reading and testing(Linux and Windows).
I have added these changes to my master.
http://pythonhosted.org/setuptools/setuptools.html#automatic-script-creation
This seems to be the ideal solution to the cross platform script installation problem. For now, I have duplicated the spoof-mac script(one without .py).
@asmeurer
This is needed for python3. Your current python3 branch is broken because of this.
Are you currently testing with 2 or 3?
@pteek You're a collaborator, so feel free to send a PR or merge your changes in directly (your call) and let me know when you want me to do a release. :)
Alright, thanks @feross.
On November 27, 2014 7:15:35 PM GMT+05:30, Feross Aboukhadijeh notifications@github.com wrote:
@pteek You're a collaborator, so feel free to send a PR or merge your changes in directly (your call) and let me know when you want me to do a release. :)
Reply to this email directly or view it on GitHub: https://github.com/feross/SpoofMAC/pull/26#issuecomment-64792012
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Fixes #25.
I haven't tested this fully, so you should probably do a full run through to make sure everything works. I mainly ran
2to3
, did a conditional import onwinreg
, and made thesubprocess
functions return strings instead of bytes withuniversal_newlines=True
.