diff --git a/enrich.py b/enrich.py index ab7512b..cc97cc3 100755 --- a/enrich.py +++ b/enrich.py @@ -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()