Add final AP count summary to main function and remove debug print for beacon frames

This commit is contained in:
Yaro Kasear 2025-05-01 13:03:45 -05:00
parent c3df0d124f
commit 67213136e1

View file

@ -87,7 +87,6 @@ def handle_packet(pkt):
ssid = parse_ssid(pkt)
if ssid:
ssid_map[a2] = ssid
print(f"[D] Beacon from AP {a2} (SSID: {ssid}) [count={beacon_counts[a2]}]")
# === Track all seen clients ===
if dot11.type == 2:
@ -204,6 +203,13 @@ def main():
sniff(iface=args.monitor_iface, prn=handle_packet, store=False, timeout=5)
write_csv(args.outfile)
print("\n[+] Final APs counted on this channel:")
for bssid in sorted(aps):
ssid = ssid_map.get(bssid, "<unknown>")
print(f" - {bssid} (SSID: {ssid})")
print(f"[+] Total APsOnChannel: {len(aps)}")
reset_interface(args.monitor_iface)
if __name__ == "__main__":