X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=contrib%2Fossec_report_contrib.pl;h=0ec061b29c3bb698fa535205e97585cfc56e0623;hp=4278dfbaf4f94a3b3238e9de2cba642f720a183e;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 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]+):(.*)$/){