Enhance suspect AP reporting by adding reason for classification

This commit is contained in:
Yaro Kasear 2025-05-01 15:07:52 -05:00
parent 4ed8082481
commit 460643b1eb

View file

@ -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).")