home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
vrac
/
chkpt10.zip
/
README.TXT
< prev
Wrap
Text File
|
1996-04-09
|
6KB
|
121 lines
The file chkpt10.zip contains a system utility by Luigi Mancinelli.
CHKPTBL.C
CHKPTBL.COM
README.TXT -- This file
The C sources are written for Borland Turbo C 2.0 and could require even
a lot of work to be compiled with different versions of C. They are plain C
and maybe could be easily translated in assembler, because they don't use
tipical C functions.
+++++++++++++++++++++++
CHKPTBL.C - CHKPTBL.COM
This program compares the root sector (that is partition table for
hard disks and boot sector for floppy disks) and, optionally (in the
case of an hard disk), the boot sector with data stored in a supplied
file.
The data files could be generated always with this same program.
A lot of options allow a full control of program, but has to be re-
membered that such a program works at an intimate level with the com-
computers hardware and so its use must be very careful. No warranties
are given and the author could not be claimed responsible for damages
produced by the use of the program.
One possible use of this program is to save root and boot sector of
the hard disk and check them every boot (inserting a command in the
autoexec.bat file) to reveal undesired changes (maybe a virus) and e-
ventually, with maximum care, restore the original data.
syntax:
CHKPTBL [switches] <file-name>
<file-name> is the data file to compare root sector with.
If no extension is present extension .TBL is added, if a di-
rectory name is supplied (ending with '\') the default name
PARTTBL.TBL is used. If no name is supplied no check is made.
switches:
/H[1..Number of physical hard drive - default 1] selects the phy-
sical hard drive subsequent commands refer to.
For default hard drive 1 is taken.
/F[1..Number of physical floppy drive - default 1]selects the phy-
sical floppy drive subsequent commands refer to.
If /F with no number is specified physical floppy 1 is taken
/S Stop if differences are found between data stored in the fi-
le and actual root (boot) sector.
/C If differences are found between data stored in the file and
actual root (boot) sector, correct them restoring the data in
file.
/B[+|-] Set the "Check boot sector too" option true(/B+) or false
(/B-). If this switch is not specified the option is false,
if only /B is specified the option is set to true.
/W[+]<file-name> Store drive-data to <file-name> (ext. and name as
for reference file). If the file already exists, if /W+ is
specified the file is overwritten, otherwise nothing is done.
If the "Check boot sector too" option is actually true and
the actually selected drive is an hard whose partition number
one is a dos bootable partition even the boot sector is saved
(for a total of 1024 bytes),otherwise only the root sector is
written to the file.
example:
CHKPTBL /Wfile1 /B /H2 /Wfile2/F/Wfile3 /H/Wfile4 C:\DOS\
Actions:
The root sector of hard drive 1 is written to file1, the root sec-
tor of hard drive 2 (which is generally a not dos-bootable disk) is
written to file2, the root sector (which is the boot sector) of the
floppy drive 1 (usually a:) is written to file3 and the root sector
and the first partition's boot sector (if it's a DOS-bootable par-
tition) of the hard drive 1 are written to file4 and both are com-
pared with the file C:\DOS\PARTTBL.TBL.
(c) 1996 by Luigi Mancinelli
manci@alpha.science.unitn.it
Note: If the program has to be recompiled, the tiny model has to be
used and the resulting .exe has to be converted in .com (with the DOS
utility EXE2BIN for example) or the program doesn't work.
===========================================================================
LICENCE
-------
The files here included can be freely distributed, provided
that they're distributed together, without stripping copyright
informations and without any change (I'd like to get blame for
my own errors and credit only where it is due - as Chris Dun-
ford says). Commercial use couldn't be done without contact
the author.
NO WARRANTY
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDER PROVIDE THE PROGRAM "AS IS"
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST
OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL THE COPYRIGHT HOLDER, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENE-
RAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF THE
HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
(c) 1996 by Luigi Mancinelli
E-Mail: manci@alpha.science.unitn.it
Post :
Luigi Mancinelli
c/o Laboratori Didattici
Facoltà di Scienze
Università degli Studi di Trento
38050 POVO-TRENTO (TN)
ITALY