ZIPLAB2.BAT

12.7 KB 4e71e48975b7bcb3…
ANSI art: ZIPLAB2.BAT
@echo off
REM ** PCBTest ZIP Laboratory II
REM ** (C)1990 by Jeffrey S. Morley
REM ** Change all "Proecho 1" to "Proecho 1" for COM1:
REM ** Change paths to match your system

proecho 1 
proecho 1 ~┌───────────┐~
proecho 1 │    ███    │~
proecho 1 │ ▄▄▄███▄▄▄ │  Welcome to -YOUR NAME HERE- BBS .ZIP Lab!~
proecho 1 │ ▀▀▀███▀▀▀ │  ─────────────────────────────────────────~
proecho 1 │    ███    │      ZIP Lab II - "Revenge of ZIP Lab"    ~
proecho 1 └───────────┘~


if not exist %1 goto NoFile

nameonly %1
call nameonly.bat
if exist nameonly.bat del nameonly.bat

proecho 1 ~The file(s) you uploaded will now undergo very extensive testing for

proecho 1 ~my users' safety.  Please be patient, this will be a minute...  Do NOT
  
proecho 1 ~drop carrier during the testing.  The file(s) will not be posted if you
 
proecho 1 ~do, and no upload credit will be awarded.  Thanks...~

standby 3

proecho 1 
proecho 1                                                                               ~
proecho 1                                                                               ~
proecho 1                                                                               ~
proecho 1                                                                               ~
proecho 1 

proecho 1 
proecho 1 ┌────────────────────────────────────────────────────────────────────────────┐~
proecho 1 │ Status of .ZIP Lab testing                                                 │~
proecho 1 ├────────────────────────────────────────────────────────────────────────────┤~
proecho 1 │         CRC check of .ZIP file:                                            │~
proecho 1 │            Embedded .TD0 files:                                            │~
proecho 1 │            Embedded .ZIP files:                                            │~
proecho 1 │          Virus checking (SCAN):                                            │~
proecho 1 │          Removing ZIP comments:                                            │~
proecho 1 │           Removing advertising:                                            │~
proecho 1 │            Testing age (1988+):                                            │~
proecho 1 └────────────────────────────────────────────────────────────────────────────┘

proecho 1 
               
proecho 1 ┌────────────────────────────────────────────────────────────────────────────┐~
proecho 1 │                                                                            │~
proecho 1 └────────────────────────────────────────────────────────────────────────────┘~

proecho 1 Subject file:
proecho 1  %TESTFILE

proecho 1 
proecho 1 ┌────────────────────────────────────────────────────────────────────────────┐~
proecho 1 │                                                                            │~
proecho 1 └────────────────────────────────────────────────────────────────────────────┘~

proecho 1 Current test:

:zip
if exist pcbfail.txt del pcbfail.txt
proecho 1 
proecho 1 CRC errors using PKUNZIP.EXE
pkunZIP -t %1 >pcbfail.txt

if errorlevel 1 goto badupload
if exist pcbfail.txt del pcbfail.txt

proecho 1 
proecho 1 %TESTFILE contains no errors.

:CHKTD0
proecho 1 
proecho 1 Looking for embedded .TD0 files in %TESTFILE
chkinzip %1 .TD0
if NOT errorlevel 1 goto NoTD0

proecho 1 
proecho 1 Teledisk .TD0 file detected, testing with TDCHECK...~
pkunzip %1 *.td0 c:\pktmp >NUL
c:\copypc\tdcheck c:\pktmp\*.td0 >pcbfail.txt
if errorlevel 1 goto BadTD0

if exist c:\pktmp\*.td0 del c:\pktmp\*.td0
if exist pcbfail.txt del pcbfail.txt
proecho 1 
proecho 1 .TD0 file contains no errors.~
goto CHKZIP

:NoTD0
proecho 1 
proecho 1 None detected.

:CHKZIP

proecho 1 
proecho 1 Looking for embedded .ZIP files in %TESTFILE
chkinzip %1 .ZIP
if NOT errorlevel 1 goto NoZIP

proecho 1 
proecho 1 Testing embedded .ZIP(s) for errors...
pkunzip %1 *.ZIP c:\pktmp >NUL
pkunzip -t c:\pktmp\*.zip >pcbfail.txt

if errorlevel 1 goto badupload
if exist pcbfail.txt del pcbfail.txt

proecho 1 
proecho 1 Embedded .ZIP file(s) contain no errors.
if exist c:\pktmp\*.* delf c:\pktmp\*.*
goto scan

:NoZIP
proecho 1 
proecho 1 None detected.

:scan
proecho 1 
proecho 1 Using SCANV to test for Virus infection...                  ~
if exist c:\pktmp\*.* delf c:\pktmp\*.* >NUL
pkunzip -o %1 c:\pktmp *.exe >NUL
pkunzip -o %1 c:\pktmp *.com >NUL
scan c:\pktmp  >NUL
if errorlevel 2 goto NoScan
if errorlevel 1 goto Virus
if exist c:\pktmp\*.* delf c:\pktmp\*.* >NUL

proecho 1 
proecho 1 No virus infection detected.

proecho 1 
proecho 1 Removing ZIP comments from %TESTFILE         ~
recom -o %1 >NUL

proecho 1 
proecho 1 Comments have been removed.

proecho 1 
proecho 1 Removing known BBS advertising files...       ~
chkinzip %1 arunme.com
if errorlevel 1 pkzip -d %1 arunme.com >NUL
chkinzip %1 poboxinc.com
if errorlevel 1 pkzip -d %1 poboxinc.com >NUL
chkinzip %1 hstsale!.com
if errorlevel 1 pkzip -d %1 hstsale!.com >NUL
chkinzip %1 readnow!.com
if errorlevel 1 pkzip -d %1 readnow!.com >NUL
chkinzip %1 darkside.com
if errorlevel 1 pkzip -d %1 darkside.com >NUL

proecho 1 
proecho 1 Advertising removed.

proecho 1 
proecho 1 Program age constraint = 1988 or newer
testage %1 1988 d:\hold
if errorlevel 1 goto baddates

if exist pcbfail.txt del pcbfail.txt
proecho 1 
proecho 1 All files are 1988 or newer.              ~
goto end

:baddates
proecho 1 
proecho 1 ┌────────────────────────────────────────────────────────────────────────────┐~
proecho 1 │ File older than desired minimum (1988)!                                    │~
proecho 1 ├────────────────────────────────────────────────────────────────────────────┤~
proecho 1 │                                                                            │~
proecho 1 │ One or more of the members of the .ZIP file are older than 1988.           │~
proecho 1 │ I will move this .ZIP file offline for evaluation by the SysOp.            │~
proecho 1 │                                                                            │~
proecho 1 │ Please do NOT upload files older than 1988.                                │~
proecho 1 │                                                                            │~
proecho 1 │ File will not be posted, no upload credit awarded.                         │~
proecho 1 └────────────────────────────────────────────────────────────────────────────┘~
echo There is a problem with %1 >pcbfail.txt
if exist %1 copy %1 d:\hold >NUL
if exist %1 del %1
goto end

:badupload
proecho 1 
proecho 1 ┌────────────────────────────────────────────────────────────────────────────┐~
proecho 1 │ File has failed the CRC checking of PKUNZIP!                               │~
proecho 1 ├────────────────────────────────────────────────────────────────────────────┤~
proecho 1 │                                                                            │~
proecho 1 │ The uploaded file has failed the CRC checking of PKUNZIP.                  │~
proecho 1 │ I will move this .ZIP file offline for evaluation by the SysOp.            │~
proecho 1 │                                                                            │~
proecho 1 │ You should check the file at your end, before uploading elsewhere.         │~
proecho 1 │                                                                            │~
proecho 1 │ File will not be posted, no upload credit awarded.                         │~
proecho 1 └────────────────────────────────────────────────────────────────────────────┘~
echo There is a problem with %1 >pcbfail.txt
if exist %1 copy %1 d:\hold > NUL
if exist %1 del %1
goto end

:badTD0
if exist c:\pktmp\*.td0 del c:\pktmp\*.td0
proecho 1 
proecho 1 ┌────────────────────────────────────────────────────────────────────────────┐~
proecho 1 │ Embedded .TD0 file has failed checking with TDCHECK.EXE                    │~
proecho 1 ├────────────────────────────────────────────────────────────────────────────┤~
proecho 1 │                                                                            │~
proecho 1 │ The uploaded file has failed TD0 checking with TDCHECK.                    │~
proecho 1 │ I will move this .ZIP file offline for evaluation by the SysOp.            │~
proecho 1 │                                                                            │~
proecho 1 │ You should check the file at your end, before uploading elsewhere.         │~
proecho 1 │                                                                            │~
proecho 1 │ File will not be posted, no upload credit awarded.                         │~
proecho 1 └────────────────────────────────────────────────────────────────────────────┘~
echo There is a problem with %1 >pcbfail.txt
if exist %1 copy %1 d:\hold
if exist %1 del %1
goto end

:NoScan
proecho 1 
proecho 1 ┌────────────────────────────────────────────────────────────────────────────┐~
proecho 1 │ ***** UNABLE TO SCAN FILE! *****                                           │~
proecho 1 ├────────────────────────────────────────────────────────────────────────────┤~
proecho 1 │                                                                            │~
proecho 1 │ I was unable to SCAN this file for virus infection.                        │~
proecho 1 │ I will move this .ZIP file offline for evaluation by the SysOp.            │~
proecho 1 │                                                                            │~
proecho 1 │ You should check the file at your end, before uploading elsewhere.         │~
proecho 1 │                                                                            │~
proecho 1 │ File will not be posted, no upload credit awarded.                         │~
proecho 1 └────────────────────────────────────────────────────────────────────────────┘~
echo There is a problem with %1 >pcbfail.txt
if exist %1 copy %1 d:\hold
if exist %1 del %1
goto end

:Virus
proecho 1 
proecho 1 ┌────────────────────────────────────────────────────────────────────────────┐~
proecho 1 │ ***** A VIRUS WAS DETECTED! *****                                          │~
proecho 1 ├────────────────────────────────────────────────────────────────────────────┤~
proecho 1 │                                                                            │~
proecho 1 │ A VIRUS WAS DETECTED IN THIS .ZIP FILE!                                    │~
proecho 1 │ This transaction has been recorded in VIRUS.LOG for the SysOp.             │~
proecho 1 │                                                                            │~
proecho 1 │ ***** DO NOT UPLOAD THIS FILE TO ANY OTHER BBS SYSTEM! *****               │~
proecho 1 │ I recommend that you do NOT run this program on your computer.             │~
proecho 1 │ File will not be posted, no upload credit awarded.                         │~
proecho 1 └────────────────────────────────────────────────────────────────────────────┘~
echo VIRUS DETECTED! >C:\TEMP\VIRUS.LOG
echo Virus found in %1 >>C:\TEMP\VIRUS.LOG
echo There is a problem with %1 >pcbfail.txt
if exist %1 del %1
goto end

:NoFile
proecho 1 ~%1 was not recieved.  
goto out

:end
proecho 1 
proecho 1 Leaving the lab, thanks for uploading!    
proecho 1 ~

:out