From 2e3484ed83c103618970c83815fdaa540bbb8c13 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Thu, 1 May 2025 15:29:21 -0500 Subject: [PATCH] Enhance suspect AP reporting by including multiple classification reasons --- listener.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/listener.py b/listener.py index 078f4ad..7eaa7b7 100755 --- a/listener.py +++ b/listener.py @@ -179,20 +179,21 @@ def get_connected_bssid(interface): def print_suspect_aps(): print("\n[?] Suspect SSIDs (possibly printers, IoT, weird stuff):") - suspects = [] keywords = ("setup", "direct-", "hp", "epson", "canon", "brother", "smart", "wifi-", "printer") + suspects = [] for bssid, ssid in ssid_map.items(): - 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)) + flags = [] + if any(kw in ssid.lower() for kw in keywords): + flags.append("Suspicious SSID") + if bssid in deadpoint_candidates and not ap_clients.get(bssid): + flags.append("Deadpoint") + if flags: + suspects.append((bssid, ssid, flags)) if suspects: - for bssid, ssid, reason in suspects: - print(f" - {bssid} (SSID: {ssid}) [{reason}]") + for bssid, ssid, flags in suspects: + print(f" - {bssid} (SSID: {ssid}) <-- {' + '.join(flags)}") else: print(" None found (yet).")