diff --git a/pywifi/_wifiutil_linux.py b/pywifi/_wifiutil_linux.py index b8b84bc..f8f67a8 100755 --- a/pywifi/_wifiutil_linux.py +++ b/pywifi/_wifiutil_linux.py @@ -194,6 +194,14 @@ def network_profiles(self, obj): continue else: network.ssid = ssid[1:-1] + + disabled = self._send_cmd_to_wpas( + obj['name'], + 'GET_NETWORK {} disabled'.format(network_id), True) + if ssid.upper().startswith('FAIL'): + continue + else: + network.disabled = int(disabled) key_mgmt = self._send_cmd_to_wpas( obj['name'], @@ -235,7 +243,7 @@ def network_profiles(self, obj): else: # Assume the possible ciphers TKIP and CCMP if len(ciphers) == 1: - network.cipher = cipher_str_to_value(ciphers[0].upper()) + network.cipher = cipher_str_to_value[ciphers[0].upper()] elif 'CCMP' in ciphers: network.cipher = CIPHER_TYPE_CCMP diff --git a/pywifi/profile.py b/pywifi/profile.py index 85959e9..69c483b 100755 --- a/pywifi/profile.py +++ b/pywifi/profile.py @@ -17,6 +17,7 @@ def __init__(self): self.ssid = None self.bssid = None self.key = None + self.disabled = 0 def process_akm(self):