home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR13
/
ZCHECK30.ZIP
/
ZCHECK.DOC
< prev
next >
Wrap
Text File
|
1993-10-22
|
28KB
|
573 lines
ZZZZZZ CCCCCC HH HH EEEEEE CCCCCC KK KK
ZZ CC HH HH EE CC KK KK
ZZ CC HH HH EE CC KK KK
ZZ CC HHHHHHHH EEEE CC KKKK
ZZ CC HH HH EE CC KK KK
ZZ CC HH HH EE CC KK KK
ZZZZZZ CCCCCC HH HH EEEEEE CCCCCC KK KK
Version 3.0
AUTOMATED VIRUS CHECKING BATCH FILE
ZCHECK.DOC
and
ZCHECK
by
John Sims
274 MacNab St.
Dundas, Ontario, Canada
L9H 2K6
Table of Contents
Disclaimer .......................................... Page 2
Description ......................................... Page 2
Syntax .............................................. Page 2
Files List .......................................... Page 2
Requirements ........................................ Page 2
Command Line ........................................ Page 2
Examples ............................................ Page 3
Installing ZCHECK ................................... Page 4
Using ZCHECK ........................................ Page 4
Error codes ......................................... Page 6
Zcheck.cfg .......................................... Page 7
If ZCHECK Crashes ( includes ZCLEAN ) ............... Page 7
Zscreen ............................................. Page 8
Modifying ZCHECK .................................... Page 8
Manual .............................................. Page 9
Registration ........................................ Page 10
Page 2
Disclaimer
I accept no responsibility for anything ZCHECK.BTM does or
anything you may think it does, to your computer hardware or
software. You use ZCHECK at your own risk. ZCHECK has been
produced without the consent or request of J.P.Software.
Description
ZCHECK is a fully automated batch file that will scan any
number of ZIP files for viruses , if a virus is found it will
assist you in finding the ZIP file containing that infected
file. Whether or not a virus is found ZCHECK will delete all
the files and subdirectories it created. ZCHECK provides full
color screens to inform you of its findings.
Syntax zcheck [c|z|?|h|H|error] [d:][path1] [d:][path2]
ZCHECK is distributed for your evaluation if after a period of
21 days you find ZCHECK to be of value you should register
ZCHECK. Information concerning registration and the benefits are
included in this document.
Files List
ZCHECK.BTM ...................... Zcheck
ZSCREEN.BTM ..................... Zcheck opening screen
ZCHECK.CFG ...................... Sample configuration file
ZCHECK.DOC ...................... This document
ZCLEAN.BAT ...................... Cleanup if ZCHECK crashes
REGFORM.TXT ..................... Zcheck registration form
Please include all these files if you redistribute ZCHECK.
Requirements
Zcheck will need approximately 150 bytes of free environment
space. This will vary according to the length of the paths to
the drive and directories used for ZCHECK, zip file location
and extraction.
Zcheck will only run under 4DOS. It has only been tested under
4DOS version 4.00 and newer. If ZCHECK runs under an earlier
version there may at some point be problems with its operation.
You must have PKUNZIP and SCAN, both registered trade marks of
their respective owners, and these utilities must either be in
the same directory with ZCHECK or on your path.
You must have a color monitor and the associated video card.
Command Line
Syntax zcheck [c|z|?|h|H|error] [d:][path1] [d:][path2]
The c, z, ?, h, H, error switches are optional and mutually
exclusive. ( They cannot be used at the same time. )
Page 3
The c switch causes ZCHECK to write the drive and path
information that is on that command line to the file
ZCHECK.CFG. This switch works with both paths, one path or no
paths.
The z switch causes ZCHECK to read the path information from
the file ZCHECK.CFG. No further information on the command
line is needed or used by ZCHECK.
The ? h or H switch will provide you with command line help.
The error switch will provide a list of ZCHECK's error codes.
[d:] Is the drive. If the drive is the current drive it is not
needed.
[path1] This is the full DOS path not including drive to the
location of the ZIP files. If you wish to extract the zip files
into the same directory as this, you do not need [path2].
ZCHECK creates a subdirectory in which all the ZIP files are
extracted. If ZCHECK is located in the same directory with the
ZIP files and you wish to extract the ZIP in that directory
neither [path1] or [path2] is required. If ZCHECK is in the
directory with the zip files and you wish to extract to a
different directory you must include both [path1] and [path2].
[path2] This is the directory in which ZCHECK will create an
extraction directory. ZCHECK will extract the ZIP file into a
subdirectory which it creates, scan the files in that
subdirectory and any recursive subdirectories, then delete all
the files and the associated directories. The original ZIP file
will remain where it was. If you need to provide ZCHECK with an
extraction directory you must also supply the location of the
ZIP files even if they are located in the same directory or in
the directory with ZCHECK.
Examples
zcheck
This will cause ZCHECK to look for the zip files in the current
directory and if found create the extraction directory in the
same place.
zcheck c:\arc
This will cause ZCHECK to look for the ZIP files in the drive
and directory c:\arc. If found ZCHECK will create the
extraction directory in c:\arc.
zcheck a:\ c:\arc
This will cause ZCHECK to look for the ZIP files in the root
directory of the A drive. If found ZCHECK will create the
extraction directory in c:\arc.
Page 4
zcheck ?
a brief help list will be provided just enough to help remind
you of the order of switches and path entries. This is not
intended to replace this document in any way. The lower case h
and upper case H will also get you to the same list. This will
not start ZCHECK.
zcheck error
A list of ZCHECK error codes and definition will be provided.
ZCHECK can be run from another batch file and will return error
codes to that batch file. This will allow you to call ZCHECK a
number of times to check ZIP files located in different
directories.
zcheck c a:\ c:\arc
This will cause ZCHECK to write the ZIP file directory and
extraction directory location to the file ZCHECK.CFG and then
proceed as in the previous example.
zcheck z
This will cause ZCHECK to read the drive and directory
information from the file ZCHECK.CFG.
Installing ZCHECK
Copy the files to a directory of your choice. The only file
absolutely needed to use ZCHECK is ZCHECK.BTM. ZCLEAN.BAT
should be in the directory with ZCHECK.BTM in case of problems,
at least until you are familiar with ZCHECK.
ZCHECK.CFG as supplied is only a sample file. If it is in the
directory with ZCHECK.BTM and you use the z switch, ZCHECK will
attempt to use the directories listed in this file. If you use
the c switch ZCHECK will overwrite the existing file with the
new information you supply.
You do not need ZSCREEN. See the section Zscreen. Take a look
however it is cute.
This file does not need to be in the same directory with
ZCHECK.BTM and can be stored any place you wish.
Using ZCHECK
ZCHECK will allow you to check ZIP files on a floppy drive by
extracting those files to a hard drive. The extraction and
scanning will be much faster using a hard drive then trying to
do everything on the floppy. Many ZIP files today cannot be
extracted onto the floppy they are found on or even ont another
floppy. You will be able to check as many ZIP files as ZCHECK
finds in the designated directory. This cross drive checking
also means you can work around a compressed drive. If you only
have just enough space on your uncompressed area to handle the
extraction and not the storage, this will save fragmenting your
compressed drive and also speed up the whole process.
Page 5
ZCHECK will work on you path just like any other utility. When
ZCHECK ends you will be restored to the directory that you were
originally in.
ZCHECK will create a file named CHECK.LZT. This file is
actually created at the request of ZCHECK but by SCAN. It will
contain a list of all the files scanned and the results. A
short sample is shown below.
SCAN 9.19 V1.08 1993/10/20 20:11
Options: c:\work\CHECK /NOMEM /SUB /A /HISTORY SCAN.LZT
Scanning Volume: C_DRIVE
No viruses found.
--------------------------------------------------
If you have done one or more checks with no virus found CHECK.LZT
will start with that number of screens that will look something
like this.The entry below is a sample of what you will find
in SCAN.LZT if scan should find a virus.
--------------------------------------------------
SCAN 9.19 V1.08 1993/10/20 20:12
Options: c:\work\CHECK /NOMEM /SUB /A /HISTORY SCAN.LZT
Scanning Volume: C_DRIVE
The virus [Saturday 14th] has been found
c:\work\CHECK\$$$~Z\INFECTED.EXE
________________________________________________________________
When SCAN finds a virus the file name is written to the file
SCAN.LZT as shown. ZCHECK writes the name of the ZIP file which
contains this infected file to a file named SCUM.LZT. The order
of the files that contain viruses in SCAN.LZT is the same order
as the ZIP file list in SCUM.LZT. There for the first file
listing of a virus in SCAN.LZT will be the first ZIP file
listed in SCUM.LZT.
ZCHECK will not stop when it finds a virus but it will display
a temporary red screen to inform you that a virus has been
found. The number of files checked and the number of ZIP files
that contain infected files will be displayed when ZCHECK has
completed checking all the ZIP files. This screen will remain
until you press a key to quit ZCHECK.
Page 6
Each time SCAN competes checking the extracted files and if no
virus was found in that check, ZCHECK will provide you with a
green progress screen. This screen informs you that SCAN did
not find any viruses in the last group of files checked, how
many ZIP files have been checked and the total number of files
zcheck is checking. This screen does not mean that no virus has
been found in previous scans of the ZIP files being processed.
it only refers to the last extraction and scan.
If ZCHECK encounters any problems along the way you will be
informed with a blue screen. Some of these screens allow you to
exit ZCHECK but most are automatic screens that either continue
or quit.
If ZCHECK finds insufficient environment in which to work it
will quit and tell you how much environment you need to operate
ZCHECK. The environment is the only place that ZCHECK has to
store the variables needed to do its job. You can set your
environment size either in your config.sys file or your
4DOS.INI file. in config.sys you add the E: switch to your
SHELL= command. The default is 512 bytes. to increase this to
1024 bytes for example, use E:1024. In your 4DOS.INI you set
the environment with environment = 1024. This again would set
your environment to 1024 bytes. For more information on this
check your 4DOS manual. You should increase your environment if
necessary by much more than ZCHECK states is the minimum.
Otherwise if you enter a longer path the next time you start
ZCHECK you will get the same error.
Error codes
ZCHECK returns error codes to allow you to run ZCHECK in
another batch file and determine what you wish to do depending
on how ZCHECK quits. The term ERRORLEVEL is used since this
is how you check for error codes in a 4DOS batch file. The
error codes are listed and explained below.
ERRORLEVEL 0 Normal Termination NO virus found
ERRORLEVEL 1 Normal Termination VIRUS found
ERRORLEVEL 2 Terminated by user
ERRORLEVEL 3 Terminated by ZCHECK
ERRORLEVEL 4 Terminated with an internal failure
ERRORLEVEL 5 Insufficient environment to start
ERRORLEVEL 6 Normal Termination Help or Error list accessed
ERRORLEVEL 0 Normal Termination NO virus found
This simply means that ZCHECK has indeed terminated through a
normal way and has not been forced to quit in any way. If you
exit ZCHECK using Ctrl-C or Ctrl-Break it will not return an
error code. As this code states it also indicates that no virus
was found.
ERRORLEVEL 1 Normal Termination VIRUS found
This is the same as the error code above except it indicates
that at least one virus was found.
Page 7
ERRORLEVEL 2 Terminated by user
There are exit screens in ZCHECK which allow you to either
continue or quit. If you choose to quit ZCHECK will generate
this error code.
ERRORLEVEL 3 Terminated by ZCHECK
ZCHECK provides for quitting if certain conditions are not met,
such as the programs PKUNZIP or SCAN have not been found by
ZCHECK. Under these type of conditions ZCHECK will return this
error code.
ERRORLEVEL 4 Terminated with an internal failure
If ZCHECK is able to determine that it cannot function due to an
internal variable missing or corrupt it will return this error
code. Under some conditions if things go beyond the control of
ZCHECK it may just crash and return no error code. Should this
happen there is information in the section If ZCHECK Crashes.
ERRORLEVEL 5 Insufficient environment to start
If ZCHECK finds insufficient environment to operate it will not
only inform you of this with a screen but it will also return
this error code.
ERRORLEVEL 6 Normal Termination Help or Error list accessed
This is exactly what it states.
Zcheck.cfg
The option of file ZCHECK.CFG is provided, if you more often
than not use the same drive and directory configuration. If for
example you always check all zip files from drive A before
allowing them on your hard drive, an excellent idea, and always
extract them on drive C in the same directory. All you will
need to do, once your configuration file is made is to type
zcheck z and ZCHECK will use the information it finds in
ZCHECK.CFG. You do not have to use ZCHECK with the c switch to
write ZCHECK.CFG, you can use any editor as long as you keep to
the format as shown in the sample file. The first line of the
file must contain the full DOS path including the drive, if
needed, to the location of the ZIP files. The second line must
contain the full DOS path including the drive, if needed, to
the extraction directory. Even if both are the same they must
both be included.
If ZCHECK Crashes
If you terminate ZCHECK with Ctrl-C or Ctrl-Break or if ZCHECK
crashes, which happens very seldom under normal use, you will
be left with a number of temporary files that ZCHECK uses. You
may also be left with the extraction directory that ZCHECK
creates, with the extracted ZIP file fully expanded. You will
Page 8
know if this has happened since you will be left with a black
on cyan screen. This will also normally leave you in the
directory that ZCHECK is in. Simply type ZCLEAN and the batch
file ZCLEAN.BAT will clean up the mess. If you get the error
message UNKNOWN COMMAND "zclean" you either do not have ZCLEAN
in the correct directory with ZCHECK or you have been returned
to the directory you were originally in. If ZCHECK has
returned you to your original directory it most likely cleaned
up it's own mess. ZCLEAN ends with the set command. This
allows you to inspect your environment to see if any variables
created by ZCHECK have been left laying around. 4DOS almost
always cleans this up no matter how bad ZCHECK is abused.
However it is possible to defeat 4DOS and leave you environment
cluttered with unwanted variables. If you are not sufficiently
familiar with your environment to recognize what you want and
what you don't want simply use Ctrl-Alt-Del to reboot your
computer and your environment will be reset to normal.
Zscreen
ZSCREEN.BAT is not a beg screen. It is simply a cute screen and
serves no other purpose. It does however have a side effect. It
is a pain to some. You do not need to modify ZCHECK.BTM to stop
ZSCREEN. If you remove ZSCREEN from the directory where you
store ZCHECK.BTM or rename ZSCREEN.BAT ZCHECK will not call
ZSCREEN or go looking for ZSCREEN. This will put an end to this
screen.
Modifying ZCHECK
Since ZCHECK is a batch file you can, if you so choose, make
any changes you like. If you make any changes to ZCHECK with or
without registering ZCHECK do not contact me to help you debug
the modified version. It is not necessary to modify ZCHECK to
get rid of ZSCREEN. See the section Zscreen.
If you decide to make modifications to ZCHECK please be very
careful with the line sampled below.
%@exec[pkunzip %[wd]\%@line[ext.lzt,%[v]] -d %[exd]\$$$~Z]
This calls PKUNZIP through a 4DOS back door and in itself can
get you into trouble if you are not careful. This line was
necessary in the form you see in order to overcome the problem
of PKUNZIP crashing ZCHECK whenever it found an error. When
PKUNZIP finds an error it shuts down. Without calling PKUNZIP
through the "@exec[]" function PKUNZIP also crashed ZCHECK.
PKUNZIP also in the older versions, which are still in use, and
some of the varieties of the newer versions does not return
error codes to a batch file in a way that can be made use of
when it is called through the "@exec[]" function. For this
reason there is only one error screen for PKUNZIP. It states
PKUNZIP has returned and error of unknown type. SCAN can run
directly from the batch file and returns all its error codes
just perfect, so there are lots of SCAN error screens, but just
one for PKUNZIP.
Page 9
The line just discussed can also be used as an example. If this
seems very straight forward and basic to you, then you should
have no trouble modifying ZCHECK to suit your own needs. If it
seems at all baffling you should understand that there are far
more complex areas within ZCHECK and perhaps you should learn
4DOS a little better before you tinker too much. ZCHECK is not
really a very complex batch file. It is actually quite simple,
but compared to the average six line batch file it might appear
to be maze.
See the section Registration for information on acquiring a
fully remarked version of ZCHECK. This will make it much easier
for you to modify. The remarks are left out not to make the
workings a mystery but to allow ZCHECK to run as fast as a
batch file can.
If ZCHECK were not a batch file it would not be necessary to
discuss modification. An executable file cannot be easily
modified without the source code. But a batch file has no such
privilege. It does however have a very big advantage over many
executable files on the market that do this kind of thing.
ZCHECK uses far less memory than many of the executable files.
All the executable files are larger than ZCHECK but some will
swap to extended, expanded memory or disk when running
utilities like PKUNZIP and SCAN. Most however simply shell to
DOS. This leaves less memory for the other utility. In some
cases this is a problem. ZCHECK presently uses less than 10K of
ram. The rest of the program is 4DOS. 4DOS looks after all the
swapping very well and you will have a lot more room for the
other utility. If certain configurations of your system leave
you with very little ram and you must reboot to a different
configuration to run a similar type of utility, ZCHECK is the
answer.
I have tried to make ZCHECK as friendly and useable as I can.
Keeping in mind that batch files have certain peculiarities
which create their own set of restrictions. You will see that I
have tried to keep the program flow as structured as is
possible in a batch file without sacrificing a great deal of
speed. If you decide to modify ZCHECK you should not have any
difficulty following the flow. Especially if you register and
receive a remarked version.
Manual
This document is already formatted for printing. It can be
successfully printed with two sided print utilities or book
print utilities. Registration has been deliberately placed on
the last page. It can easily be removed with any editor
including the page break. The page break is that funny looking
little symbol that is at the extreme right side of this
document. There are many of them and they are located on the
line above the line containing the page number at the extreme
right side. Remove the last one along with the last page if you
do not want to retain the registration with the manual. If you
fail to remove this your printer will simply produce an extra
page which will be blank.
Page 10
Registration
ZCHECK is not free. You have 21 days to try ZCHECK if after
that time you find ZCHECK to be of value you should register
your copy of ZCHECK. If you find ZCHECK is not of value you are
expected to discontinue using ZCHECK. Just because ZCHECK is a
batch file does not lessen the principals involved. This is
the standard this ain't free stuff. As much as I feel you
should register ZCHECK if you continue to use it this is all
you get about this.
The actual registration form is in a file named REGFORM.TXT.
Simply copy this to your printer port or use print or what ever
you like. Fill it out include the funds, send it off and you
will be registered. So what does it cost and why register?
Why then how much. I already gave you the standard stuff, here
is the usual stuff. I do plan upgrades to ZCHECK and another
similar utility called VCHECK. VCHECK will handle ZIP's, ARJ's
PAK's PKARC's and anything else I find room for. It will also
be fully menu driven and retain far more in configuration. It
will be much easier to use since it is menu driven. Most of the
front end is completed. This will be made available to ZCHECK
registered users for an appropriate discount. Any and all
upgrades will be made available for only the cost of
shipping. You will also receive with registration a fully
remarked version of ZCHECK. It actually runs but is incredibly
slow. You also get free support for one year. Why one year?
Because I simply do not wish to promise something that I will
regret. If you are not a pest you will probably get free
support for much longer than that, at least that is the way I
feel. It may however become impractical to supply support
for ZCHECK beyond on year. but I will do what I promise. I
promise one year.
The cost of ZCHECK is US $10.00 plus the cost of delivery if
you live outside of Canada or the US. The additional shipping
charge is US $2.00 . This total cost includes the disk,
suitable mailing container, postage and of course ZCHECK with
your registration information. This is the fairest arrangement I
can arrive at. Otherwise it gets into all kinds of you supply,
I supply, except, unless, but only and so forth. You may if you
wish send the funds drawn on a Canadian bank, but you must
calculate the exchange rate and include the full amount. If you
do not send the full amount you will not receive your disk or
registration information, however you will be registered.
Anyone who for any reason does not send the full amount and
later forwards the balance will receive their disk and
registration at that time.