From 3fec8f739a00b0f408d29b992a833ab602242a3c Mon Sep 17 00:00:00 2001 From: MiaoTony <41962043+miaotony@users.noreply.github.com> Date: Mon, 11 Jul 2022 18:40:41 +0000 Subject: [PATCH 1/2] Fix LiveRingCapture params. --- src/pyshark/capture/live_ring_capture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyshark/capture/live_ring_capture.py b/src/pyshark/capture/live_ring_capture.py index d275756..fb82d31 100644 --- a/src/pyshark/capture/live_ring_capture.py +++ b/src/pyshark/capture/live_ring_capture.py @@ -38,7 +38,7 @@ def __init__(self, ring_file_size=1024, num_ring_files=1, ring_file_name='/tmp/p decryption_key=decryption_key, encryption_type=encryption_type, tshark_path=tshark_path, decode_as=decode_as, disable_protocol=disable_protocol, override_prefs=override_prefs, capture_filter=capture_filter, - use_json=False, use_ek=False, include_raw=include_raw, eventloop=eventloop, + use_json=use_json, use_ek=use_ek, include_raw=include_raw, eventloop=eventloop, custom_parameters=custom_parameters, debug=debug) self.ring_file_size = ring_file_size From 803d76cf792241bab65eea5379e15b3bd37d40f5 Mon Sep 17 00:00:00 2001 From: MiaoTony <41962043+miaotony@users.noreply.github.com> Date: Mon, 11 Jul 2022 18:43:09 +0000 Subject: [PATCH 2/2] Add `-V` to get detailed info for further parsing. --- src/pyshark/capture/live_ring_capture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyshark/capture/live_ring_capture.py b/src/pyshark/capture/live_ring_capture.py index fb82d31..cfefbb7 100644 --- a/src/pyshark/capture/live_ring_capture.py +++ b/src/pyshark/capture/live_ring_capture.py @@ -48,5 +48,5 @@ def __init__(self, ring_file_size=1024, num_ring_files=1, ring_file_name='/tmp/p def get_parameters(self, packet_count=None): params = super(LiveRingCapture, self).get_parameters(packet_count=packet_count) params += ['-b', 'filesize:' + str(self.ring_file_size), '-b', 'files:' + str(self.num_ring_files), - '-w', self.ring_file_name, '-P'] + '-w', self.ring_file_name, '-P', '-V'] return params