"Peter M. Nielsen" wrote:
> 
> I know the topic has been brought up before, but anyway. I'm no perl
> programmer, but I really need a way to use the commandline version of panda
> antivirus, pavcl. I have the documentation with exitcodes and etc. and am
> willing to sponsor a solution. Since the program is free to use, I can also
> provide the program. Is anyone up for the challenge. I will pay via paypal.

Though I wouldn't recommend it (see earlier reply) - just in case you want to
try Q-S with pavcl, you could -try- to integrate the subroutine below. 
Note 1 - integration of below with Q-S is left as an excercise for the reader.
Note 2 - AFAIK - there's no way to get version info from pavcl that Q-S wants
during configure time. You might get around this with:
 $ rpm -qa|grep pavcl (assuming you installed from RPM)

No warranties expressed or implied.
-----------------------------------------------------------
sub pavcl_scanner {
  #Panda AV
  &debug("pavcl: starting scan of directory \"$scandir/$file_id\"...");

  my ($start_pavcl_time)=[gettimeofday];
  my ($DD,$pavcl_status,$stop_pavcl_time,$pavcl_time);

  &debug("run $pavcl_binary -AUT -AEX -NOR -CMP -HEU $scandir/$file_id 
2>&1");

  $DD=`$pavcl_binary -AUT -AEX -NOR -CMP -HEU $scandir/$file_id 2>&1`;
  $pavcl_status=($? >> 8);

  # BEWARE! pavcl outputs a LENGTHY disclaimer
  &debug("--output of pavcl was:\n$DD--");


  if ( $pavcl_status > 0 ) {
    if ($DD =~ /(Found virus :.*)+\n/) {
      $quarantine_description=$+;
      &debug("There be a virus! ($quarantine_description)");
      ($quarantine_event=$quarantine_description)=~s/\s/_/g;
      $quarantine_event="pavcl:".substr($quarantine_event,0,$QE_LEN);
      $description .= "\n---pavcl results ---\n$DD";
    }

    else {
      #This implies a corrupt set of DAT files or other resource problems...
      &tempfail("corrupt or unknown pavcl scanner/resource problems - exit
status $pavcl_status");
    }
  }

  $stop_pavcl_time=[gettimeofday];
  $pavcl_time = tv_interval ($start_pavcl_time, $stop_pavcl_time);
  &debug("pavcl: finished scan of dir \"$scandir/$file_id\" in $pavcl_time
secs");
}


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to