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 >
Text File  |  1994-02-19  |  20KB  |  379 lines

  1.                                 SFCHKUP
  2.                               Version 2.5b
  3.                  Copyright (C) by Mike Woltz, 1992-1994
  4.                          Buffalo Creek Software
  5.     
  6.  
  7.     INTRODUCTION
  8.     ------------
  9.  
  10.        SFCHKUP is a utility which is designed to evaluate the integrity
  11.     of files uploaded by callers to a SPITFIRE BBS. It is utilized at
  12.     the beginning of the SFINIT.BAT file which is run immediately after
  13.     a caller logs off the BBS. Due to the fact that SFCHKUP is written
  14.     in Assembler, it takes up very little disk space and runs quickly.
  15.     
  16.  
  17.     REQUIRED FILES
  18.     --------------
  19.  
  20.        SFCHKUP.EXE is provided along with a sample batch file that is
  21.     used during processing. This file MUST be named CHKUP.BAT. A sample
  22.     SFCHKUP.MSG file is also provided which must reside in the SPITFIRE
  23.     HOME Directory (if used). The use of this optional file is described
  24.     below. In addition, several other files are utilized during SFCHKUP
  25.     processing. These normally include MUV and DELXCEPT (MUV*.ZIP and
  26.     DELXCEPT.ZIP) which are available via Buffalo Creek's BBS (515-225-8496).
  27.     Other files may be used at the Sysop's discretion and depend upon the
  28.     way the CHKUP.BAT is set-up.
  29.  
  30.  
  31.     CONFIGURATION OF SFCHKUP
  32.     ------------------------
  33.  
  34.        SFCHKUP.EXE and CHKUP.BAT must be placed in the SPITFIRE HOME
  35.     directory (which is where SPITFIRE.EXE is located.) To configure
  36.     SFCHKUP, execute it per the below example:
  37.  
  38.     C>SFCHKUP /CONFIG
  39.     
  40.         You are first prompted for the Upload File Path.  This is the 
  41.     drive and directory where the uploaded file(s) are stored once the 
  42.     caller sends them. (In other words, the uploaded file is placed in 
  43.     this directory prior to performing any testing.  This could be
  44.     considered a temporary "holding tank" for the file prior to performing 
  45.     any testing.  This should not be a SPITFIRE download directory, since
  46.     you do not want to make the file available for download until all
  47.     testing has been completed and it has successfully passed the tests.
  48.     For this example, we will use C:\CHKUP1 as the Upload File Path for 
  49.     Node 1.  Each Node MUST have its own CHKUP directory, and would normally 
  50.     be named \CHKUP1, \CHKUP2, etc. This makes it possible for SFCHKUP 
  51.     to run on a SPITFIRE BBS that has the maximum number of possible
  52.     nodes, which is 255.
  53.  
  54.         You will next be prompted for the File Area Path which is the
  55.     destination path of all files which successfully complete SFCHKUP's
  56.     evaluation.  This is the drive and directory where the file will
  57.     be placed after the testing process.  Normally, this will be
  58.     a download path configured in your SPITFIRE File Area records.
  59.     We will call this path C:\UPLOADS for our example.
  60.  
  61.         Once these paths are provided, SFCHKUP will search the drives
  62.     configured to see if they exist. If not, SFCHKUP will create them.
  63.  
  64.         Once you have configured the paths used by SFCHKUP, you will be
  65.     prompted as to whether you wish to Utilize the FILE_ID.DIZ feature
  66.     of SFCHKUP.  Many shareware files now contain a small file titled
  67.     FILE_ID.DIZ which provides a brief description of the files contained
  68.     within the ZIP.  If you respond with a Y to Utilize the FILE_ID.DIZ
  69.     the description contained in the FILE_ID.DIZ will be used, provided
  70.     it exists, as the SFFILES.BBS file description.  The file description
  71.     keyed in by the caller who uploaded the file will be ignored.  If
  72.     FILE_ID.DIZ is not found, the description keyed in by the caller
  73.     will be used.  Regardless of how you have configured single/multi
  74.     line file descriptions in SPITFIRE, if this option is set to Y
  75.     SFCHKUP will write up to 4 lines of description.  Turbo Pascal
  76.     limits the characters per line to maximum of 255 characters.  
  77.     SFCHKUP will use as much of the FILE_ID.DIZ as possible, staying
  78.     within this limitation.  This is true even if you have configured 
  79.     SPITFIRE to use single line file descriptions.
  80.     
  81.         Next, you are prompted as to whether you wish to save the changes.    
  82.    The final prompt asks whether you would like your SFFAREA.DAT to be 
  83.    refreshed.  By responding with a [Y]es, the Upload File Path in ALL 
  84.    the SPITFIRE File Area records for this node will be configured to the
  85.    drive and directory you have selected as your Upload File Path.  (If
  86.    you are following the example here, this would be C:\CHKUP1.)  A file
  87.    called SFCHKUP.DAT will store this information in the SPITFIRE HOME
  88.    directory. Each node will have a unique SFCHKUP.DAT file.
  89.  
  90.         If ever these paths need to be changed, run SFCHKUP /CONFIG and
  91.     you will once again be able to configure them.
  92.  
  93.  
  94.     CONFIGURATION OF CHKUP.BAT
  95.     --------------------------
  96.  
  97.         CHKUP.BAT contains a set of instructions that are carried out
  98.     during the proceedings of the use of SFCHKUP. It can run many other
  99.     programs and other batch files which will process uploaded files in
  100.     various ways. Since there is no way to know which ones will be used
  101.     by Sysops, they will not be discussed in detail here. Buffalo Creek
  102.     Software will not be responsible for their use or support.
  103.  
  104.         A sample CHKUP.BAT is provided for you to use as an example 
  105.     when you are setting up SFCHKUP.EXE.  The CHKUP.BAT included in 
  106.     this package is simply designed to convert an uploaded ARC file to 
  107.     ZIP format, check the integrity of an uploaded ZIP file, SCAN the 
  108.     contents of the uploaded file for known viruses, and add the board's
  109.     unique  comment to the ZIP file.  Finally, CHKUP.BAT processes the 
  110.     uploaded file(s), depending on whether the file passed the testing 
  111.     routines successfully.  (An explanation of the sample CHKUP.BAT is 
  112.     discussed in detail in CHKUPBAT.DOC.)
  113.     
  114.        It should be noted, that for those Sysops who prefer to include 
  115.     more complex checking routines, CHKUP.BAT is only limited by the 
  116.     Sysops ability to expand the batch file to accomplish the desired
  117.     tasks.  Other functions of the CHKUP.BAT might include converting
  118.     files compressed using the LZH, LHA, or PAK format, testing the 
  119.     integrity of GIF files, or completely ignore all processing for 
  120.     files with a specific extension, such as .TXT.  (There are more 
  121.     complex CHKUP.BAT files available for download from Buffalo Creek's 
  122.     BBS.)
  123.     
  124.         It is necessary to edit CHKUP.BAT to your specifications. You
  125.     will need to configure the drive and directories it references to
  126.     match the setup for your system.  If you utilize any or all of the
  127.     other programs referenced therein, you will need to obtain them, 
  128.     configure them, and modify your CHKUP.BAT so it points to the 
  129.     appropriate path where these utilities are located on your system.  
  130.     (Buffalo Creek Software strongly recommends that the full path be used
  131.     in the command line when executing these programs.  It is possible for 
  132.     the uploaded file you are checking to contain the same utility program
  133.     you are calling to check and verify the upload.  In such an instance, 
  134.     DOS would default to using the utility in the current directory, and 
  135.     the unchecked program might contain errors or it might perform some
  136.     undesired task such as erasing your root directory (just an example).
  137.  
  138.         CHKUP.BAT normally creates a work directory (C:\CHKUP1\CHKWORK
  139.     for example) during processing and deletes it when its work is
  140.     complete. Uploaded files are moved there for evaluation, processed
  141.     there and then moved to another location afterwards.
  142.  
  143.  
  144.     RUNNING SFCHKUP
  145.     ---------------
  146.  
  147.         SFCHKUP is written to honor file sharing, and as such, may be
  148.     run on more than one node of a multinode SPITFIRE BBS simultaneously.
  149.     Each node will require its own CHKUP path and its own CHKUP.BAT.
  150.     SFCHKUP is designed to be run at the BEGINNING of SFINIT.BAT,
  151.     especially on multinode SPITFIRE BBSs. For example, the first couple
  152.     of lines in your SFINIT.BAT should look like the below example:
  153.  
  154.     @Echo Off
  155.     SFCHKUP %1
  156.  
  157.     WARNING!!!  ONLY use the %1 command line parameter when SFCHKUP is
  158.     being executed from within the SFINIT.BAT file and ONLY when the
  159.     SFINIT.BAT is being executed by SPITFIRE.  SPITFIRE passes the
  160.     record number (record number in SFUSERS.DAT) of the last caller to
  161.     SFINIT.BAT.  This number can then be passed to SFCHKUP by use of the
  162.     %1 command line parameter.  This is done so SFCHKUP doesn't have to
  163.     look through the entire SFUSERS.DAT file to determine who the last
  164.     call was.  Extremely serious problems can result in the event you
  165.     use the %1 command line parameter in any other way.  For example, 
  166.     SPITFIRE does not execute the SFINIT.BAT file when being operated
  167.     under a frontend program thus causing the need for SFCHKUP to be run
  168.     from the frontend batch used to execute SPITFIRE.  In such case, %1 
  169.     means something totally different to that batch file than it does to
  170.     SFINIT.BAT when executed by SPITFIRE.
  171.  
  172.     Buffalo Creek Software recommends that SFCHKUP be run immediately
  173.     after the caller logs off (first command in the batch file used to
  174.     execute SFCHKUP).  Take care to make sure to run SFCHKUP first!
  175.  
  176.         It is entirely up to you, the Sysop, how you utilize SFCHKUP
  177.     and its associated CHKUP.BAT file. You can make it as simple or as
  178.     elaborate as you please. Sysops who devise a unique methodology are
  179.     encouraged to share it with the rest of the SPITFIRE BBS community
  180.     by posting it in a message or uploading it to Buffalo Creek's BBS!
  181.  
  182.         A short discussion of suggested ways that files may be processed
  183.     follows. You are not required to process your files in the ways
  184.     described and you are free to run other tests in addition to or in
  185.     place of the ones described.
  186.  
  187.  
  188.     EVALUATING FILES WITH CHKUP.BAT
  189.     -------------------------------
  190.  
  191.         In most cases, all files uploaded will be evaluated by SFCHKUP.
  192.     The phase of evaluation can be configured to be skipped if you'd
  193.     rather NOT process a file. You might want to post say *.TXT files
  194.     as is and feel that there is no need to perform any tests on them.
  195.     If this is the case, simply write your CHKUP.BAT file to check for
  196.     this type file's existence (IF EXIST *.TXT...) and then skip the
  197.     processing entirely.  The file would then be posted exactly as it
  198.     was uploaded to the BBS.  Similarly, you could elect not to process
  199.     *.BBS/*.CLR files, etc.
  200.  
  201.         You could configure CHKUP.BAT to check for files that you would
  202.     rather not be contained within the file such as known BBS ads,
  203.     PKUNZIP.EXE/PKZIP.EXE, COMMAND.COM, etc. By using a statement such
  204.     as IF EXIST <filename.ext> DEL <filename.ext>, these files can be
  205.     eliminated from the file. When SFCHKUP's work is done, it will
  206.     correctly update the SFFILES.BBS in the configured Upload File Path
  207.     with the file's FINAL size.
  208.  
  209.         A utility designed to check for so-called Computer Viruses can
  210.     be run as part of the evaluation. In our example, McAfee's VIRUSCAN
  211.     is used. SCAN.EXE and similar utilities exit with a DOS ERRORLEVEL
  212.     based upon the results of the evaluation. Our CHKUP.BAT shows that
  213.     an errorlevel of 0 indicates a file with good integrity while a file
  214.     with an errorlevel of 1 indicates a questionable file. Questionable
  215.     files can be sent to a holding directory (ex. C:\BADCHKUP) for later
  216.     scrutiny (accomplished by two IF ERRORLEVEL...GOTO... statements)
  217.     or deleted entirely.  IMPORTANT NOTE: SPITFIRE requires about 230K
  218.     of memory, SFCHKUP requires about 64K or and the current version of
  219.     SCAN requires approximately 330K of memory (whew), thus, your system
  220.     may run out of memory when SCAN is executed.  In case, you may want
  221.     to utilize SCAN with some other virus test program or use an
  222.     alternative means of operating SFCHKUP.
  223.  
  224.         Another utility can be used to check uploaded *.GIF files. For
  225.     example, GIFTEST.EXE can be used. Since GIFTEST also exits with a
  226.     DOS ERRORLEVEL, careful editing of the CHKUP.BAT file can allow you
  227.     to delete the file if it has poor integrity or is at a resolution
  228.     that you do not support on your BBS (say for example, 321x201x16)
  229.     or save it in the holding directory.
  230.  
  231.         ZIP Comments found in uploaded files can be removed and replaced
  232.     with that of your BBS after they have completed evaluation. There
  233.     are quite a number of recommenting utilities (ex. RECOM.EXE) that
  234.     can be used to accomplish this.
  235.  
  236.         Files that have been compressed with schemes other than the one
  237.     you are using on your BBS can be converted (to PKZIP with a utility
  238.     such as TOZIP.EXE.) Remember that SPITFIRE will ONLY support online
  239.     viewing of the contents of files compressed with PKZIP, though!
  240.  
  241.         The above overview is brief by design. It is STRONGLY
  242.     recommended that you thoroughly read through the documentation of
  243.     each and every utility used in conjunction with SFCHKUP.
  244.  
  245.  
  246.     SFCHKUP PROCESSING
  247.     ------------------
  248.     
  249.        SFCHKUP will only process one uploaded file at a time.  When
  250.     SFCHKUP is initiated, it begins by checking to see if any files
  251.     exist in the path that you have configured as the Upload File
  252.     Path.  
  253.     
  254.        If a file (or files) is (are) found in the configured Upload File 
  255.     Path, SFCHKUP passes the first file name it reads to CHKUP.BAT.  SFCHKUP
  256.     then shells and your CHKUP.BAT is invoked to complete the processing 
  257.     commands you have included in this batch file.  
  258.     
  259.        When CHKUP.BAT completes processing, control is returned to SFCHKUP.
  260.     At this time, SFCHKUP checks to see if the file exists in the Upload File
  261.     Path.  If so, SFCHKUP assumes that the file has passed all the required 
  262.     tests.  The file is then moved to the drive and directory that you have 
  263.     configured as the File Area Path.  If the file is not found, SFCHKUP 
  264.     assumes that the file did not pass the required tests and the statistics
  265.     of the caller who uploaded the file are adjusted accordingly.
  266.     
  267.        SFCHKUP will then check to see if any other files remain in the
  268.    configured Upload File Path.  If so, it will repeat the process until
  269.    no other files are found.  When no other files are found, the work
  270.    directory is deleted and control is returned to SFINIT.BAT
  271.     
  272.     
  273.     AFTER RUNNING SFCHKUP
  274.     ---------------------
  275.  
  276.         If files are not posted as a result of failing one of the
  277.     integrity evaluation procedures, SFCHKUP will adjust the caller's
  278.     upload credits and K of upload credits accordingly subsequent to
  279.     completing evaluation of all files. In addition, SFCHKUP.MSG (which
  280.     must reside in the SPITFIRE HOME directory if used) will be copied
  281.     to XXX.BBS where XXX is the number of the caller who uploaded the
  282.     questionable file as contained in the SPITFIRE users database. The
  283.     filename will be appended to SFCHKUP.MSG. If there already exists a
  284.     XXX.BBS for that caller, SFCHKUP will append its data to it. In
  285.     addition, a notation is made to HEYSYSOP.LOG to notify the Sysop
  286.     that a questionable file has been received, its name and the name of
  287.     the caller who uploaded it.
  288.  
  289.         All uploaded files with good integrity will then be moved to the
  290.     Upload File Area Path that you have configured. The SFFILES.BBS in
  291.     that area will be appended to with the final names, file sizes and
  292.     descriptions of all acceptable files. Finally, the work directory
  293.     will be removed and control will be returned to SFINIT.BAT.
  294.  
  295.  
  296.     SPECIAL FEATURE
  297.     ---------------
  298.         SFCHKUP performs a very special test on uploaded .ZIP files 
  299.     which (according to all information available to Mike Woltz) is
  300.     not performed by any other program in the world.  While there are
  301.     those who would believe that there is nothing wrong with providing 
  302.     board-crashing information to every looney-tune in the world, Buffalo
  303.     Creek Software does NOT believe publicly discussing this kind of 
  304.     information is proper.  Therefore, details on this particular test
  305.     will not be disclosed.  However, suffice it to say, Buffalo Creek 
  306.     Software STRONGLY suggests that every SPITFIRE Sysop use SFCHKUP to 
  307.     perform this test regardless of whether SFCHKUP is used for anything 
  308.     else.
  309.  
  310.     
  311.     DISTRIBUTION
  312.     ------------
  313.  
  314.        SFCHKUP is distributed under the shareware concept.  You are
  315.     free to distribute the SFCHKUP program as long as it remains
  316.     unmodified and no fee is charged.  If you continue to use this 
  317.     program after an adequate evaluation period, a fee is required.
  318.     A $1.00 registration fee is required to register SFCHKUP.  This
  319.     can be sent to:
  320.  
  321.                             Buffalo Creek Software
  322.                             ATTN: Mike Woltz
  323.                             913 39th Street
  324.                             West Des Moines, Iowa   50265
  325.  
  326.  
  327.     DISCLAIMER
  328.     ----------
  329.         
  330.        Mike Woltz and/or Buffalo Creek Software shall in no way be 
  331.     held responsible for any damage incurred while operating SFCHKUP.
  332.     All other programs used in conjunction with SFCHKUP are Copyright by
  333.     their respective authors and may not be products of Buffalo Creek
  334.     Software. All responsibility lies with the user of the software.
  335.  
  336.     The shareware version of SPITFIRE and other SPITFIRE utilities
  337.     are available for download from:
  338.  
  339.                             Buffalo Creek's BBS
  340.                              Mike Woltz, Sysop
  341.                               (515) 225-8496
  342.                        38400/19200/9600/2400/1200 Baud
  343.  
  344.      REVISION 2.2 - April 10, 1993 - In addition to testing for valid
  345.      file names, SFCHKUP now tests a .ZIP file for 'ANSI bombs'.
  346.  
  347.      REVISION 2.3 - June 12, 1993 - SFCHKUP tests the file names within
  348.      a .ZIP file for 'ANSI bombs' and for valid file names.  A forward
  349.      slash "/" is not a valid character in a file name so when a forward
  350.      slash was found, SFCHKUP would asssume the .ZIP file had been tampered
  351.      with and would erase it.  The problem is (was) that when a .ZIP file
  352.      is created which recurses and stores the sub-directory, PKZIP places
  353.      a forward slash between the directory name and the file name.  In such
  354.      case, SFCHKUP would assume the file had been tampered with and would
  355.      erase the file.  To correct this situation, SFCHKUP has been changed
  356.      to allow a forward slash in the file name.  Additionally, the sample
  357.      CHKUP.BAT file (included in the SFCHKUP package) has been changed to
  358.      so that .ZIP files within .ZIP (regardless of how deep 'so to speak')
  359.      will be tested.  This change (in the CHKUP.BAT) also retains the
  360.      original .ZIP file thereby retaining the 'authenticity verification'
  361.      to be retained when present.
  362.  
  363.      In the event you are upgrading, you simply need to overwrite your
  364.      current copy of SFCHKUP.EXE with the new copy of SFCHKUP.EXE.
  365.  
  366.      REVISION 2.4 - July 4, 1993 - SFCHKUP was not proper adjusting a
  367.      caller's K-Bytes uploaded when an uploaded file failed the performed
  368.      tests.  This problem was fixed.
  369.  
  370.      REVISION 2.5 - October 29, 1993 - SFCHKUP was changed to properly test
  371.      for a ASCII 26 (^Z) at the end of the SFFILES.BBS to be appended.
  372.  
  373.      REVISION 2.5a - November 20, 1993 - Small bug fix regarding appending
  374.      text files.
  375.  
  376.      REVISION 2.5b - February 19, 1994 - A problem would occur when SFCHKUP
  377.      attempted to update an SFFILES.BBS if the SFFILES.BBS was 0 bytes.  This
  378.      problem was fixed.
  379.