This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Data extraction from pcap files

0

I have machines on taps at critical visibility points in my network that run tshark as a service so that I have continuous packet capture (see tip#7 at http://www.wiresharktraining.com/tips-1-20.html). Whether for troubleshooting or forensics, I frequently need to extract packets from the resulting pcap files for a specific IP address. Rather than having to use the (more manually intensive) GUI interface to do so, how can I use tshark (or editshark?) to extract data from one pcap file into another pcap file for that IP address?

asked 24 Sep '10, 05:59

johnb_hslda_org's gravatar image

johnb_hslda_org
1111
accept rate: 0%


One Answer:

2

Usually I would just run tshark.exe -r <infile> -R "ip.addr==x.x.x.x" -w <outfile>, where x.x.x.x is the IP address you want to carve out. If I have more than one pcap file to process I run a batch on them, and sometimes merge them together in the end using mergecap -a.

answered 24 Sep '10, 06:09

Jasper's gravatar image

Jasper ♦♦
23.8k551284
accept rate: 18%