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

What is the tshark command for converting a wireshark pcap file to a windows .txt file that will result in the output in the windows .txt file shown below? (The x's represents a numeric value of the ip address.)

Sample output : No=1,Time=0.000000,source=xxx.xxx.xxx.xxx,Destination=xxx.xxx.xxx.xxx,Protocol=TCP,Length=54,Info=35165 > http [SYN] Seq=0 Win=16384 Len=0 No=2,Time=0.000001,source=xxx.xxx.xxx.xxx,Destination=xxx.xxx.xxx.xxx,Protocol=TCP,Length=54,Info=14378 > http [SYN] Seq=0 Win=16384 Len=0 No=3,Time=0.000003,source=xxx.xxx.xxx.xxx,Destination=xxx.xxx.xxx.xxx,Protocol=TCP,Length=54,Info=31944 > http [SYN] Seq=0 Win=16384 Len=0

and so on......util the end of the capture.

I know that tshark has some syntax like this i have no idea how to put it so that i can generate the above output to a .txt file

-E<fieldsoption>=<value> set options for output when -Tfields selected: header=y|n switch headers on and off separator=/t|/s|<char> select tab, space, printable character as separator occurrence=f|l|a print first, last or all occurrences of each field aggregator=,|/s|<char> select comma, space, printable character as aggregator

asked 18 Apr '12, 18:13

misteryuku's gravatar image

misteryuku
20242630
accept rate: 0%

edited 18 Apr '12, 22:08


No, you don't know that TShark has some syntax like this, and you can't possibly know it, because TShark doesn't have a syntax like that. There is no TShark command that will do that. Tshark has no option to show key=value output, whether for columns or fields.

permanent link

answered 18 Apr '12, 23:58

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

Okay i get it.

(19 Apr '12, 00:02) misteryuku
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:

×832
×254
×238
×9

question asked: 18 Apr '12, 18:13

question was seen: 7,825 times

last updated: 19 Apr '12, 00:02

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