X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fossec_report_contrib.pl;fp=contrib%2Fossec_report_contrib.pl;h=0ec061b29c3bb698fa535205e97585cfc56e0623;hb=ff0e686ac67bbd82b60c277eb324910dbc60f65f;hp=4278dfbaf4f94a3b3238e9de2cba642f720a183e;hpb=33a81e69474ae91ecec4e991debe59e26bb330fd;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]+):(.*)$/){