@ECHO OFF
REM SAVRS v1.0 RC
REM
REM Copyright 2009 Schadenfroh <quako33@comcast.net>
REM All trademarks and copyrights are the property of their respective owners.
REM
REM This file is part of Schadenfroh's Automated Virus Removal Script (SAVRS).
REM SAVRS is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM SAVRS is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with SAVRS. If not, see <
http://www.gnu.org/licenses/>.
REM
SETLOCAL EnableDelayedExpansion
set MailTo=theitguy@company.co.uk
set SMTPhost=exchangeservername
TITLE Schadenfroh's Automated Virus Removal Script (SAVRS)
CLS
ECHO SAVRS v1.0 RC
ECHO.
IF %1==clean (
ECHO Operations to be performed: Scan, Remove and Report
) ELSE (
ECHO Operations to be performed: Scan and Report
)
ECHO.
ECHO.
IF EXIST Mcafee/scan.exe (
IF %1==clean (
SET delArg=/program /del
) ELSE (
SET delArg=
)
SET scanArg=
ECHO Scanning with Mcafee
START "Mcafee" /wait /min C:\USBVirusScan\Mcafee\scan.exe %2 /all /allole /analyze /mime !scanArg! !delArg! /streams /sub /unzip /report C:\USBVirusScan\McafeeResults.txt
ECHO Mcafee pass complete
) ELSE (
ECHO Skipping Mcafee
)
ECHO.
IF EXIST Panda\Pavcl.exe (
IF %1==clean (
SET delArg=-del
) ELSE (
SET delArg=
)
set scanArg=-heu:2
ECHO Scanning with Panda
START "Panda" /wait /min C:\USBVirusScan\Panda\pavcl.exe %2 -auto -cmp -nos -aex -nob !scanArg! !delArg! -rpt:C:\USBVirusScan\PandaResults.txt
ECHO Panda pass complete
) ELSE (
ECHO Skipping Panda
)
ECHO.
IF EXIST TrendMicro\vscantm.bin (
IF %1==clean (
SET delArg=/d
) ELSE (
SET delArg=/nc
)
set scanArg=/vsgreyarea=[1;2;3;4;5;7;8]
ECHO Scanning with Trend Micro Anti-Virus
START "Trend Micro Anti-Virus" /wait /min C:\USBVirusScan\TrendMicro\vscantm.bin /nbpm /s !delArg! !scanArg! /LR=C:\USBVirusScan\TrendMicroResults.txt %2
ECHO Trend Micro Anti-Virus pass complete
) ELSE (
ECHO Skipping Trend Micro Anti-Virus
)
ECHO.
ECHO.
ECHO All scans have finished
ECHO.
SET VIR1=0
find "Found" C:\USBVirusScan\mcafeeresults.txt >nul
IF %ERRORLEVEL% EQU 0 set /a VIR1+=1
find "Found" C:\USBVirusScan\PandaResults.txt >nul
IF %ERRORLEVEL% EQU 0 set /a VIR1+=1
find "Found 0" C:\USBVirusScan\TrendMicroResults.txt >nul
IF %ERRORLEVEL% EQU 1 set /a VIR1+=1
copy C:\USBVirusScan\McafeeResults.txt + C:\USBVirusScan\PandaResults.txt + C:\USBVirusScan\TrendMicroResults.txt C:\USBVirusScan\SAVRS.txt /y >nul
IF %VIR1%==0 GOTO :NoVirus
ECHO Possible Virus found
eventcreate /l APPLICATION /so SAVRS /t WARNING /id 2 /d "Possible Virus found"
C:\USBVirusScan\postie -host:%SMTPhost% -to:administrator@company.co.uk -cc:%mailto% -from:SAVRS@%computername%.local -s:"%computername% - Virus Found" -nomsg -file:C:\USBVirusScan\SAVRS.txt > nul
REM TYPE C:\USBVirusScan\SAVRS.txt
:NoVirus
ENDLOCAL