Skip to content
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

Doesn't work on Archlinux #8

Open
zgqq opened this issue Feb 5, 2017 · 4 comments
Open

Doesn't work on Archlinux #8

zgqq opened this issue Feb 5, 2017 · 4 comments

Comments

@zgqq
Copy link

zgqq commented Feb 5, 2017

sudo python3 wifi-users.py

Error getting wireless interface.
Traceback (most recent call last):
  File "wifi-users.py", line 151, in <module>
    main(argv)
  File "wifi-users.py", line 51, in main
    wireless = Wireless()
  File "/usr/lib/python3.6/site-packages/wireless/Wireless.py", line 23, in __init__
    self._driver_name = self._detectDriver()
  File "/usr/lib/python3.6/site-packages/wireless/Wireless.py", line 50, in _detectDriver
    compare = self.vercmp(ver, "0.9.9.0")
  File "/usr/lib/python3.6/site-packages/wireless/Wireless.py", line 71, in vercmp
    return cmp(normalize(actual), normalize(test))
NameError: name 'cmp' is not defined
@kylemcdonald
Copy link
Owner

This looks like a bug with https://github.com/joshvillbrandt/wireless/

It might be related to joshvillbrandt/wireless#17

If you get a chance, try reporting the error in that repo and maybe there is a workaround.

I also just pushed changes that add -s / --ssid and -i / --interface flags which should allow you to manually specify these variables, which will work around the bug with that package on archlinux.

@upmauro
Copy link

upmauro commented Feb 6, 2017

As mentioned in the comments, cmp doesn't exist in Python 3. If you really want it, you could define it yourself:

def cmp(a, b):
return (a > b) - (a < b)

..... Or use python 2

@zgqq
Copy link
Author

zgqq commented Feb 6, 2017

@kylemcdonald
sudo python3 wifi-users.py -i wlp3s0 -s 360WiFi-A379AF

Interface: wlp3s0
SSID: 360WiFi-A379AF
Available gateways: wlp3s0
Gateway IP: 192.168.43.1
Error getting gateway MAC address.
1002it [00:15, 65.10it/s]
Total of 0 user(s)

It seems to work,but still receive a error "Error getting gateway MAC address."

@kylemcdonald
Copy link
Owner

"Error getting gateway MAC address." means that netifaces can't grab your gateway for some reason. This isn't a huge deal, because the code should still be able to detect packets that are sent to the router from other devices. But some packets only go to the gateway, and you will miss them. If you can find another way to get your gateway with Python and share it here, I'd like to add it to the script, and it will improve the quality of the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants