Enhance suspect AP reporting by including multiple classification reasons
This commit is contained in:
parent
460643b1eb
commit
2e3484ed83
1 changed files with 10 additions and 9 deletions
19
listener.py
19
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).")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue