From f01cfd596d7e94860393b857ec5fea21ec0447cb Mon Sep 17 00:00:00 2001 From: hjp Date: Tue, 6 Feb 2001 11:12:10 +0000 Subject: [PATCH] Tcpdump2ascii --- tcpdump_tools/tcpdump2ascii | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tcpdump_tools/tcpdump2ascii diff --git a/tcpdump_tools/tcpdump2ascii b/tcpdump_tools/tcpdump2ascii new file mode 100755 index 0000000..da750ad --- /dev/null +++ b/tcpdump_tools/tcpdump2ascii @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +while(<>) { + if (/^\t\t\t( [0-9a-f]{2,4})+$/) { + @hex = split; + foreach $i (@hex) { + @c = pack("H4", $i); + foreach $j (@c) { + print "$j"; + } + } + print "\n"; + } else { + print + } +}