Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert *.cap to txt file

Status
Not open for further replies.

atuk

ISP
May 13, 2003
1
MY
hello,

is there any way that i can convert the catured packet file *.cap to text file. i want the capture packet can be view without using any sniffing software.
 
The answer is no, A cap file is not a decode. The files is decoded when loaded into the sniffer. So you should need a tool (not Sniffer as you mention) to decode the file and then save it to a text file.
Robert


Robert A.H. Wullems
Sniffer University Instructor
SCM / CNX / MCP
Citee Education
the Netherlands
 
Is there a sample of how to open a .cap file in VB6 and decode the data for display? Is there a tool or VB plug-in to help with this?
 
I've got Ethereal but I need to be able to see and replay the data stream and want to do so via VB6. I think you (mpennac) and I are talking about this in another thread.

Since I'm new to this realm any suggestions of good books and reference sources for packet format and structure would be helpful too.

Leigh
 
Here's an excerp from my website on how to do it from the command prompt:

Tip- Creating A Text File - October 1, 2001
When creating text files for reporting and other applications, I found a real timesaver.
Tethereal is an utlity that you can find in the Ethereal program directory. Just open a command prompt and the following commands will create a text file for later processing.

In Tethereal, you can just do
tethereal -r {capture file name}>filename.txt

and it'll read the capture file with that name, and print the summary line for each packet. To get the full protocol tree from Tethereal, you also supply it the "-V" flag:
tethereal -V -r {capture file name}>filename.txt

The good news is that will work will all the Ethereal supported file types (ie, NAI, Snoop).


Regards

'Making things work better; bit by bit.'
 
Hi,
If you've done the capture with a sniffer, the simple answer to this question is yes, and it's very simple too.
With the decode screen showing, go to File, Print. Select "Print to file", then select what you require (summary, and/or detail, and/or hex) then save it.

Alf
 
I like my Ethereal/tethereal tip since I can convert many trace files without opening the app, retreiving the file, etc....

I converted 10-8MB trace files from the command prompt in less than 5 minutes.

If atuk only had a file, then go with AlfSutherland's advice.

Regards

'Making things work better; bit by bit.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top