Here it works ;-)
replace the sub-avp.pl with the following one : for compiling i use the following trick.
cp /opt/avp/kavscanner /bin/kavscanner so the avp is found ;-) and everthing works fine.
If you try it out. Take care for the $DD. There needs to be /* behind the tempdir. otherwise avp will crash.
The avp return codes (2,3,4) are listed in the manual of avp ;-)
regards mandy.
sub avp_scanner {
#Kaspersky AVPLinux scanner
&debug("kasp: starting scan of directory \"$ENV{'TMPDIR'}\"...");
my ($start_avp_time)=[gettimeofday];
my ($avp_verbose,$DD,$avp_status,$stop_avp_time,$avp_time);
$avp_verbose="-O" if ($DEBUG);
&debug("run aveclient -p /var/run/aveserver -s $ENV{'TMPDIR'}/* 2>&1");
$DD=`/opt/kav/bin/aveclient -p /var/run/aveserver -s $ENV{'TMPDIR'}/* 2>&1`;
$avp_status=($? >> 8);
&debug("--output of avp was:\n$DD--");
if ( $avp_status > 0 ) {
if ($avp_status =~ /^(2|3|4)$/) {
#This covers the potential viruses
$quarantine_description="suspicious";
# First try needs to be testet by someone if ($DD =~ /(LINFECTED) (.*)\n/) {
$quarantine_description="$2";
} elsif ($DD =~ /\n[\s|](.*) (suspicion): (.*)[\s]\n/) {
#This covers the specific
$destring='Suspicious file:';
$quarantine_description="$1 $2 $3";
}
&debug("There be a $destring! ($quarantine_description)");
($quarantine_event=$quarantine_description)=~s/\s/_/g;
$quarantine_event="AVP:".substr($quarantine_event,0,$QE_LEN);
} else {
&error_condition("corrupt or unknown Kaspersky scanner error or memory/resource/perms problems - exit status $avp_status");
}
}
$stop_avp_time=[gettimeofday];
$avp_time = tv_interval ($start_avp_time, $stop_avp_time);
&debug("kasp: finished scan of dir \"$ENV{'TMPDIR'}\" in $avp_time secs");
}
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Qmail-scanner-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general
