Enhance analyze_pcap function to determine open status based on WLAN capabilities
This commit is contained in:
parent
434add2694
commit
0129ddeaa2
1 changed files with 10 additions and 3 deletions
13
enrich.py
13
enrich.py
|
@ -345,7 +345,17 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
|
|||
|
||||
ssid = None
|
||||
hidden_ssid = False
|
||||
|
||||
is_open = True
|
||||
capabilities = getattr(wlan, 'capabilities', None)
|
||||
|
||||
if capabilities:
|
||||
try:
|
||||
cap_int = int(capabilities, 16)
|
||||
if cap_int & 0x0010 == 0:
|
||||
is_open = False
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
for tag in tags:
|
||||
tag_number = tag.get('wlan.tag.number')
|
||||
|
@ -369,9 +379,6 @@ def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
|
|||
cisco_ssid_clients[ssid].append(num_clients)
|
||||
except (TypeError, ValueError):
|
||||
pass
|
||||
|
||||
if tag_number in {'48', '221'}:
|
||||
is_open = False
|
||||
|
||||
if ssid:
|
||||
ssid_hidden_status[ssid] = hidden_ssid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue