473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Conversion of a full .pcap file (incl. header information) into txt using tshark?

Hi,

Scenario:

I have a stored .pcap file of Wireshark.

Using command prompt (tshark command), i want to convert the .pcap file into a text file and store it with all information extracted from the .pcap file.
How should i do this?

Currently, when i do this:
tshark -nr "C:\Users\Vivek Ganti\pcap_file.pcap" -T text > "C:\Users\Vivek Ganti\myoutput.txt"

in the myoutput.txt, i only see basic information of the packets and not their header information, i.e., i only see this:

1 0.000000 00:22:fa:9c:c9:7c -> ff:ff:ff:ff:ff:ff ARP Who has 192.168.1.1? Tell 192.168.1.102
2 0.513198 192.168.1.102 -> 192.168.1.255 UDP Source port: 17500 Destination port: 17500


How do i see the full information of each packet using tshark?

Thank you very much in advance,
Vivek
Jul 28 '10 #1

✓ answered by sicarie

Did you try using fields and specifying all the fields instead of just dumping them to -T text ?

Such as
fields The values of fields specified with the -e option, in a form specified by the -E option. For example,

-T fields -E separator=, -E quote=d

would generate comma-separated values (CSV) output suitable for importing into your favorite spreadsheet program.
From the tshark info page

3 12996
sicarie
4,677 Expert Mod 4TB
Did you try using fields and specifying all the fields instead of just dumping them to -T text ?

Such as
fields The values of fields specified with the -e option, in a form specified by the -E option. For example,

-T fields -E separator=, -E quote=d

would generate comma-separated values (CSV) output suitable for importing into your favorite spreadsheet program.
From the tshark info page
Jul 28 '10 #2
@sicarie
Hey!

So i just tried adding -V after the -T text in the command. Saw it on the link you sent.
Works like a charm!

Thanks a million!
Jul 28 '10 #3
sicarie
4,677 Expert Mod 4TB
Awesome, thanks for posting the result!
Jul 28 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Eddie Leung | last post by:
Hi All, As I know that the tiff contain header information, I can use one software called tifftags.exe to get tiff tag information. However, I can't get any reference from vb.net to do such...
5
by: J Huntley Palmer | last post by:
I am getting this error: Cannot modify header information - headers already sent by when I issue a header ("Location: http://www.foobar.com"); How can I redirect the user to such a site...
4
by: Lee Franke | last post by:
The application that I want to use requires the header to contain a username/password. Example: <soap:Header> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">...
0
by: Albertas | last post by:
Hello, I have a question. But first my situation: I had a Web Service, which was written using .NET Framework 2.0, here is my code: public class Service : System.Web.Services.WebService {...
8
by: Craig | last post by:
Hi there, I'm only new to Python so please bear with me. I using ElementTree to generate an XML file that will reference a DTD and an XSL file. The header information I want at the start of...
9
by: pnsreee | last post by:
Hi All, Please help me to convert csv file to a hash table with out using Text::CSV_XS , Text::CSV. The CSV file is a dynamic file. the fields are like this Numb,Name,Class,Type,......
8
by: mcserret | last post by:
I know this is a recurring problem that has been addressed here before, but even after reading all that has gone before, I am still stumped. I have a form that is designed to send data to a PHP...
2
by: pks83 | last post by:
Hello I am also facing this problem when i amtrying to send additional header information. Warning: Cannot modify header information - headers already sent by (output started at header.php:96)...
10
by: jessica87 | last post by:
hi there, i m using this coding to retrieve the file from database so that my user can download the file... <?php if (!isset($_GET)) die('Invalid Parameter'); include...
2
by: subrat2008 | last post by:
Hi I need Code that Print .pcap file content on cosole/file that should be similar with as Wire shark works. Thanks.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.