rockymeza/wifi

WPA version 1 is recognized as WEP

LiorKirsch opened this issue · 2 comments

I have some networks that are WPA version1
For example:

Cell 01 - Address: 
                    ESSID:
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Frequency:2.457 GHz (Channel 10)
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    Extra:wpa_ie=dd160050f20101000050f20201000050f20201000050f202
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
                    Quality=100/100  Signal level=74/100  

Since this output has Encryption key:on but does not have WPA2 the network is recognized as WEP.

I solved this by adding these lines to scan.py

if 'WPA2' in value:
                    cell.encryption_type = 'wpa2'
elif 'WPA' in value:
                    cell.encryption_type = 'wpa'

In scheme I replaced:

if cell.encryption_type == 'wpa2':
if cell.encryption_type == 'wpa2' or cell.encryption_type == 'wpa' :

The process of connecting to wpa network (the scheme) is the same as connecting to a wpa2 network.

Lior

This is fixed b0538cf

Thanks @LiorKirsch

This is in the 0.3.0 release that I just cut. So are all of the other bugs that you made. Thanks for your help!