I have a captured pcap file which I want to filter for a certain http host. Because I not only want the http packets I search first for the http streams and save their stream numbers. In a second step I filter the pcap file for these found stream numbers. Here ist what I do:
Now I have a list with the filtered packets. How would I write them out now to a new pcap file? Thanks for any help! Regards, Marcel BTW: The captured pcap files are big (> 300 MB). Scapy eats all my memory while reading… asked 24 May ‘17, 05:38 mluethi edited 24 May ‘17, 05:40 |
One Answer:
I don't think saving a capture is supported. Regardless, pyshark is not part of the Wireshark project so you'll find support for pyshark over here. answered 24 May '17, 05:48 grahamb ♦ |
Thanks for your quick reply! I saw other questions with PyShark and therefore tried to ask here. Will open an issue.
Do you think what I try so achieve would be possible with tshark alone?
Not with tshark alone, you'll need some external scripting tool. The basic approach looks good, filter on the host required outputting the stream index (
-T fields -e tcp.stream
), then re-filter with those streams.