X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=contrib%2Fossec_report_contrib.pl;h=0ec061b29c3bb698fa535205e97585cfc56e0623;hb=HEAD;hp=4278dfbaf4f94a3b3238e9de2cba642f720a183e;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/contrib/ossec_report_contrib.pl b/contrib/ossec_report_contrib.pl index 4278dfb..0ec061b 100755 --- a/contrib/ossec_report_contrib.pl +++ b/contrib/ossec_report_contrib.pl @@ -27,8 +27,8 @@ while(<>){ $stats{$alerthost}{rule}{$rule}++; $stats{$alerthost}{level}{$level}++; $stats{$alerthost}{description}{$description}++; - $stats{$alerthost}{srcip}{$srcip}++; - $stats{$alerthost}{user}{$user}++; + if (defined $srcip) { $stats{$alerthost}{srcip}{$srcip}++; } + if (defined $user) { $stats{$alerthost}{user}{$user}++; } next ; } if (m/^\*\* Alert ([0-9]+).([0-9]+):(.*)$/){