diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-04-24 16:42:08 -0700 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-04-24 16:42:08 -0700 |
commit | 96eba5da43089af0901c9229e6bf2ea10b6fdb2d (patch) | |
tree | 7d6a1ec8be9588c087fb5dc4ce3a438d8746646d | |
parent | dfbd63ee05308f5b58b5f227f18846cdd02e68d4 (diff) | |
download | vyatta-op-96eba5da43089af0901c9229e6bf2ea10b6fdb2d.tar.gz vyatta-op-96eba5da43089af0901c9229e6bf2ea10b6fdb2d.zip |
Add the ability to read a packet capture file in a useable format
-rwxr-xr-x | scripts/vyatta-image-tools.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl index abb0090..f19e18d 100755 --- a/scripts/vyatta-image-tools.pl +++ b/scripts/vyatta-image-tools.pl @@ -145,6 +145,17 @@ sub show { system("file -sb $file"); print "\n########### FILE DATA ###########\n"; system("cat $file"); + } elsif ( $file =~ /.*\.pcap/ ){ + print "########### FILE INFO ###########\n"; + my $filename = conv_file_to_rel($topdir, $file); + print "File Name: $filename\n"; + print "Binary File: \n"; + my $lsstr = `ls -lGh $file`; + parsels($lsstr); + print " Description:\t"; + system("file -sb $file"); + print "\n########### FILE DATA ###########\n"; + system("sudo tshark -r $file | less"); } elsif ( -B $file ) { print "########### FILE INFO ###########\n"; my $filename = conv_file_to_rel($topdir, $file); |