This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.
0
1

when i click the Follow TCP Stream,wireshark can output entire conversation stream content,i want to how to make wireshark automate output every entire conversation stream content to a file. Is there anyone can give me some advice?

asked 15 Apr '14, 22:23

fred's gravatar image

fred
267813
accept rate: 0%

edited 15 Apr '14, 22:30


You can use tshark

tshark -nr input.pcap -z "follow,tcp,ascii,1"

This will print the payload of TCP stream 1 in ASCII. See the tshark man page for details.

Or one of the tools listed here

https://isc.sans.edu/diary/Tools+for+extracting+files+from+pcaps/6961
http://wiki.wireshark.org/Tools

Regards
Kurt

permanent link

answered 16 Apr '14, 04:40

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

good job. And I have another question that how to know how many TCP streams in a pcap file?

(16 Apr '14, 05:42) fred
1

GUI:

Statistics -> Conversations

then look at the TCP tab. The number after the colon is the number of TCP conversations/streams.

CLI:

tshark -nr input.pcap -q -z conv,tcp

Then count the lines

(19 Apr '14, 14:48) Kurt Knochner ♦

thanks, it's what i need

(21 Apr '14, 20:38) fred
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

Question tags:

×82
×34
×22
×9
×1

question asked: 15 Apr '14, 22:23

question was seen: 2,987 times

last updated: 21 Apr '14, 20:38

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