
Scanwork.Exe has its own built-in async i/o, but will use a fossil
driver is present.  It does not reset the baud rate in either case
and therefore should be ok with locked ports.  It should also work
with 300, 1200, 2400, 4800, 7200, 12000, 14400, 19200, and 38400 baud.
It recognizes the Door.Sys and/or Dorinfo.Def files created by
OmegaComm/KingNet.

Scanwork first checks to see if the uploaded files truly exist.  Then
this program copies the uploaded files, one by one, out of the uploads
subdirectory to a testing subdirectory.  At the same time it erases the
uploaded file in the uploads subdirectory.  The file is then checked to
see if it is a listed compressed file.  If it is a compressed file the
program upacks the file.  If you have set INFILTO=TRUE in the cnf file,
the program will now move any compressed files recognized (in COMPEXT)
to a second directory where they will be upacked and scanned for viruses.
If the imbedded compressed files are okay, they are repacked with the
new file extension and moved back into the test directory.  If not the
program reports a virus and the entire original file is deleted.  The
program then scans the files in the testing subdirectory for known viruses.  The last step in the process repacks the
files using your preferred file compression program if there was no virus
and transfers them into the uploads subdirectory.  A little ASCII file
called "Tellfile.Rec" is then created listing the scan result code and
the name of renamed file.  This file is read by OmegaComm/KingNet.  If 
the scan result code is a "0" the file is installed for the BBS.

NOTICE:  SCANWORK.EXE, ERASER.EXE, PACK.BAT, PACK2.BAT, UNPACK.BAT, &
         UNPACK2.BAT all go on the maindrive.

                             - SCANWORK.CNF -

VCHECK1=SCAN.EXE C:\TEST /NOMEM /A
VCHECK2=SCAN.EXE C:\TEST2 /NOMEM /A
VE_CODE=0
COMPEXT=.ARC .LZH .PAK .ZIP
PREFEND=.ZIP
INFILTO=TRUE
UPLOADS=C:\UPLOADS
TDRIVE1=C:\TEST
TDRIVE2=C:\TEST2
BBSDRIV=C:\BBS

The first line is the command string and parameters for the virus scan
program you are using(used on the files uploades).  The second line is
the command string and parameters used to check imbedded compressed
within the uploaded file.  Note that you need two test subdirectories
for this feature (test and test2).  The third line is the result code
given by your virus scan program when a file is clean (no virus).  The
fourth line is a list of compressed file extensions that your PACK.BAT
and UNPACK.BAT files will recognize.  The next line is for repacking the
file after is has been scanned.  You can enter NONE here and the file
will be repacked with its original extension or you can specify your
preferred file compression program extension and all compressed files
will be repacked using your favorite program.  In this example, every
compressed file uploaded will be repacked as a ".ZIP" file.  The next
line (INFILTO) refers to imbedded compressed files within a compressed
file.  If you want to unpack and scan them also then set this to TRUE
otherwise set this to FALSE.  Line number 7 is the location of your
uploaded files.  Line 8 is the location of the first test directory
and line 9 is the location of the second test directory.  The last
line is the location of you maindrive (where KingNet.Exe or OmegaCom.Exe
is.


                              - UNPACK.BAT -

ECHO OFF
REM %1 IS THE ARCHIVE FILE EXTENSION.  THERE IS LIMIT TO THE NUMBER OF FILE
REM ARCHIVE PROGRAMS THAT YOU MAY USE.  %2 IS THE COMPRESSED FILE'S NAME.
REM D:\UPLOADS IS WHERE I HAD THE TEST FILES (UPLOADS DIR), C:\BBS IS WHERE I
REM HAD SCANWORK.EXE (MAINDRIVE), AND C:\TEST IS THE TEST SUBDIRECTORY I
REM USED.  IF THE FILE IS NOT A COMPRESSED FILE WE GO TO NOTCOMP.  THIS IS
REM DONE BY CHECKING THE FILE EXTENSION TO SEE IF IT IS LISTED IN THE 
REM COMPEXT= FACTOR IN THE SCANWORK.CNF FILE.
IF %1 == .ARC GOTO ARCE
IF %1 == .PAK GOTO PAKE
IF %1 == .ZIP GOTO ZIPE
IF %1 == .LZH GOTO LZHE
GOTO NOTCOMP
:NOTCOMP
COPY D:\UPLOADS\%2 C:\TEST
ERASE D:\UPLOADS\%2
GOTO ENDER
:ARCE
COPY D:\UPLOADS\%2 C:\TEST
ERASE D:\UPLOADS\%2
CD\TEST
PAK E %2
ERASE %2
CD\BBS
GOTO ENDER
:PAKE
COPY D:\UPLOADS\%2 C:\TEST
ERASE D:\UPLOADS\%2
CD\TEST
PAK E %2
ERASE %2
CD\BBS
GOTO ENDER
:ZIPE
COPY D:\UPLOADS\%2 C:\TEST
ERASE D:\UPLOADS\%2
CD\TEST
PKUNZIP %2
ERASE %2
CD\BBS
GOTO ENDER
:LZHE
COPY D:\UPLOADS\%2 C:\TEST
ERASE D:\UPLOADS\%2
CD\TEST
LHARC E %2
ERASE %2
CD\BBS
GOTO ENDER
:ENDER

                             - UNPACK2.BAT -

ECHO OFF
REM %1 IS THE ARCHIVE FILE EXTENSION.  THERE IS LIMIT TO THE NUMBER OF FILE
REM ARCHIVE PROGRAMS THAT YOU MAY USE.  %2 IS THE COMPRESSED FILE'S NAME.
REM C:\TEST IS WHERE I HAD THE UNPACKED FILES, C:\TEST2 IS WHERE WE WILL
REM MOVE THE IMBEDDED COMPRESSED FILE TO UPACK AND SCAN IT.  C:\BBS IS
REM WHERE I HAD SCANWORK.EXE (MAINDRIVE).
COPY C:\TEST\%2 C:\TEST2
CD\TEST2
IF %1 == .ARC GOTO ARCE
IF %1 == .PAK GOTO PAKE
IF %1 == .ZIP GOTO ZIPE
IF %1 == .LZH GOTO LZHE
GOTO ENDER
:ARCE
PAK E %2
CD\BBS
GOTO ENDER
:PAKE
PAK E %2
CD\BBS
GOTO ENDER
:ZIPE
PKUNZIP %2
CD\BBS
GOTO ENDER
:LZHE
LHARC E %2
CD\BBS
GOTO ENDER
:ENDER

                               - PACK.BAT -

ECHO OFF
REM THIS BAT FILE REPACKS THE NEW FILE WITH A NEW EXTENSION IF REQUESTED
REM AND THE ORIGINAL FILE WAS A COMPRESSED FILE.  IT THEN COPIES IT BACK
REM INTO THE UPLOAD DIRECTORY.  %1 IS THE ARCHIVE FILE EXTENSION.  THERE
REM IS NO LIMIT TO THE NUMBER OF FILE ARCHIVE PROGRAMS THAT YOU MAY USE.
REM %2 IS THE COMPRESSED FILE'S NAME.  D:\UPLOADS IS WHERE I HAD THE TEST
REM FILES (UPLOADS DIR), C:\BBS IS WHERE I HAD SCANWORK.EXE (MAINDRIVE),
REM AND C:\TEST IS THE TEST SUBDIRECTORY I USED.  IF THE FILE IS NOT
REM COMPRESSED WE GO TO NOTCOMP.  THIS IS DONE BY CHECKING TO SEE IF THE
REM FILE EXTENSION IS IN THE COMPEXT= FACTOR IN THE SCANWORK.CNF FILE.
IF %1 == .ARC GOTO ARCP
IF %1 == .PAK GOTO PAKP
IF %1 == .ZIP GOTO ZIPP
IF %1 == .LZH GOTO LZHP
GOTO NOTCOMP
:NOTCOMP
COPY C:\TEST\%2%1 D:\UPLOADS
GOTO ENDER
:ARCP
CD\TEST
PAK A %2%1
COPY %2%1 D:\UPLOADS
CD\BBS
GOTO ENDER
:PAKP
CD\TEST
PAK A %2%1
COPY %2%1 D:\UPLOADS
CD\BBS
GOTO ENDER
:ZIPP
CD\TEST
PKZIP %2%1
COPY %2%1 D:\UPLOADS
CD\BBS
GOTO ENDER
:LZHP
CD\TEST
LHARC A %2%1
COPY %2%1 D:\UPLOADS
CD\BBS
GOTO ENDER
:ENDER

                               - PACK2.BAT -

ECHO OFF
REM THIS BAT FILE REPACKS THE IMBEDDED FILE WITH A NEW EXTENSION IF
REM REQUESTED.  IT THEN COPIES IT BACK INTO THE TEST DIRECTORY.  %1
REM IS THE ARCHIVE FILE EXTENSION.  THERE IS NO LIMIT TO THE NUMBER 
REM OF FILE ARCHIVE PROGRAMS THAT YOU MAY USE. %2 IS THE COMPRESSED
REM FILE'S NAME.  C:\TEST IS WHERE I HAD THE TEST FILES, C:\BBS IS
REM WHERE I HAD SCANWORK.EXE (MAINDRIVE), AND C:\TEST2 IS THE SECOND
REM TEST DIRECTORY NEEDED TO TEST AND REPACK THE IMBEDDED FILES.
IF %1 == .ARC GOTO ARCP
IF %1 == .PAK GOTO PAKP
IF %1 == .ZIP GOTO ZIPP
IF %1 == .LZH GOTO LZHP
GOTO ENDER
:ARCP
CD\TEST2
PAK A %2%1
CD\BBS
GOTO ENDER
:PAKP
CD\TEST2
PAK A %2%1
COPY %2%1 C:\TEST
CD\BBS
GOTO ENDER
:ZIPP
CD\TEST2
PKZIP %2%1
COPY %2%1 C:\TEST
CD\BBS
GOTO ENDER
:LZHP
CD\TEST2
LHARC A %2%1
COPY %2%1 C:\TEST
CD\BBS
GOTO ENDER
:ENDER

I sincerely hope these instructions are clear and you have good experience
with the virus scan routines.

Larry
June 18, 1991



