From ee2ead99cc4c60f8f1f5b2b4c2f85ccbf2790b4e Mon Sep 17 00:00:00 2001 From: zblurx Date: Thu, 17 Aug 2023 18:13:51 +0200 Subject: [PATCH] update wireless module --- cme/modules/wireless.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/cme/modules/wireless.py b/cme/modules/wireless.py index 088d00d0..92999478 100644 --- a/cme/modules/wireless.py +++ b/cme/modules/wireless.py @@ -74,7 +74,7 @@ class CMEModule: for wifi_cred in wifi_creds: if wifi_cred.auth.upper() == "OPEN": context.log.highlight("[OPEN] %s" % (wifi_cred.ssid)) - if wifi_cred.auth.upper() in ["WPAPSK", "WPA2PSK"]: + elif wifi_cred.auth.upper() in ["WPAPSK", "WPA2PSK", "WPA3SAE"]: try: context.log.highlight( "[%s] %s - Passphrase: %s" @@ -86,5 +86,29 @@ class CMEModule: ) except: context.log.highlight("[%s] %s - Passphrase: %s" % (wifi_cred.auth.upper(), wifi_cred.ssid, wifi_cred.password)) + elif wifi_cred.auth.upper() in ['WPA', 'WPA2']: + try: + if self.eap_username is not None and self.eap_password is not None: + context.log.highlight( + "[%s] %s - %s - Identifier: %s:%s" + % ( + wifi_cred.auth.upper(), + wifi_cred.ssid, + wifi_cred.eap_type, + wifi_cred.eap_username, + wifi_cred.eap_password, + ) + ) + else: + context.log.highlight( + "[%s] %s - %s " + % ( + wifi_cred.auth.upper(), + wifi_cred.ssid, + wifi_cred.eap_type, + ) + ) + except: + context.log.highlight("[%s] %s - Passphrase: %s" % (wifi_cred.auth.upper(), wifi_cred.ssid, wifi_cred.password)) else: context.log.highlight("[WPA-EAP] %s - %s" % (wifi_cred.ssid, wifi_cred.eap_type))