I try to find a solution to work (just read) a PCAP/pcap File inside a ZIP Archive. I won´t unzip the File to disk, because there are 1000 of zips, and each of them has one pcap inside
e.G.
file1.zip => contains file1.pcap
file2.zip => contains file2.pcap ...
I am using pyshark atm but can also use dpkt,scapy if it works with memory zips. But pyshark try to find the file.
>>> with ZipFile(pcaps_zip, "r") as z_in:
... for pcap in z_in.namelist():
... pyshark.FileCapture(pcap)
...
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/usr/local/lib/python3.6/site-packages/pyshark/capture/file_capture.py", line 48, in
__init__
+ str(self.input_filename)
FileNotFoundError: [Errno 2] No such file or directory: file1.pcap