home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
UPCHECK
/
SFCHKUP.ZIP
/
SFCHKUP.DOC
< prev
next >
Wrap
Text File
|
1994-02-19
|
20KB
|
379 lines
SFCHKUP
Version 2.5b
Copyright (C) by Mike Woltz, 1992-1994
Buffalo Creek Software
INTRODUCTION
------------
SFCHKUP is a utility which is designed to evaluate the integrity
of files uploaded by callers to a SPITFIRE BBS. It is utilized at
the beginning of the SFINIT.BAT file which is run immediately after
a caller logs off the BBS. Due to the fact that SFCHKUP is written
in Assembler, it takes up very little disk space and runs quickly.
REQUIRED FILES
--------------
SFCHKUP.EXE is provided along with a sample batch file that is
used during processing. This file MUST be named CHKUP.BAT. A sample
SFCHKUP.MSG file is also provided which must reside in the SPITFIRE
HOME Directory (if used). The use of this optional file is described
below. In addition, several other files are utilized during SFCHKUP
processing. These normally include MUV and DELXCEPT (MUV*.ZIP and
DELXCEPT.ZIP) which are available via Buffalo Creek's BBS (515-225-8496).
Other files may be used at the Sysop's discretion and depend upon the
way the CHKUP.BAT is set-up.
CONFIGURATION OF SFCHKUP
------------------------
SFCHKUP.EXE and CHKUP.BAT must be placed in the SPITFIRE HOME
directory (which is where SPITFIRE.EXE is located.) To configure
SFCHKUP, execute it per the below example:
C>SFCHKUP /CONFIG
You are first prompted for the Upload File Path. This is the
drive and directory where the uploaded file(s) are stored once the
caller sends them. (In other words, the uploaded file is placed in
this directory prior to performing any testing. This could be
considered a temporary "holding tank" for the file prior to performing
any testing. This should not be a SPITFIRE download directory, since
you do not want to make the file available for download until all
testing has been completed and it has successfully passed the tests.
For this example, we will use C:\CHKUP1 as the Upload File Path for
Node 1. Each Node MUST have its own CHKUP directory, and would normally
be named \CHKUP1, \CHKUP2, etc. This makes it possible for SFCHKUP
to run on a SPITFIRE BBS that has the maximum number of possible
nodes, which is 255.
You will next be prompted for the File Area Path which is the
destination path of all files which successfully complete SFCHKUP's
evaluation. This is the drive and directory where the file will
be placed after the testing process. Normally, this will be
a download path configured in your SPITFIRE File Area records.
We will call this path C:\UPLOADS for our example.
Once these paths are provided, SFCHKUP will search the drives
configured to see if they exist. If not, SFCHKUP will create them.
Once you have configured the paths used by SFCHKUP, you will be
prompted as to whether you wish to Utilize the FILE_ID.DIZ feature
of SFCHKUP. Many shareware files now contain a small file titled
FILE_ID.DIZ which provides a brief description of the files contained
within the ZIP. If you respond with a Y to Utilize the FILE_ID.DIZ
the description contained in the FILE_ID.DIZ will be used, provided
it exists, as the SFFILES.BBS file description. The file description
keyed in by the caller who uploaded the file will be ignored. If
FILE_ID.DIZ is not found, the description keyed in by the caller
will be used. Regardless of how you have configured single/multi
line file descriptions in SPITFIRE, if this option is set to Y
SFCHKUP will write up to 4 lines of description. Turbo Pascal
limits the characters per line to maximum of 255 characters.
SFCHKUP will use as much of the FILE_ID.DIZ as possible, staying
within this limitation. This is true even if you have configured
SPITFIRE to use single line file descriptions.
Next, you are prompted as to whether you wish to save the changes.
The final prompt asks whether you would like your SFFAREA.DAT to be
refreshed. By responding with a [Y]es, the Upload File Path in ALL
the SPITFIRE File Area records for this node will be configured to the
drive and directory you have selected as your Upload File Path. (If
you are following the example here, this would be C:\CHKUP1.) A file
called SFCHKUP.DAT will store this information in the SPITFIRE HOME
directory. Each node will have a unique SFCHKUP.DAT file.
If ever these paths need to be changed, run SFCHKUP /CONFIG and
you will once again be able to configure them.
CONFIGURATION OF CHKUP.BAT
--------------------------
CHKUP.BAT contains a set of instructions that are carried out
during the proceedings of the use of SFCHKUP. It can run many other
programs and other batch files which will process uploaded files in
various ways. Since there is no way to know which ones will be used
by Sysops, they will not be discussed in detail here. Buffalo Creek
Software will not be responsible for their use or support.
A sample CHKUP.BAT is provided for you to use as an example
when you are setting up SFCHKUP.EXE. The CHKUP.BAT included in
this package is simply designed to convert an uploaded ARC file to
ZIP format, check the integrity of an uploaded ZIP file, SCAN the
contents of the uploaded file for known viruses, and add the board's
unique comment to the ZIP file. Finally, CHKUP.BAT processes the
uploaded file(s), depending on whether the file passed the testing
routines successfully. (An explanation of the sample CHKUP.BAT is
discussed in detail in CHKUPBAT.DOC.)
It should be noted, that for those Sysops who prefer to include
more complex checking routines, CHKUP.BAT is only limited by the
Sysops ability to expand the batch file to accomplish the desired
tasks. Other functions of the CHKUP.BAT might include converting
files compressed using the LZH, LHA, or PAK format, testing the
integrity of GIF files, or completely ignore all processing for
files with a specific extension, such as .TXT. (There are more
complex CHKUP.BAT files available for download from Buffalo Creek's
BBS.)
It is necessary to edit CHKUP.BAT to your specifications. You
will need to configure the drive and directories it references to
match the setup for your system. If you utilize any or all of the
other programs referenced therein, you will need to obtain them,
configure them, and modify your CHKUP.BAT so it points to the
appropriate path where these utilities are located on your system.
(Buffalo Creek Software strongly recommends that the full path be used
in the command line when executing these programs. It is possible for
the uploaded file you are checking to contain the same utility program
you are calling to check and verify the upload. In such an instance,
DOS would default to using the utility in the current directory, and
the unchecked program might contain errors or it might perform some
undesired task such as erasing your root directory (just an example).
CHKUP.BAT normally creates a work directory (C:\CHKUP1\CHKWORK
for example) during processing and deletes it when its work is
complete. Uploaded files are moved there for evaluation, processed
there and then moved to another location afterwards.
RUNNING SFCHKUP
---------------
SFCHKUP is written to honor file sharing, and as such, may be
run on more than one node of a multinode SPITFIRE BBS simultaneously.
Each node will require its own CHKUP path and its own CHKUP.BAT.
SFCHKUP is designed to be run at the BEGINNING of SFINIT.BAT,
especially on multinode SPITFIRE BBSs. For example, the first couple
of lines in your SFINIT.BAT should look like the below example:
@Echo Off
SFCHKUP %1
WARNING!!! ONLY use the %1 command line parameter when SFCHKUP is
being executed from within the SFINIT.BAT file and ONLY when the
SFINIT.BAT is being executed by SPITFIRE. SPITFIRE passes the
record number (record number in SFUSERS.DAT) of the last caller to
SFINIT.BAT. This number can then be passed to SFCHKUP by use of the
%1 command line parameter. This is done so SFCHKUP doesn't have to
look through the entire SFUSERS.DAT file to determine who the last
call was. Extremely serious problems can result in the event you
use the %1 command line parameter in any other way. For example,
SPITFIRE does not execute the SFINIT.BAT file when being operated
under a frontend program thus causing the need for SFCHKUP to be run
from the frontend batch used to execute SPITFIRE. In such case, %1
means something totally different to that batch file than it does to
SFINIT.BAT when executed by SPITFIRE.
Buffalo Creek Software recommends that SFCHKUP be run immediately
after the caller logs off (first command in the batch file used to
execute SFCHKUP). Take care to make sure to run SFCHKUP first!
It is entirely up to you, the Sysop, how you utilize SFCHKUP
and its associated CHKUP.BAT file. You can make it as simple or as
elaborate as you please. Sysops who devise a unique methodology are
encouraged to share it with the rest of the SPITFIRE BBS community
by posting it in a message or uploading it to Buffalo Creek's BBS!
A short discussion of suggested ways that files may be processed
follows. You are not required to process your files in the ways
described and you are free to run other tests in addition to or in
place of the ones described.
EVALUATING FILES WITH CHKUP.BAT
-------------------------------
In most cases, all files uploaded will be evaluated by SFCHKUP.
The phase of evaluation can be configured to be skipped if you'd
rather NOT process a file. You might want to post say *.TXT files
as is and feel that there is no need to perform any tests on them.
If this is the case, simply write your CHKUP.BAT file to check for
this type file's existence (IF EXIST *.TXT...) and then skip the
processing entirely. The file would then be posted exactly as it
was uploaded to the BBS. Similarly, you could elect not to process
*.BBS/*.CLR files, etc.
You could configure CHKUP.BAT to check for files that you would
rather not be contained within the file such as known BBS ads,
PKUNZIP.EXE/PKZIP.EXE, COMMAND.COM, etc. By using a statement such
as IF EXIST <filename.ext> DEL <filename.ext>, these files can be
eliminated from the file. When SFCHKUP's work is done, it will
correctly update the SFFILES.BBS in the configured Upload File Path
with the file's FINAL size.
A utility designed to check for so-called Computer Viruses can
be run as part of the evaluation. In our example, McAfee's VIRUSCAN
is used. SCAN.EXE and similar utilities exit with a DOS ERRORLEVEL
based upon the results of the evaluation. Our CHKUP.BAT shows that
an errorlevel of 0 indicates a file with good integrity while a file
with an errorlevel of 1 indicates a questionable file. Questionable
files can be sent to a holding directory (ex. C:\BADCHKUP) for later
scrutiny (accomplished by two IF ERRORLEVEL...GOTO... statements)
or deleted entirely. IMPORTANT NOTE: SPITFIRE requires about 230K
of memory, SFCHKUP requires about 64K or and the current version of
SCAN requires approximately 330K of memory (whew), thus, your system
may run out of memory when SCAN is executed. In case, you may want
to utilize SCAN with some other virus test program or use an
alternative means of operating SFCHKUP.
Another utility can be used to check uploaded *.GIF files. For
example, GIFTEST.EXE can be used. Since GIFTEST also exits with a
DOS ERRORLEVEL, careful editing of the CHKUP.BAT file can allow you
to delete the file if it has poor integrity or is at a resolution
that you do not support on your BBS (say for example, 321x201x16)
or save it in the holding directory.
ZIP Comments found in uploaded files can be removed and replaced
with that of your BBS after they have completed evaluation. There
are quite a number of recommenting utilities (ex. RECOM.EXE) that
can be used to accomplish this.
Files that have been compressed with schemes other than the one
you are using on your BBS can be converted (to PKZIP with a utility
such as TOZIP.EXE.) Remember that SPITFIRE will ONLY support online
viewing of the contents of files compressed with PKZIP, though!
The above overview is brief by design. It is STRONGLY
recommended that you thoroughly read through the documentation of
each and every utility used in conjunction with SFCHKUP.
SFCHKUP PROCESSING
------------------
SFCHKUP will only process one uploaded file at a time. When
SFCHKUP is initiated, it begins by checking to see if any files
exist in the path that you have configured as the Upload File
Path.
If a file (or files) is (are) found in the configured Upload File
Path, SFCHKUP passes the first file name it reads to CHKUP.BAT. SFCHKUP
then shells and your CHKUP.BAT is invoked to complete the processing
commands you have included in this batch file.
When CHKUP.BAT completes processing, control is returned to SFCHKUP.
At this time, SFCHKUP checks to see if the file exists in the Upload File
Path. If so, SFCHKUP assumes that the file has passed all the required
tests. The file is then moved to the drive and directory that you have
configured as the File Area Path. If the file is not found, SFCHKUP
assumes that the file did not pass the required tests and the statistics
of the caller who uploaded the file are adjusted accordingly.
SFCHKUP will then check to see if any other files remain in the
configured Upload File Path. If so, it will repeat the process until
no other files are found. When no other files are found, the work
directory is deleted and control is returned to SFINIT.BAT
AFTER RUNNING SFCHKUP
---------------------
If files are not posted as a result of failing one of the
integrity evaluation procedures, SFCHKUP will adjust the caller's
upload credits and K of upload credits accordingly subsequent to
completing evaluation of all files. In addition, SFCHKUP.MSG (which
must reside in the SPITFIRE HOME directory if used) will be copied
to XXX.BBS where XXX is the number of the caller who uploaded the
questionable file as contained in the SPITFIRE users database. The
filename will be appended to SFCHKUP.MSG. If there already exists a
XXX.BBS for that caller, SFCHKUP will append its data to it. In
addition, a notation is made to HEYSYSOP.LOG to notify the Sysop
that a questionable file has been received, its name and the name of
the caller who uploaded it.
All uploaded files with good integrity will then be moved to the
Upload File Area Path that you have configured. The SFFILES.BBS in
that area will be appended to with the final names, file sizes and
descriptions of all acceptable files. Finally, the work directory
will be removed and control will be returned to SFINIT.BAT.
SPECIAL FEATURE
---------------
SFCHKUP performs a very special test on uploaded .ZIP files
which (according to all information available to Mike Woltz) is
not performed by any other program in the world. While there are
those who would believe that there is nothing wrong with providing
board-crashing information to every looney-tune in the world, Buffalo
Creek Software does NOT believe publicly discussing this kind of
information is proper. Therefore, details on this particular test
will not be disclosed. However, suffice it to say, Buffalo Creek
Software STRONGLY suggests that every SPITFIRE Sysop use SFCHKUP to
perform this test regardless of whether SFCHKUP is used for anything
else.
DISTRIBUTION
------------
SFCHKUP is distributed under the shareware concept. You are
free to distribute the SFCHKUP program as long as it remains
unmodified and no fee is charged. If you continue to use this
program after an adequate evaluation period, a fee is required.
A $1.00 registration fee is required to register SFCHKUP. This
can be sent to:
Buffalo Creek Software
ATTN: Mike Woltz
913 39th Street
West Des Moines, Iowa 50265
DISCLAIMER
----------
Mike Woltz and/or Buffalo Creek Software shall in no way be
held responsible for any damage incurred while operating SFCHKUP.
All other programs used in conjunction with SFCHKUP are Copyright by
their respective authors and may not be products of Buffalo Creek
Software. All responsibility lies with the user of the software.
The shareware version of SPITFIRE and other SPITFIRE utilities
are available for download from:
Buffalo Creek's BBS
Mike Woltz, Sysop
(515) 225-8496
38400/19200/9600/2400/1200 Baud
REVISION 2.2 - April 10, 1993 - In addition to testing for valid
file names, SFCHKUP now tests a .ZIP file for 'ANSI bombs'.
REVISION 2.3 - June 12, 1993 - SFCHKUP tests the file names within
a .ZIP file for 'ANSI bombs' and for valid file names. A forward
slash "/" is not a valid character in a file name so when a forward
slash was found, SFCHKUP would asssume the .ZIP file had been tampered
with and would erase it. The problem is (was) that when a .ZIP file
is created which recurses and stores the sub-directory, PKZIP places
a forward slash between the directory name and the file name. In such
case, SFCHKUP would assume the file had been tampered with and would
erase the file. To correct this situation, SFCHKUP has been changed
to allow a forward slash in the file name. Additionally, the sample
CHKUP.BAT file (included in the SFCHKUP package) has been changed to
so that .ZIP files within .ZIP (regardless of how deep 'so to speak')
will be tested. This change (in the CHKUP.BAT) also retains the
original .ZIP file thereby retaining the 'authenticity verification'
to be retained when present.
In the event you are upgrading, you simply need to overwrite your
current copy of SFCHKUP.EXE with the new copy of SFCHKUP.EXE.
REVISION 2.4 - July 4, 1993 - SFCHKUP was not proper adjusting a
caller's K-Bytes uploaded when an uploaded file failed the performed
tests. This problem was fixed.
REVISION 2.5 - October 29, 1993 - SFCHKUP was changed to properly test
for a ASCII 26 (^Z) at the end of the SFFILES.BBS to be appended.
REVISION 2.5a - November 20, 1993 - Small bug fix regarding appending
text files.
REVISION 2.5b - February 19, 1994 - A problem would occur when SFCHKUP
attempted to update an SFFILES.BBS if the SFFILES.BBS was 0 bytes. This
problem was fixed.