2 From marcs@znep.com Fri Apr 17 15:16:16 1998
3 Date: Sat, 22 Nov 1997 20:44:10 -0700 (MST)
4 From: Marc Slemko <marcs@znep.com>
5 To: TLOSAP <new-httpd@apache.org>
6 Subject: Re: Getting ethernet packets content under FreeBSD? (fwd)
7 Reply-To: new-httpd@apache.org
9 Anyone too lazy to hack tcpdump (eg. my tcpdump has a -X option to display
10 the data in ASCII) can use something like the below to grab HTTP headers
11 when debugging broken clients.
13 Nothing complicated, but handy.
15 ---------- Forwarded message ----------
16 Date: Sat, 22 Nov 1997 14:35:23 PST
17 From: Bill Fenner <fenner@parc.xerox.com>
18 To: Nate Williams <nate@mt.sri.com>
19 Cc: bmah@ca.sandia.gov, hackers@FreeBSD.ORG
20 Subject: Re: Getting ethernet packets content under FreeBSD?
22 I usually just use this perl script, which I call "tcpdumpscii".
23 Then run "tcpdumpscii -s 1500 -x [other tcpdump args]".
27 #!/import/misc/bin/perl
30 open(TCPDUMP,"tcpdump -l @ARGV|");
35 while (s/\s*(\S\S)\s*//) {
37 if ($i < 32 || $i > 126) {
40 $asc .= pack(C,hex($1));
43 $foo = "." x length($asc);