Hello all,

 

I have been trying to get a perl upload script to work with clamAV on a
WinXP system. When someone uploads a file to my website,  the file is
scanned by clamAV before it is moved from the temp folder to the actual
destination.

 

Everything appears to be working except for the fact that all PDF and MP3
files are falsely being detected as containing viruses.

 

My e-mail server uses clamAV also and I can send the same files via e-mail
and clamAV does not detect them as containing viruses.

 

Any ideas? Below is a snippet of code from the Perl upload script:

 

if($c->{enable_clamav_virus_scan})

   {

      &lmsg("MSG:'$fhash->{file_name_orig}': Scanning for viruses...");

      my $clam = join '', `clamdscan --no-summary
$c->{target_dir}/$fhash->{file_name}`;

      if($clam!~/command not found/ && $clam!~/$fhash->{file_name}: OK/)

      {

         unlink("$c->{target_dir}/$fhash->{file_name}");

         &lmsg("MSG:'$fhash->{file_name_orig}' contain virus. Skipping.");

         $fhash->{file_status}="contain virus";

         return $fhash;

      }

   }

 

The EICAR test virus is detected correctly. I don't know what to look for.

 

Thanks,

 

Jeff

--

_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-win32

Reply via email to