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():
|
def print_suspect_aps():
|
||||||
print("\n[?] Suspect SSIDs (possibly printers, IoT, weird stuff):")
|
print("\n[?] Suspect SSIDs (possibly printers, IoT, weird stuff):")
|
||||||
suspects = []
|
|
||||||
keywords = ("setup", "direct-", "hp", "epson", "canon", "brother", "smart", "wifi-", "printer")
|
keywords = ("setup", "direct-", "hp", "epson", "canon", "brother", "smart", "wifi-", "printer")
|
||||||
|
suspects = []
|
||||||
|
|
||||||
for bssid, ssid in ssid_map.items():
|
for bssid, ssid in ssid_map.items():
|
||||||
is_keyword_match = any(kw in ssid.lower() for kw in keywords)
|
flags = []
|
||||||
is_deadpoint = bssid in deadpoint_candidates and not ap_clients.get(bssid)
|
if any(kw in ssid.lower() for kw in keywords):
|
||||||
|
flags.append("Suspicious SSID")
|
||||||
if is_keyword_match or is_deadpoint:
|
if bssid in deadpoint_candidates and not ap_clients.get(bssid):
|
||||||
reason = "Non-Infrastructure" if is_keyword_match else "Deadpoint"
|
flags.append("Deadpoint")
|
||||||
suspects.append((bssid, ssid, reason))
|
if flags:
|
||||||
|
suspects.append((bssid, ssid, flags))
|
||||||
|
|
||||||
if suspects:
|
if suspects:
|
||||||
for bssid, ssid, reason in suspects:
|
for bssid, ssid, flags in suspects:
|
||||||
print(f" - {bssid} (SSID: {ssid}) [{reason}]")
|
print(f" - {bssid} (SSID: {ssid}) <-- {' + '.join(flags)}")
|
||||||
else:
|
else:
|
||||||
print(" None found (yet).")
|
print(" None found (yet).")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue