home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR14
/
VIRCHEK2.ZIP
/
VIRCHECK.BTM
< prev
next >
Wrap
Text File
|
1993-07-27
|
4KB
|
137 lines
@rem -- VIRCHECK.BTM v2.0a
@rem -- Validates archive, performs virus check and comments
@rem -- ZIP and ARJ files automatically!
@rem -- Jointly developed by Gary Weinfurther (1:120/301)
@rem -- and Gary Gilmore (1:2410/400)
@rem -- This version for 4DOS users ONLY! You also need ZC.BTM!
SETLOCAL
rem ───────────────────────────────────────
rem Make sure the VIRUS directory exists
rem ───────────────────────────────────────
IF NOT ISDIR \VIRUS md \VIRUS
IF NOT ISDIR \VIRUS\UL MD \VIRUS\UL
CD \VIRUS\UL
rem ───────────────────────────────────────────────────────────
rem Move the contents of the upload to the unzipping directory
rem ───────────────────────────────────────────────────────────
ECHO.>COM1
ECHO Now processing %2%3... >COM1
IFF "%3" == ".ZIP" THEN
ECHO UnZipping... >COM1
pkunzip -o %1%2%3
IF ERRORLEVEL 1 GOTO Corrupt
ELSEIFF "%3" == ".ARJ" THEN
ECHO Extracting... >COM1
arj e -n -y %1%2%3
IF ERRORLEVEL 1 GOTO Corrupt
ELSEIFF "%3" == ".LZH" THEN
ECHO Melting... >COM1
lha e /m %1%2%3
IF ERRORLEVEL 1 GOTO Corrupt
ELSEIFF "%3" == ".ZOO" THEN
ECHO Oozing... >COM1
zoo e %1%2%3
IF ERRORLEVEL 1 GOTO Corrupt
ELSEIFF "%3" == ".ARC" THEN
rem ARC FILES NOT ALLOWED
del %1%2%3
copy %4NO_ARCS.BBS %4FILE_BAD.BBS
GOTO End
ELSEIFF "%3" == ".BAT" THEN
rem BAT FILES NOT ALLOWED
del %1%2%3
copy %4NO_BATS.BBS %4FILE_BAD.BBS
GOTO End
ELSEIFF "%3" == ".PAK" THEN
rem PAK FILES NOT ALLOWED
del %1%2%3
copy %4NO_PAKS.BBS %4FILE_BAD.BBS
GOTO End
ELSEIFF "%3" == ".CPT" THEN
copy %4FILE_MA.BBS %4FILE_OK.BBS
GOTO End
ELSEIFF "%3" == ".SEA" THEN
copy %4FILE_MA.BBS %4FILE_OK.BBS
GOTO End
ELSEIFF "%3" == ".SIT" THEN
copy %4FILE_MA.BBS %4FILE_OK.BBS
GOTO End
ELSE
XCOPY %1%2%3
ENDIFF
rem ───────────────────────────────────────
rem Scan the contents for a virus
rem ───────────────────────────────────────
ECHO Scanning...>COM1
copy %4FILE_IB.BBS %4FILE_OK.BBS
SCAN \VIRUS\UL /A /NOMEM /NOPAUSE /HISTORY C:\VIRUS\VSCAN.LOG
IFF ERRORLEVEL 2 THEN
rem ────────────────────────────────────
rem Virus scan abnormally aborted
rem ────────────────────────────────────
move %1%2%3 \virus
copy %4FCORRUPT.BBS %4FILE_BAD.BBS
ECHO ERROR while scanning %2%3. The Sysop has been informed.>COM1
ECHO ╔══════════════╗>> \virus\virus.log
ECHO ║ Virus Log ║>> \virus\virus.log
ECHO ╚══════════════╝>> \virus\virus.log
ECHO ────────────────────────────────────────────────────────>> \virus\virus.log
ECHO ERROR while scanning %2%3>>\virus\virus.log
ECHO. >> \virus\virus.log
ECHO SCAN.EXE reports the following: >> \virus\virus.log
ECHO ────────────────────────────────────────────────────────>> \virus\virus.log
ECHO. >> \virus\virus.log
type c:\virus\vscan.log >> c:\virus\virus.log
del c:\virus\vscan.log
makemsg -X\max\virusmsg.cfg
del c:\virus\virus.log
ELSEIFF ERRORLEVEL 1 THEN
rem ────────────────────────────────────
rem A virus was found
rem ────────────────────────────────────
move %1%2%3 \virus
copy %4FVIRUS.BBS %4FILE_BAD.BBS
ECHO ╔══════════════╗>> \virus\virus.log
ECHO ║ Virus Log ║>> \virus\virus.log
ECHO ╚══════════════╝>> \virus\virus.log
ECHO ────────────────────────────────────────────────────────>> \virus\virus.log
ECHO *** VIRUS FOUND in %2%3 *** >> \virus\virus.log
ECHO. >> \virus\virus.log
ECHO SCAN.EXE reports the following: >> \virus\virus.log
ECHO ────────────────────────────────────────────────────────>> \virus\virus.log
ECHO. >> \virus\virus.log
type c:\virus\vscan.log >> c:\virus\virus.log
del c:\virus\vscan.log
makemsg -X\max\virusmsg.cfg
del c:\virus\virus.log
ELSE
rem ────────────────────────────────────
rem SUCCESS! Insert archive comment.
rem ────────────────────────────────────
IF "%3" == ".ZIP" .OR. "%3" == ".ARJ" call zc %1%2%3
ENDIFF
GOTO End
rem ───────────────────────────────────────
rem Archive is corrupted
rem ───────────────────────────────────────
:Corrupt
del %1%2%3
copy %4FCORRUPT.BBS %4FILE_BAD.BBS
GOTO End
rem ────────────────────────────────────
rem All done - Clean up
rem ────────────────────────────────────
:End
del /Y /Q \virus\ul
del c:\virus\vscan.log