rockymeza/wifi

Error with ifdown while activating the scheme. No such interface as 'wlan1'

Opened this issue · 4 comments

I've this pretty simple configuration. I am trying to connect to my home router. As described in the docs, i am doing exactly the same. This is what i've done:

>>> scheme = Scheme.for_cell('wlan1', 'home', cell[1], '786 5555')
>>> scheme.save()
>>> scheme.activate()

The last line throws back this error:

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/local/lib/python2.7/dist-packages/wifi/scheme.py", line 172, in activate
   subprocess.check_output(['/sbin/ifdown', self.interface], stderr=subprocess.STDOUT)
 File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
   raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/sbin/ifdown', 'wlan1']' returned non-zero exit status 1

When i ran the command ifdown wlan1 in the terminal. I got unknown interface error:

ifdown: unknown interface wlan1

I am running Kali Rolling as my distro and this is the settings from my /etc/network/interfaces/ file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

The below lines were also added when i executed the activate() method:

iface wlan1-home inet dhcp
    wpa-psk eacf5f344981dc7341021b088eb5ecc79fe9cc55ebcff3cc62bd11a81383b56b
    wpa-ssid unknown
    wireless-channel auto

I think it's caused by a missing partial name of interface wlan0, it should be wlan0-home in your example. I have no idea what is the best solution. Because the intuitive way is to modify scheme.py program which is in library.

I've figured out another solution for my project.

Could you share the solution?

I don't think that that solution would be suitable for you. I was building a PMKID cracker and all i wanted was the first EAPOL frame. So, i'd build a new tool from scapy