tcpdump mailing list archives

Re: tcpdump -v option


From: Guy Harris <guy () alum mit edu>
Date: Thu, 22 May 2008 09:50:46 -0700

Chris Pawelko wrote:
I am using tcpdump with the -w and -v options.

Presumably meaning that you're sometimes using tcpdump with -w and other times using tcpdump with -v - if "-w" is being used, it's writing a raw binary capture to the file, not writing a dissected text display of the packets, so "-v" doesn't have any effect, so you wouldn't use both of them at the same time.

I was wondering if there is
a way of getting the -v output (example: got 265) into either a text file

Welcome to UN*X; tcpdump's text output goes to the standard output, so, from the command line, you just redirect the standard output to a file:

        tcpdump -v >text_file

(That also works with the Windows command line, using WinDump.)

or if using something like php into a variable?

If PHP lets you run a command and stuff the standard output into a variable (meaning the PHP interpreter would redirect the command's standard output to a pipe), then that should work with tcpdump.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: