Академический Документы
Профессиональный Документы
Культура Документы
�� � �� � � �� � �� Ĵ� ��
�� � �� � � ����� �Ĵ� �� ���¿
�� � �� � � �� �� �� ڿ ��
����� �� ��� �� ����� �� ���� �����
���������������������������������������������
Unregistered evaluation copy.
UNP V3.15
Compressed executable file expander
DISCLAIMER
PURPOSE OF UNP
REQUIREMENTS
GENERAL INFO
HOW TO USE UNP
UNP IN ACTION
MESSAGES
WHAT UNP CAN HANDLE
NOTES ON COMPRESSORS
ERRORLEVEL VALUES
WHERE TO FIND UNP
HOW TO REGISTER
STILL LOOKING
THANKS
CONTACTING ME
DISCLAIMER:
-----------
Although UNP has been tested on several systems, I cannot guarantee that
UNP will be without bugs. Therefore, I do not take responsibility for any
damage directly or indirectly caused by UNP as a result of known or
unknown errors in it.
PURPOSE OF UNP:
---------------
UNP tries to reverse the action which programs like PKLITE and LZEXE
perform. In case you don't know, those programs use data compression on
executable files. Yet they leave these compressed files in a state such
that they can still be normally executed. This is great if you want to
save disk space, but it has its disadvantages. Anyone can now spread a
virus; just compress an infected file and the virus is invisible!
Debugging also becomes a lot more difficult since the code has become
unreadable. These are the primary reasons behind my writing UNP. I
could make up some story about loading/decompressing time, but we are
probably talking about a few 100ths of a second. Well, at least I don't
notice any delay on my 66Mhz...
Not only can UNP expand compressed executable files, it is also able to
remove other kinds of routines from such programs. For instance,
Central Point's Anti-virus (tm) Immunize codes can be safely removed.
Though this removal is currently limited to only a few routines, in the
future this ability might be greatly expanded.
REQUIREMENTS:
-------------
To run UNP you need at least a 8086 microprocessor. However if you want
to take full advantage of UNP, MS-DOS 5.0 (or higher) is recommended since
UNP tries to allocate UMBs. Lower versions of DOS will work without much
difference since UNP only uses base memory and UMBs. It requires about
15k of memory, with the additional amount of memory required depending on
the program being processed.
GENERAL INFO:
-------------
Before you start using UNP, I would like to point out a few things which
you might take into consideration.
Compressed EXE files containing an overlay may not work correctly after
they have been decompressed. Decompression expands the code size of the
EXE file which also means that the overlay moves up. Some programs do not
check where the overlay currently is but just use a constant to get the
overlay. If this is the case, most anything can happen.
When you use UNP to convert a file to another structure, please take
into consideration that the converted program never runs under the exact
same conditions as it did before. Though these differences are likely
not to cause any problems with most programs, there are always programs
which expect just that what is changed by conversion.
* commands:
e = expand compressed file (default)
This command expands the compressed file. If you do not specify a
command, UNP will use this by default. Using this command without a
wildcard will result in unpacking all files in the current directory.
i = info only
If you just want some information about the file, this is the command
to use. UNP will show all information like the E command but will
will not decompress or write the file back.
* options:
-? = help (this screen)
For a list of UNP commands or options use this switch. Any other
switch or command used on the same line will be ignored.
-a = automatic retry
Some files have been altered more than once. This switch will make
UNP to process the file again when it was changed. Useful when you
want to uncompress a file which also has been Immunized by CPAV.
-v = verbose
When you use this switch UNP will give you some additional information.
I added this switch for debugging purposes.
*[d:][/path]Infile
The wildcard UNP uses for selecting the files it will process can be
found as follows:
if you have specified a command but no Infile the wildcard '*.*' will
be used. If you have specified an Infile ofcourse this will be used
except for wildcards without an extension; those will get '.*' appended
and a flag will be set to select only .COM and .EXE files. If your
Infile ends with a '\', '*.*' will be appended.
*[[d:][/path]Outfile]
The destination file is optional. If you don't specify one, the source
file will be overwritten. You cannot use wildcards in this. Also, you
should not specify a destination file when you want to decompress more
than one file.
UNP IN ACTION:
--------------
When you execute UNP you can get several lines of information. Following
is an explanation of what those lines mean:
This shows the name of the file being processed as specified on the
command line.
file size : X
file structure :
- data file
The file does not contain the 'MZ' or 'ZM' signature but is too
large to be a COM file.
- binary (COM)
This is shown in all other cases.
EXE part sizes : header X bytes, code Y bytes, overlay Z bytes
Of course you will only get this line if you are processing an EXE file.
This shows how the file is built up. If you add X Y and Z you should
get the file size reported by DOS.
processed with :
If UNP recognizes some program's work in the file, it will try to tell
you what program it recognizes and when possible what version of that
program. If UNP does not really know what program has changed your
file but recognizes some programs work then that programs name will be
displayed between brackets (e.g. [EXEPACK]). If you have got such a
file then there are two possibilities, UNP knows about this program but
it is just unsure about the name/version or UNP doesn't know about it
at all. To find out if UNP knows about it, use the -v switch on this
program. If you got a message about breakpoints (see MESSAGES) then
UNP doesn't know this routine, I appreciate it if you would send me
that program or tell me where to find it.
action :
UNP not only decompress files it has the ability to do other
things as well. There can only be one action performed at a time.
This is a list of actions UNP reports:
- decompressing... done
This is the decompression action, probably the most used action.
new size : X
When the file has been written back UNP reports the new file size to
you in this line.
* INFO messages, these messages are only displayed when you have specified
the -V switch. I've added them for debugging purposes.
* DOS ERROR messages, these errors are things UNP tried to do but for some
reason your Operating System didn't allowed it. UNP will quit and will
have the I/O ERROR exit code. If you find any use for UNP you are
probably an experienced DOS user and know how to solve the problem so I
will only give you the messages.
NOTES ON COMPRESSORS:
---------------------
LZEXE V1.00a:
Several people have contacted me about this one. This utility is the
same as LZEXE V0.91, except for some minor options. It is offered
to the readers of INFO PC by IS2 France Diffusion (at least that's what
I think the text says). Unfortunately I don't know where it's
available.
PGMPAK V0.14:
When you compress a file with this compressor, an overlay of 12 bytes
will be added. To be exactly, the name and version number is added.
In this case: "PGMPAK V0.14". This overlay is not automatically removed
when you decompress it. To remove it, use the -R switch.
PKLITE:
PKLITE V1.00� seems to have a bug in it. While testing it, I found
that with some files an overlay of 512 bytes was added. Needless to
say that when this happened the compressed file did not run correctly.
Since UNP writes the file back as it would be run in memory the file
decompressed with UNP wouldn't run either. However extracting with
PKLITE -X resulted in the original file! Since this version of pklite
is hardly used and even more unlikely is that someone wants to
decompress such a file I didn't bother to write a new routine that
fixes that bug.
SCRUNCH:
In most cases, UNPs decompression routines are created when using
test files. Unfortunately I don't have a copy of scrunch so this is
a bit difficult to ensure it works. Of course there are other
decompression routines built the same way but the file I received
compressed with this compressor looked like it was converted to a
.COM file before it was compressed (it contained relocation items),
but this conversion could just as well be a part of the scrunch
compression. If I receive more files compressed with this one I will
improve and adjust the routine when needed.
SHRINK V1.00:
This compressor is a bad implementation of Run Length compression. It
contains two bugs one of which is in the decompression routine. The
bugs are triggered when the file to be compressed contains all 256
bytes. I have written my own decompression routine for this compressor
that is able to avoid one bug. The other bug is that the last byte of
the compressed file is thrown away making it impossible to fully
rebuild the file. If this is the case, UNP will display a warning. It
is always better to decompress it, even if the last byte is missing.
ERRORLEVEL VALUES:
------------------
0 no error occurred
1 help text is displayed
2 no files found to process
3 decompressing many files into 1 / Outfile contains wildcards
4 some I/O error occurred
5 could not allocate enough memory
6 CPU generated divide overflow
7 user pressed ^C or ^Break
HOW TO REGISTER:
----------------
I have decided to release UNP as freewhere. You are allowed to test this
program freely for a period of two weeks. If you decide to continue using
UNP you are expected to let me (the author) know where you are using my
program. To do this, send a postcard with some picture of your city to
the adress found at the end of the document. I would appreciate if you
would mention your full name and version you are using. Ofcourse if you
have got any suggestions you can put them on it as well!
Please don't feel offended by all of this, I just want to how much people
find any use for UNP. And hey, it beats sending money!
STILL LOOKING:
--------------
I am still trying to improve my program. If you'd like to help me with
that and you think you've got something useful, like a compressor or some
other program that manipulates files, please contact me or mail me the
program.
I also have a copy of SYSPACK V0.1 and SLIM V1.10 but these programs do
not really fit into UNP.
LATEST VERSION:
---------------
People have asked me how I make my programs available to the public.
Well, the first widespread version is V2.13 which I uploaded to Simtel
(a large Internet repository containing many MS-DOS files). I am unsure
how files are handled on Simtel but it seems that a file uploaded there
is made available on WSMR-SIMTEL20.Army.Mil and OAK.Oakland.Edu
automatically. There are several additional anonymous FTP sites that
mirror Simtel including wuarchive.wustl.edu.
Since I don't have FTP access I don't know how to get it through FTP :(
THANKS:
-------
Although I did all the programming, many people have helped me improve
this program. So thanks go to (in alphabetical order):
And many others, including all those people who noticed the infamous LZEXE
bug in V2.13.
CONTACTING ME:
--------------
If you want to contact me, my address and E-mail address can be found
below this text. Though E-mail used to be the fastest way to contact me,
it might take some time after, let's say, May 1993. After that I will
probably be working as a trainee somewhere and don't know if I will have
the time to go to the school on a regular basis.