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

Converting a wireshark pcap file to a windows txt file that contains field=value data.


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,,,Protocol=TCP,Length=54,Info=35165 > http [SYN] Seq=0 Win=16384 Len=0 No=2,Time=0.000001,,,Protocol=TCP,Length=54,Info=14378 > http [SYN] Seq=0 Win=16384 Len=0 No=3,Time=0.000003,,,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

accept rate: 0%

edited 18 Apr '12, 22:08

One Answer:


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.

answered 18 Apr '12, 23:58

Guy%20Harris's gravatar image

Guy Harris ♦♦
accept rate: 19%

Okay i get it.

(19 Apr '12, 00:02) misteryuku