Python | Merging multiple pcap/pcapng files using Pyshark

2.8k Views Asked by At

Using the Pyshark module, is there a way to efficientaly merge/join multiple pcap/pcapng files?

Tried playing around with pyshark.FileCapture and native file methodes in Python, but with no success.

Any ideas?

Thanks in advance!

1

There are 1 best solutions below

0
On BEST ANSWER

Since no one answered, the right way to do it is to use the OS module and run "mergecap -w destfile.pcap [source_files.pcap]". You'll have to configure mergecap as into the Path veriable in Windows, or otherwise use the absolute destination, which is to the Wireshark folder.