Add debug statements for SSID handling in analyze_pcap

This commit is contained in:
Yaro Kasear 2025-04-16 10:31:12 -05:00
parent 57c9532b88
commit d255618f0e

View file

@ -315,8 +315,6 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
for packet in filtered_packets:
try:
print(f"[DEBUG] Layers: {[layer.layer_name for layer in packet.layers]}")
if 'radiotap' not in packet or 'wlan' not in packet:
continue
@ -336,7 +334,11 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
try:
mgt = packet.get_multiple_layers('wlan.mgt')[0]
ssid = mgt.get_field('ssid')
if ssid is None:
print("[DEBUG] SSID is None (explicitly)")
continue
except (IndexError, AttributeError):
print("Debug: No SSID found in packet, or I am terrible at parsing")
continue
bssid = getattr(wlan, 'bssid', '').lower()