Add display filter to pyshark FileCapture in analyze_pcap function

This commit is contained in:
Yaro Kasear 2025-04-28 15:29:54 -05:00
parent 150f8fc448
commit 3675a5e97e

View file

@ -29,11 +29,16 @@ def parse_args():
return parser.parse_args()
def analyze_pcap(pcapng_path, start_ts, end_ts, ap_bssid, ap_channel):
display_filter = (
"(wlan.fx.type_subtype == 8 || wlan.fx.type_subtype == 5 || wlan.fc.type == 2) && "
"(wlan.bssid || wlan.sa || wlan.da)"
)
cap = pyshark.FileCapture(
pcapng_path,
use_json=True,
include_raw=False,
keep_packets=False
keep_packets=False,
display_filter=display_filter
)
ap_channel = int(ap_channel)