我正在尝试执行用户创建的 Perl 脚本,
usage: my.pl <type> <stats> [-map <map>] <session1> [session2]
Produces statistics about the session from a Wireshark .pcap file where:
<type> is the type of data in the pcap file (wlan, ethernet or ip)
<stats> is the output file to write notable information
<session> is the pcap input file or a folder containing pcaps (recursive)
但它失败并出现以下错误。
$perl my.pl ethernet pa.xls google.pcap
Processing pcap trace (TCP):
Not a HASH reference at folder/httpTrace.pm line 654.
这是调试控制台 -
Not a HASH reference at folder/httpTrace.pm line 654. at folder/httpTrace.pm line 654
folder::httpTrace.pm::readHttp('HASH(0x2306d38)', undef) called at my.pl line 56
main::__processSession('google.pcap') called at my.pl line 35 Debugged program terminated.
httpTrace.pm: 最后一行# 654
sub readHttp($@)
{
my ($conntable, $map) = @_;
my $http_req_id = 0;
my $pipelining = 0;
my $mapc;
my @allReq;
my @allRep;
if( defined( $map ) ) {
$mapc = $map->clone();
}
foreach my $connect ( sort { $pa->{'id'} <=> $pb->{'id'} } values( %{ $conntable } ) ) {
my.pl 中的第 56 行:
my $stats = Pcapstats::HTTP::readHttp( \%tcp_stream, $map );
my.pl 中还有 map.pm 和用法
my $map;
if( $ARGV[0] eq '-map' ) {
shift( @ARGV );
$map = Pcapstats::Map->new( shift( @ARGV ) );
}