Open hersh-nv opened 4 years ago
Facing same issue
The issue seems to be a mixup in the returned values in '_wifiutil_win.py'. The returned 'akm' value is actually the Ciphertype and the 'auth_alg'-value includes the authentification algorithm and the key management. ( see: https://docs.microsoft.com/en-us/windows/win32/nativewifi/dot11-auth-algorithm and https://docs.microsoft.com/en-us/windows/win32/nativewifi/dot11-cipher-algorithm ).
In my case, the returned values are correct (auth-algorithm = 7 => DOT11_AUTH_ALGO_RSNA_PSK and akm = 4 =>DOT11_CIPHER_ALGO_CCMP) but the assignment is wrong.
A quick fix is to just take the akm-value returned from pywifi and use an enum to determine the cipher type.
when using
iface.scan()
to scan for available networks, thecipher
field in the returned network profiles is always 0, corresponding withconst.CIPHER_TYPE_NONE
. this is incorrect, as in my case all available networks actually used cipher type CCMP.this means that when adding a key to a profile prior to connecting to it, i also needed to amend the cipher field. e.g. if i wanted to connect to
profiles[0]
above, i would have to:without setting the cipher type, the profile would not add to the interface. (i believe this may be the cause of issue #45.)
the issue here is that the scan should be able to return the cipher type of each profile; the user shouldn't have to manually determine the cipher type through other means and enter it into the profile. for instance in windows 10, using the
netsh
command to scan for available networks returns the cipher type under the attribute 'Encryption'.issue found in Windows 10 and Linux (Ubuntu 19.10), and occurs regardless of whether interface is connected to an AP or in disconnected status when using
iface.scan()
.