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%


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.

link

answered 24 Sep '10, 06:09

Jasper's gravatar image

Jasper ♦
16.1k338212
accept rate: 17%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×391
×9
×2

Asked: 24 Sep '10, 05:59

Seen: 6,534 times

Last updated: 24 Sep '10, 06:09

powered by OSQA