rockymeza/wifi

iwlist need root privilege

Opened this issue · 11 comments

jjehl commented

the call in scan.py line 38 :
subprocess.check_output('/sbin/iwlist', 'wlan0', 'scan'], stderr=subprocess.STDOUT) will not return the total list of wlan unless your are excecuting the script under root account.
With normal user you should use : subprocess.check_output(['sudo','/sbin/iwlist', 'wlan0', 'scan'], stderr=subprocess.STDOUT)

Hi @jjehl,

All of the commands really need administrative access in order to work correctly. I tried to note this in the docs. Maybe it's not obvious enough?

jjehl commented

In my case I really need to not use root acount for security reason. What I did is to use sudo (addind command in visudo) and change the command by :
iwlist_scan = subprocess.check_output(['sudo','/sbin/iwlist', interface, 'scan'],
stderr=subprocess.STDOUT)

Hi,

I've altered quite a bit in upcoming 0.8.0 release.
It could use some testing and I need to tick some boxes to see if things are stable enough for my liking. Most notably, the library had far more testing then the command and I should add some docs about the 2 ways that sudo can be supported without requiring a password.

I'll have 0.8.0rc1 up shortly. If you could give it a test drive that would be most welcome.

Note: This project is unmaintained.

Not anymore. I'm taking over maintenance.

Great! do you have pr merge permission?

rikoz commented

Please someone should start maintaining this, and fix bugs. I am having serious errors
screenshot from 2017-09-17 18-20-38

@rikoz Please report that at pyiw. Thank you.

rikoz commented

ok, will i find you there @melvyn-sopacua

@rikoz report it here: https://github.com/llazzaro/pyiw
I sent you a hang out invite.