Add debug statements for SSID handling in analyze_pcap
This commit is contained in:
parent
57c9532b88
commit
d255618f0e
1 changed files with 4 additions and 2 deletions
|
@ -315,8 +315,6 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
|
||||||
|
|
||||||
for packet in filtered_packets:
|
for packet in filtered_packets:
|
||||||
try:
|
try:
|
||||||
print(f"[DEBUG] Layers: {[layer.layer_name for layer in packet.layers]}")
|
|
||||||
|
|
||||||
if 'radiotap' not in packet or 'wlan' not in packet:
|
if 'radiotap' not in packet or 'wlan' not in packet:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -336,7 +334,11 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
|
||||||
try:
|
try:
|
||||||
mgt = packet.get_multiple_layers('wlan.mgt')[0]
|
mgt = packet.get_multiple_layers('wlan.mgt')[0]
|
||||||
ssid = mgt.get_field('ssid')
|
ssid = mgt.get_field('ssid')
|
||||||
|
if ssid is None:
|
||||||
|
print("[DEBUG] SSID is None (explicitly)")
|
||||||
|
continue
|
||||||
except (IndexError, AttributeError):
|
except (IndexError, AttributeError):
|
||||||
|
print("Debug: No SSID found in packet, or I am terrible at parsing")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
bssid = getattr(wlan, 'bssid', '').lower()
|
bssid = getattr(wlan, 'bssid', '').lower()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue