2
I was writing a code to try to connect to my wi-fi network using python. I used the following code:
from wi - fi
import Cell, Scheme
try:
cell = Cell.all('wlan0')
except:
print(Exception)
passkey = 'pass'
try:
scheme = Scheme.for_cell('wlan0', 'nome da rede', cell, passkey)
scheme.save()
scheme.activate()
except:
print(Exception)
This code receives an error in the first exception:
[Errno 13] Permission denied: '/sbin/iwlist'
I ran as root and in the first exception was sent another error code:
[Errno 2] No such file or directory: '/sbin/iwlist': '/sbin/iwlist'
Already tried to run your program in Administrator mode ?
– JeanExtreme002
Yes. I typed in the mobile termux the command "sudo python program.py" without the Apas
– skatrouxas s
install the wireless-tools package
– nosklo
How it would help me???
– skatrouxas s
for there to be the
iwlist
this package needs to be installed– nosklo
I just installed using apt-get install iwlist, it was installed but it did not work
– skatrouxas s
sbin, are root files, is the system can only get access if you have permission.. you used the user to run the file and it seems that it did not turn out very well, check if this program is in sbin... ls /sbin | grep parted . and allow the file to run... chmod +x program.py and see the return of it.
– stack.cardoso