Refactor deadpoint candidate handling and update suspect AP flags
This commit is contained in:
parent
b7864a537e
commit
6160948d05
1 changed files with 3 additions and 4 deletions
|
@ -26,7 +26,7 @@ target_ap_bssid = None
|
||||||
beacon_counts = defaultdict(int)
|
beacon_counts = defaultdict(int)
|
||||||
current_channel = None
|
current_channel = None
|
||||||
include_probes = False
|
include_probes = False
|
||||||
deadpoint_candidates = set()
|
# deadpoint_candidates = set()
|
||||||
unlinked_candidates = set()
|
unlinked_candidates = set()
|
||||||
bssid_channels = {}
|
bssid_channels = {}
|
||||||
|
|
||||||
|
@ -108,7 +108,6 @@ def handle_packet(pkt):
|
||||||
beacon_counts[a2] += 1
|
beacon_counts[a2] += 1
|
||||||
if beacon_counts[a2] > 1:
|
if beacon_counts[a2] > 1:
|
||||||
aps.add(a2)
|
aps.add(a2)
|
||||||
deadpoint_candidates.add(a2)
|
|
||||||
ssid = parse_ssid(pkt)
|
ssid = parse_ssid(pkt)
|
||||||
if ssid:
|
if ssid:
|
||||||
ssid_map[a2] = ssid
|
ssid_map[a2] = ssid
|
||||||
|
@ -166,7 +165,7 @@ def write_csv(outfile):
|
||||||
"NumberofBSSIDsOnSSID": "N/A",
|
"NumberofBSSIDsOnSSID": "N/A",
|
||||||
"NumberofChannelsOnSSID": "N/A",
|
"NumberofChannelsOnSSID": "N/A",
|
||||||
"UnlinkedDevices": len(unlinked_candidates),
|
"UnlinkedDevices": len(unlinked_candidates),
|
||||||
"Deadpoints": len([ap for ap in deadpoint_candidates if is_deadpoint(ap)])
|
"Deadpoints": len([ap for ap in aps if is_deadpoint(ap)])
|
||||||
}
|
}
|
||||||
|
|
||||||
new_file = not os.path.exists(outfile)
|
new_file = not os.path.exists(outfile)
|
||||||
|
@ -211,7 +210,7 @@ def print_suspect_aps():
|
||||||
ssid = ssid_map.get(bssid, "<unknown>")
|
ssid = ssid_map.get(bssid, "<unknown>")
|
||||||
flags = []
|
flags = []
|
||||||
if any(kw in ssid.lower() for kw in keywords):
|
if any(kw in ssid.lower() for kw in keywords):
|
||||||
flags.append("Suspicious SSID")
|
flags.append("Likely non-AP")
|
||||||
if is_deadpoint(bssid):
|
if is_deadpoint(bssid):
|
||||||
flags.append("Deadpoint")
|
flags.append("Deadpoint")
|
||||||
if flags:
|
if flags:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue