Add display filter to pyshark FileCapture in analyze_pcap function
This commit is contained in:
parent
150f8fc448
commit
3675a5e97e
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue