44 public static function scan_file($path=
'', &$report, $recursive=FALSE)
54 require_once SQ_DATA_PATH.
'/private/conf/tools.inc';
57 if (SQ_TOOL_VIRUS_CHECKER_ENABLED) {
58 if (!file_exists(SQ_TOOL_VIRUS_CHECKER_PATH)) {
70 if (is_dir($file) || file_exists($file)) {
72 switch (SQ_TOOL_VIRUS_CHECKER_TYPE) {
81 if ($recursive) $options[] =
'-r';
85 $path_to_av = SQ_TOOL_VIRUS_CHECKER_PATH;
86 foreach($options as $option) {
87 $path_to_av .=
' '.$option;
89 $command = $path_to_av.
' '.escapeshellarg($file).
' 2>&1';
92 exec($command, $av, $return);
98 foreach ($av as $line_no => $line) {
100 if (preg_match(
'/scanned/', $line)) {
110 if ($return && $scanned) {