Enhance suspect AP reporting by adding reason for classification
This commit is contained in:
parent
4ed8082481
commit
460643b1eb
1 changed files with 8 additions and 4 deletions
12
listener.py
12
listener.py
|
@ -183,12 +183,16 @@ def print_suspect_aps():
|
||||||
keywords = ("setup", "direct-", "hp", "epson", "canon", "brother", "smart", "wifi-", "printer")
|
keywords = ("setup", "direct-", "hp", "epson", "canon", "brother", "smart", "wifi-", "printer")
|
||||||
|
|
||||||
for bssid, ssid in ssid_map.items():
|
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)):
|
is_keyword_match = any(kw in ssid.lower() for kw in keywords)
|
||||||
suspects.append((bssid, ssid))
|
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:
|
if suspects:
|
||||||
for bssid, ssid in suspects:
|
for bssid, ssid, reason in suspects:
|
||||||
print(f" - {bssid} (SSID: {ssid})")
|
print(f" - {bssid} (SSID: {ssid}) [{reason}]")
|
||||||
else:
|
else:
|
||||||
print(" None found (yet).")
|
print(" None found (yet).")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue