Open plipK opened 3 years ago
cap = pyshark.FileCapture(capFile)
print(len(cap))
cap.load_packets()
print(len(cap))
Should output 0
for the first len
call and the actual number of packets for the second.
With a ~12 Mbyte pcap file, cap.load_packets()
needs roughly 5 Gbyte of RAM on my computer.
So maybe it is not suitable for very large files?
I've simply iterated with a separate counter to avoid high memory usage...
counter = 0
for packet in cap:
counter += 0
print(counter)
I tried
but that returns 0.