home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / util2 / serv300.lzh / CHECKSUM.DOC next >
Text File  |  1989-11-27  |  13KB  |  255 lines

  1.             +====================================================+
  2.             :               CHECKSUM.EXE version 1.0             |
  3.             | Copyright (C) 1989, Lawrence Stone Reasearch Group |
  4.             |       Written and developed by Lawrence Stone      |
  5.             +----------------------------------------------------+
  6.  
  7.           +=======================================================+
  8.           |                        Purpose:                       |
  9.           | Check one or more files for corruption and/or viruses |
  10.           +-------------------------------------------------------+
  11.  
  12.  
  13.                                    Licenese:
  14.  
  15.  CHECKSUM is "shareware" or user supported software.  CHECKSUM was developed
  16.  as a supplemental utility for LSRGroup's disk, file, and archive controller
  17.  program called SERVICES.  You are granted the right to use CHECKSUM for a
  18.  limited period in order to evaluate its usefulness.  After a reasonable
  19.  period, you must either register your copy or discontinue using this program.
  20.  Government agencies and commercial agencies of any kind must register this
  21.  program.  Registration is $10 U.S. per copy.  If you register CHECKSUM, then
  22.  your fee will be deductable from the registration cost of SERVICES, when you
  23.  register SERVICES.  If you have a registered copy of SERVICES, then you do
  24.  not need to register CHECKSUM.
  25.  
  26.  To register, send a check, money order, or warrent to:
  27.  
  28.                               LSRGroup
  29.                               P.O. Box 5715
  30.                               Charleston, Oregon  97420
  31.                               Atten: SDN Distribution
  32.  
  33.  
  34.                                   Disclaimer:
  35.  
  36.  Use of this program acknowledges this disclaimer of warranty:  "This program
  37.  is supplied as-is.  LSRGroup disclaims all warranties, expressed or implied,
  38.  including, without limitation, the warranties of merchantability and of
  39.  fitness of this program for any purpose.  LSRGroup assumes no liability for
  40.  damages direct or consequential, which may result from the use of this
  41.  program."
  42.  
  43.  
  44.                                  Introduction:
  45.  
  46.  CHECKSUM will discover most virus if the virus wasn't present in a file
  47.  when you first checked that file.  And, CHECKSUM will discover all files
  48.  that have become corrupted if the files were not corrupted the first time
  49.  they were checked by CHECKSUM.
  50.  
  51.  For a very thorough check for viruses, LSRGroup recommends you use FLUSHOT,
  52.  by Software Concepts Design, and SCAN, by McAfee Associates, in conjunction
  53.  with CHECKSUM.  This recommendation is made because all three of these pro-
  54.  gram use different techniques to hunt out viruses, thereby, increasing the
  55.  likelihood of finding one, if one is present.  CHECKSUM also looks for cor-
  56.  rupted files whether corrupted due to a virus or not.
  57.  
  58.  If you have CHECKSUM write a report file then, by analyzing the report, you
  59.  can determine whether the failed CRC check is due to a virus (and if it is,
  60.  the extent of the infection) or if a file failed the CRC due to another
  61.  reason, such as weakened formatting, etc.
  62.  
  63.  If you use FLUSHOT in conjunction with CHECKSUM, be advised that if FLUSHOT
  64.  has calculated a file's checksum value before CHECKSUM.EXE has been run on
  65.  that file then you need to instruct FLUSHOT to re-figure the checksum of that
  66.  file.  This is necessary because CHECKSUM hides its calculated CRC value
  67.  inside of each file it tests.  If FLUSHOT performed its test prior to when
  68.  CHECKSUM did, the next time FLUSHOT checks this file, it will inform you that
  69.  it failed the CRC check.  This file is ok, it just contains hidden informa-
  70.  tion for CHECKSUM that wasn't present the first time FLUSHOT checked it and,
  71.  therefore, when tested by FLUSHOT, produced a different checksum value from
  72.  its original.
  73.  
  74.  Just instruct FLUSHOT to re-calculate the checksum and you should have no
  75.  further error messages from FLUSHOT unless there is a virus present.  Also,
  76.  when CHECKSUM hides this information within a file, the size of the file will
  77.  be increased by four bytes.
  78.  
  79.  One question often asked is, "What files need to be checked for viruses?"
  80.  Obviously, checking every file is time consuming and often impractical.  Most
  81.  files do not need to be checked.  Viruses need to do a handshake with your
  82.  files before they can get infected.  This handshake will occur via other
  83.  files that can make the "touch".  Your COMMAND.COM, BIOS, DOS, CHECKSUM.EXE,
  84.  any memory resident program or, any file that is loaded automatically via
  85.  your AUTOEXEC.BAT are good candidates for virus checks.
  86.  
  87.  You can run CHECKSUM from your AUTOEXEC.BAT and do a CRC/checksum test auto-
  88.  matically, every time you boot your computer.  CHECKSUM will return an error-
  89.  level to you batch file.  Have your batch file use this errorlevel so that it
  90.  can take appropriate action, if needed.
  91.  
  92.  Before you use CHECKSUM, make sure you have a good backup of the file(s) to
  93.  be tested.  If the file should ever become corrupted, you will need to over-
  94.  copy it with a clean copy (backup).  Also, if CHECKSUM should, for any reason
  95.  interfere with the file tested, then you will want to over-copy it with your
  96.  backup copy.
  97.  
  98.  
  99.                               I.  Call syntax:
  100.  
  101.                      CHECKSUM [?] [file] [@list] [-report]
  102.  
  103.  Where CHECKSUM is the name of the program and where one or more of the items
  104.  within square brackets (above) must be included.
  105.  
  106.  Calling CHECKSUM with "?" will display a help screen.
  107.  
  108.  "file" is the name of a file to test.  If you tell CHECKSUM to test a single
  109.  file, then do not give it the "@list" parameter.  The file can contain the
  110.  complete path with the file's name.
  111.  
  112.  "@list" is the name of a control file.  It can include the complete path.  If
  113.  you use this parameter, do not give CHECKSUM a "file" parameter.  The control
  114.  file name must be immediately preceded with an at symbol, hence, the term for
  115.  this parameter is "@list".
  116.  
  117.  "-report" is the name of the report file.  It can include the complete path.
  118.  This parameter can be used with the "file" parameter or the "@list" parameter.
  119.  The name of the report file must be immediately preceded with a minus sign,
  120.  hence, the term for this is "-report".
  121.  
  122.  Sample calls to CHECKSUM:
  123.  
  124.                    CHECKSUM ?
  125.                    CHECKSUM C:\COMMAND.COM
  126.                    CHECKSUM C:\EMM.SYS-C:\UTIL\CHECKSUM.RPT
  127.                    CHECKSUM @CONTROL.LST-C:\UTIL\CHECKSUM.RPT
  128.                    CHECKSUM @C:\UTIL\CONTROL.LST-C:\UTIL\CHECKSUM.RPT
  129.  
  130.  
  131.                            II.  The Control File
  132.  
  133.  When the CHECKSUM utility is controlled by this file, it will test all the
  134.  files listed within.  The control file must be an ASCII file, and should
  135.  have the complete path and filename for every file listed.  The control file
  136.  can have any name.  LSRGroup suggests you use the name, "CONTROL.LST" or use
  137.  "CONTROL.FIL".  Below is a sample control file:
  138.  
  139.                              C:\IO.SYS
  140.                              C:\MSDOS.SYS
  141.                              C:\COMMAND.COM
  142.                              C:\RAMDRIVE.SYS
  143.                              C:\EMM.SYS
  144.                              C:\DOS\COMMAND.COM
  145.                              C:\UTIL\SCREEN\FAST.COM
  146.                              C:\UTIL\ANSI.COM
  147.                              C:\UTIL\CHECKSUM.EXE
  148.                              C:\SERVICES\SERVICES.EXE
  149.  
  150.  Note that the control file is a sequential, ASCII list of those files to be
  151.  checked by CHECKSUM.
  152.  
  153.  
  154.                         III.  CHECKSUM's Report File
  155.  
  156.  The report file is a written report stating the date and time of each test,
  157.  the file name of each file tested, result of each file tested, errorlevels
  158.  produced for each file tested, and any errors produced while reading or writ-
  159.  ing to files.  The report is written in ASCII and saved as a disk file and
  160.  can have any name.  LSRGroup recommends you name it, "CHECKSUM.RPT".
  161.  
  162.  LSRGroup further recommends that you have CHECKSUM output to a report when-
  163.  ever you test a file.
  164.  
  165.  Whenever CHECKSUM creates a report, it will append it to any previous report.
  166.  In this way, you can maintain a complete history of the status of each file
  167.  tested.   After a while, this report will become quite large.   It is your
  168.  responsibility to archive it, or delete it, as your needs dictate.
  169.  
  170.  The checksum report is an ASCII file and has the following format:
  171.  
  172.                                    (Sample Report)
  173.                      +=======================================+
  174.                      |  Checksum Report 10-01-1989 08:11:40  |
  175.                      +---------------------------------------+
  176.  
  177.   File                                                      Result Exit Error
  178.   --------------------------------------------------------- ------ ---- -----
  179.   C:\IO.SYS                                                 PASSED    0     0
  180.   C:\MSDOS.SYS                                              PASSED    0     0
  181.   C:\COMMAND.COM                                            PASSED    0     0
  182.   C:\RAMDRIVE.SYS                                           PASSED    0     0
  183.   C:\EMM.SYS                                                PASSED    0     0
  184.   C:\DOS\COMMAND.COM                                        PASSED    0     0
  185.   C:\UTIL\ANSI.COM                                          PASSED    0     0
  186.   C:\UTIL\SCREEN\FAST.COM                                   PASSED    0     0
  187.   C:\SERVICES\CHECKSUM.EXE                                  PASSED    0     0
  188.   C:\SERVICES\MAKEFAT.EXE                                   PASSED    0     0
  189.   C:\SERVICES\PROTECT.EXE                                    ADDED    1     0
  190.   ---------------------------------------------------------------------------
  191.   <--------------- 62 character spaces -------------------><---7--><-5-><-5->
  192.  
  193.  
  194.  Each time CHECKSUM appends to the report, it begins the report with a box
  195.  informing you that this report is a "Checksum Report" and the date and time
  196.  the report was created.  Below that is a listing of each file tested, their
  197.  result, errorlevel (Exit), and any errors produced while reading or writing
  198.  the file (Error).  The actual errorlevel established, once CHECKSUM is
  199.  finished, is the highest errorlevel encountered.
  200.  
  201.  Files tested will have one of the following results:
  202.  
  203.                      Result    Definition
  204.                      ------    ------------------------------------
  205.                      PASSED    File tested successfully.
  206.                      FAILED    File failed checksum test.
  207.                        NULL    Attempted to test a null file.
  208.                      COMMND    Improper command line argument.
  209.                        DISK    Disk error encountered.
  210.                        OPEN    Error while attempting to open file.
  211.                        READ    Error while attempting to read file.
  212.                       WRITE    Error while attempting to write file.
  213.  
  214.  
  215.  CHECKSUM will set an errorlevel so that those who use it in their system's
  216.  AUTOEXEC.BAT files can take appropriate action based upon the returned
  217.  errorlevel.  The report lists each exit level (errorlevel) established and,
  218.  the highest exit level established is the actual errorlevel returned when
  219.  CHECKSUM is done.  The following list the errorlevels and their meanings:
  220.  
  221.                      Exit   Description
  222.                      ----   ---------------------------------------
  223.                        0    File passed checksum test.
  224.                        1    File had signature/checksum added - OK?
  225.                        2    Floppy drive had drive door open.
  226.                        3    Disk has bad sector in FAT.
  227.                        4    Disk not DOS formatted.
  228.                        5    Disk was write protected.
  229.                        6    Path was not found.
  230.                        7    Invalid command line argument.
  231.                        8    Read error.
  232.                        9    Other errors.
  233.                       10    File failed checksum test!
  234.  
  235.  
  236.  Note:  If you are testing files on floppy drives then you must remove any
  237.  write protect tabs.
  238.  
  239.  
  240.  If, for any reason, CHECKSUM fails to handle any file, then this information
  241.  is presented in the report under the heading "Error".  The only exception to
  242.  this is if CHECKSUM was given a bad path name for its report - in this case,
  243.  the program is aborted with an errorlevel 9 and, obviously, no report is
  244.  written.  Errors that CHECKSUM lists are the same error codes that DOS would
  245.  produce unless the error is greater than or equal to 255.  In this case,
  246.  subtract 255 to get the DOS error.
  247.  
  248.                                 Example errors:
  249.  
  250.                                 0   No error
  251.                                 2   Bad crc in FAT
  252.                                12   Not DOS formatted
  253.                               255   Disk write protected
  254.                               259   Path not found.
  255.