Apache-ProxyScan
view release on metacpan or search on metacpan
eg/clamav.pl view on Meta::CPAN
789101112131415161718192021222324252627# wrapper for clamav
$file
=
shift
@ARGV
;
$optd
=
''
;
if
(
defined
$ENV
{
'SCAN_TMP'
}) {
$optd
=
"--tempdir="
.
$ENV
{
'SCAN_TMP'
};
}
open
(FH,
"ulimit -t60 ; /usr/bin/clamscan --mbox --threads=0 $optd --remove --stdout --disable-summary '$file' |"
);
@msg
= <FH>;
close
FH;
$rc
= $?;
if
(
$rc
!= 0) {
$url
=
$ENV
{
'REQUEST_URI'
};
"Content-type: text/html\n\n"
;
"<html><head><title>Virus Found</title></head><body>\n"
;
"<H1>Virus Alert!</H1>"
;
( run in 0.343 second using v1.01-cache-2.11-cpan-0d8aa00de5b )