Add final AP count summary to main function and remove debug print for beacon frames
This commit is contained in:
parent
c3df0d124f
commit
67213136e1
1 changed files with 7 additions and 1 deletions
|
@ -87,7 +87,6 @@ def handle_packet(pkt):
|
||||||
ssid = parse_ssid(pkt)
|
ssid = parse_ssid(pkt)
|
||||||
if ssid:
|
if ssid:
|
||||||
ssid_map[a2] = ssid
|
ssid_map[a2] = ssid
|
||||||
print(f"[D] Beacon from AP {a2} (SSID: {ssid}) [count={beacon_counts[a2]}]")
|
|
||||||
|
|
||||||
# === Track all seen clients ===
|
# === Track all seen clients ===
|
||||||
if dot11.type == 2:
|
if dot11.type == 2:
|
||||||
|
@ -204,6 +203,13 @@ def main():
|
||||||
sniff(iface=args.monitor_iface, prn=handle_packet, store=False, timeout=5)
|
sniff(iface=args.monitor_iface, prn=handle_packet, store=False, timeout=5)
|
||||||
|
|
||||||
write_csv(args.outfile)
|
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)
|
reset_interface(args.monitor_iface)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue