ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-users: Re: [Wireshark-users] Howto: Wireshark from the command line export text

From: "Rob MacKenzie" <rmackenzie@xxxxxxx>
Date: Wed, 26 Mar 2008 10:20:35 -0400
Hi 赵新元,

I had the same issue a while back, refer to http://www.mail-archive.com/wireshark-users@xxxxxxxxxxxxx/msg04426.html

The command I ended up using was
tshark -o column.format:'"No.", "%m", "Time", "%t", "Source", "%s", "Destination", "%d", "srcport", "%uS", "dstport", "%uD", "len", "%L", "Protocol", "%p", "Info", "%i"' -r test.pcap > test.txt

This reads from test.pcap and redirects output to test.txt.  This is perfect for parsing that info line, which is inaccessible with the -tfeilds option, so far as I can tell.


-----Original Message-----
From: wireshark-users-bounces@xxxxxxxxxxxxx [mailto:wireshark-users-bounces@xxxxxxxxxxxxx] On Behalf Of Jaap Keuter
Sent: March 26, 2008 6:20 AM
To: Community support list for Wireshark
Subject: Re: [Wireshark-users] Howto: Wireshark from the command line export text

Hi,

Note that the refenrenced mail speaks of tshark, not wireshark. tshark is the
textbased variant of wireshark.

Thanx,
Jaap


赵新元 wrote:
> Hi, How can I export wireshark text  from command line?
>
> http://www.mail-archive.com/wireshark-users@xxxxxxxxxxxxx/msg00929.html
>
> This mail tell me redirect stdout, so I use this command :
>
> #wireshark -i 3 -k > c:\test.csv
>
> But cann't get the wireshark text!
>
> How to export the text to a csv file, *use command line?*
>
> Note: *wireshark text is :No,Time,Source,Destination,Protocol,Info
> etc,display in packge list window.*
>
>
> 2008-03-26
> ------------------------------------------------------------------------
> 赵新元
>
>

_______________________________________________
Wireshark-users mailing list
Wireshark-users@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-users

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.