diff --git a/listener.py b/listener.py index 5e1b50c..078f4ad 100755 --- a/listener.py +++ b/listener.py @@ -183,12 +183,16 @@ def print_suspect_aps(): keywords = ("setup", "direct-", "hp", "epson", "canon", "brother", "smart", "wifi-", "printer") for bssid, ssid in ssid_map.items(): - if any(kw in ssid.lower() for kw in keywords) or (bssid in deadpoint_candidates and not ap_clients.get(bssid)): - suspects.append((bssid, ssid)) + is_keyword_match = any(kw in ssid.lower() for kw in keywords) + is_deadpoint = bssid in deadpoint_candidates and not ap_clients.get(bssid) + + if is_keyword_match or is_deadpoint: + reason = "Non-Infrastructure" if is_keyword_match else "Deadpoint" + suspects.append((bssid, ssid, reason)) if suspects: - for bssid, ssid in suspects: - print(f" - {bssid} (SSID: {ssid})") + for bssid, ssid, reason in suspects: + print(f" - {bssid} (SSID: {ssid}) [{reason}]") else: print(" None found (yet).")