Hi MJ,

On Wed, Jul 20, 2005 at 06:19:37PM +0300, MJ told us:
> Hi,
> I am sucessfully using "pflogsumm-1.1.0.pl" and "my-spam-report.pl" 
> downloaded from http://www.flakshack.com/anti-spam/wiki/index.php but when I 
> try to run 3rd script "my-virus-report.pl " which is to get Virus statistics, 
> it is giving me following error. Can some one help in this. This script is 
> available at http://www.xmission.com/~kn/AddClamAV/my-virus-report.txt
> ====================
> 
> #./my-virus-report.pl /var/log/syslog.1
> -----------------------------------------------------------------------
> Virus Filter Report
> -----------------------------------------------------------------------
> 
> Summary
> 
> 0  Viruses blocked
> 
> 
> Viruses Blocked - Top 50
>     #     Virus name 
>     -------------------------------------------------------------------
> Use of uninitialized value in concatenation (.) or string at 
> ./my-virus-report.pl line 106, <> line 19.
> 
>   Virus types detected

I took a quick look at this perl script, this was quite easy to fix.
Apply the attached patch to the script via

patch -p0 </some/where/my-virus-report.diff

Nevertheless, what version of "amavis" is this script intended for??
I tried to use it with my maillog (I'm using postfix + amavisd-new on
my home machine) and it didn't find anything (but I _do_ have received
some viruses since the last logrotate)


Regards,

Sven

-- 
Linux zion 2.6.13-rc3-mm1 #6 PREEMPT Mon Jul 18 19:42:52 CEST 2005 i686 athlon 
i386 GNU/Linux
 23:38:14 up 2 days,  3:50,  1 user,  load average: 0.13, 0.06, 0.05
--- my-virus-report.pl.orig     2005-07-20 17:28:01.000000000 +0200
+++ my-virus-report.pl  2005-07-20 17:28:38.000000000 +0200
@@ -88,6 +88,9 @@
 EOL
 
 $numberofdomains = 0;
+
+my($NumberOfTypes) = 0;
+
 for my $row(@Viruses) {
   if ($numberofdomains < 50)  # only print this many lines
   {

Reply via email to