OSQA is unmaintained. Help us figure out where to go from here.

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

accept rate: 0%

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 ♦♦
accept rate: 18%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 24 Sep '10, 05:59

Seen: 12,620 times

Last updated: 24 Sep '10, 06:09

p​o​w​e​r​e​d by O​S​Q​A