Add debug statements to analyze_pcap for missing packet layers

This commit is contained in:
Yaro Kasear 2025-04-16 10:12:13 -05:00
parent 63a5bbba09
commit c4e36048e5

View file

@ -317,7 +317,8 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
try: try:
print(f"[DEBUG] Layers: {[layer.layer_name for layer in packet.layers]}") print(f"[DEBUG] Layers: {[layer.layer_name for layer in packet.layers]}")
if 'radiotap' not in packet or 'wlan' not in packet or 'wlan.mgt' not in packet: if 'radiotap' not in packet or 'wlan' not in packet or not 'wlan.mgt' in packet.get_multiple_layers('wlan.mgt'):
print(f"[DEBUG] Skipping packet due to missing layers: {packet}")
continue continue
radio = packet.radiotap radio = packet.radiotap