home *** CD-ROM | disk | FTP | other *** search
/ Lion Share / lionsharecd.iso / utils_mz / putpass1.zip / PUTPASS1.DOC next >
Text File  |  1987-03-26  |  9KB  |  225 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. PUTPASS v 1.0       Copyright (C) 1987 by Danny Cornett and John Harrington
  7. Command
  8.  
  9. DISTRIBUTION RIGHTS: allowed by authors without infringement of the copyright.
  10.  
  11. 1. The work may be freely used, copied, and distributed etc. by the 
  12.    processor, as long as the only charge is for reasonable media and
  13.    reproduction costs, etc. 
  14.  
  15. 2. Under no conditions may the work be used for commercial purposes or as
  16.    an endeavor to reap financial gain, etc. without written permission
  17.    from the authors.
  18.  
  19. 3. Under no conditions may this work be distributed in modified form,
  20.    without written permission from the authors.
  21.  
  22. 4. The work shall not be released in any form to the PUBLIC DOMAIN.
  23.  
  24. 5. The authors retain all ownership rights of this work, as well as
  25.    distribution rights with the exception of those set out.  
  26.  
  27. 6. LIMITED WARRANTY:  THE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY
  28.    OF ANY KIND.  THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF
  29.    THE PROGRAM IS ASSUMED BY THE USER SHOULD THE PROGRAM PROVE DEFECTIVE.
  30.    YOU (AND NOT THE AUTHORS) ASSUME THE ENTIRE COST OF ALL NECESSARY
  31.    SERVICING, REGARDING THE USE OF, OR THE RESULTS OF THE USE OF, THE 
  32.    PROGRAM IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS,
  33.    OR OTHERWISE; AND YOU RELY ON THE PROGRAM AND RESULTS SOLELY AT 
  34.    YOUR OWN RISK.
  35.  
  36.    NEITHER THE AUTHOR NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE
  37.    CREATION, PRODUCTION, OR DELIVERY OF THIS PROGRAM SHALL BE LIABLE
  38.    FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES
  39.    ARISING OUT OF THE USE, THE RESULTS OF USE, OR INABILITY TO USE SUCH 
  40.    PRODUCT EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF
  41.    SUCH DAMAGES OR CLAIM.  
  42.  
  43.    The authors are not aware of any known bugs in PUTPASS at this time,
  44.    but Murphy's law says there are probably several. We suggest that
  45.    in any case you keep a BACKUP of all your programs and data just in
  46.    case disaster occurs. One of may favorite statements concerning BACKUP
  47.    is:
  48.  
  49.    "The only difference between a professional PC user and an amateur
  50.    is that the professional will BACKUP his system." - JR Harrington
  51.  
  52. 7. THE USE OF THIS PROGRAM INDICATES ACCEPTANCE OF THESE TERMS 
  53.    AND CONDITION. 
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. Introduction to PUTPASS:
  67. -------------------------------------------------------------------------
  68. Danny Cornett did all the programming,  John Harrington 
  69. conceived the need for PUTPASS, assisted in requirements and 
  70. assembling/editing this documentation.  This program was designed 
  71. for use on an IBM Personal Computer using DOS 3.0 and greater, but
  72. should work on DOS 2.x systems as well. However, it has not been
  73. tested on older DOS versions nor on IBM compatibles.
  74. -------------------------------------------------------------------------
  75.  
  76. Purpose:  PUTPASS is a program that adds code to an executable file 
  77.           so that a password must be supplied before the executable 
  78.           will be executed. At the present time, only .COM files 
  79.           are handled.
  80.  
  81.  
  82. Format:   The use of putpass is very straight forward:
  83.  
  84.           putpass myfile.com
  85.  
  86.           If myfile does not already have a password, a password 
  87.           will be requested and verified (there is no echo to the 
  88.           screen). The password code will then be added, with a 
  89.           resulting output file named "myfile.cpm" which can then
  90.           be renamed to "myfile.com" after dealing with the original
  91.           version of "myfile.com" (BACKUP, rename or blow it away). Note
  92.           that the extension is not checked, and the program is assumed to
  93.           be a .COM file. If it isn't, it will be more or less destroyed
  94.           (But remember that the original is not bothered, so no big deal.
  95.           You will have an "executable ASCII" file, until the password
  96.           code jumps to the ASCII text, if you add password code to your
  97.           black book file).
  98.  
  99.           If myfile already has the password code added, the old 
  100.           password will be requested, and if successfully entered, 
  101.           the password will be CHANGED. Again, "myfile.cpm" will be 
  102.           the output with the original file still present.
  103.  
  104.           myfile.com must be less than 64k - (password code size) - 10 bytes,
  105.           but that is no big deal for .COM files as they are limited to 64k,
  106.           and will not likely be this large.  (.EXE files are another story,
  107.           but that's for another day). Presently, the password code size is
  108.           652 bytes, and the other 10 is approximate stack usage.
  109.  
  110.  
  111. -----------------------------------------------------------------------
  112. WARNING!  If you forget your password, you will not be able to access
  113.           your .COM program.  Plan to place the original un-passworded
  114.           program in a safe place (Backup or Archive) in case of an
  115.           emergency or future needs.
  116. -----------------------------------------------------------------------
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126. Remarks:  MAKING PUTPASS
  127.  
  128. There are some non-automatic things that must be done to generate a new
  129. putpass executable module; further coding can automate some of these. Here
  130. is how to make the program.
  131.  
  132.     1. Assemble the password.asm code, preserving the symbol table.
  133.     2. Run the makprogh program with the password.com file present
  134.        in the same directory, and its name as a command line argument.
  135.        This creates a file named progh.h which is needed by putpass.c.
  136.     3. From the symbol table, obtain the hexadecimal addresses of FIRST
  137.        and PSTART; edit these values in the password.h file. (This could
  138.        be "automated").
  139.     4. Compile putpass.c
  140.  
  141.  
  142. There are several programs and files involved in the overall scheme:
  143.  
  144.     1. C source programs
  145.  
  146.         putpass.c   the program that does the surgery
  147.         makprogh.c  the program that converts the assembly
  148.                 language password code to a C include file
  149.         encrypt.c   the encryption/decryption routines, actually
  150.                 done as an include in putpass.c - I was too
  151.                 lazy to do a separate compile/link, but this
  152.                 can be readily corrected
  153.         password.h  the include file with definitions for putpass
  154.                     and encrypt. This file may need editing if
  155.                     the assembly code is altered.
  156.         progh.h     the include file which is generated from the
  157.                 makprogh program. It is a structure of the
  158.                 password.com program generated from the
  159.                 assembly sources.
  160.  
  161.     2. Assembly source programs; actually, several files to be put
  162.        together to make the password.asm program
  163.  
  164.            bxor.asm
  165.            callem.asm
  166.            extend.asm
  167.            merge.asm
  168.            pwhead.asm
  169.            pwtail.asm
  170.            scramble.asm
  171.            split.asm
  172.  
  173. The order of the assembly modules is important as follows:
  174.  
  175.     pwhead.asm must be first
  176.     extend.asm must be second
  177.     callem.asm must be third
  178.     compare.asm must be fourth
  179.     pwtail.asm must be last
  180.  
  181. The other files may be anywhere between callem.asm and pwtail.asm. "makit.bat"
  182. is included to concatenate the files, but the assumption is that the user has
  183. the program "cat". If not, makit.bat still shows the order I used for the
  184. files.
  185.  
  186.  
  187. The assembly files were assembled using CHASM, so some rework will be
  188. necessary if a "standard" assembler is used. These items come quickly to mind:
  189.  
  190.     1) the CHASM offset function needs conversion to the OFFSET operator
  191.     2) arithmetic can be done by the assembler rather than doing
  192.        equates for coupled parameters (the "super version" of CHASM
  193.        can also handle this)
  194.     3) "movsb" == movs BYTE, etc.
  195.  
  196.  
  197. The Computer Innovations C86 compiler was used for the C sources using the
  198. big model (the whole program is brought into memory at once); there are
  199. some gotchas here as well - see the source code for known flaws.
  200.  
  201. -----------------------------------------------------------------------
  202.  
  203. If you wish to report bugs, make suggestions for improvements, or just
  204. relate your experience with PUTPASS, you may contact:
  205.  
  206. John R. Harrington
  207. 1147 Willowood Dr.
  208. Milford, Ohio 45150
  209.  
  210. MICROLINE,  513 243-0188 (Data) SYSOP
  211.  
  212. CPCUG MIX,  301 480-0350 (Data) SYSOP Utility Conference
  213.  
  214. Danny D. Cornett
  215. 2417 Monatana Ave. #B6
  216. Cincinnati, Ohio 45211
  217.  
  218. PLEASE, DO NOT SEND ANY FORM OF MONEY, this program is provided as a 
  219. thanks to those who have contributed fine software for PC users.
  220.  
  221. Enjoy!
  222.  
  223.  
  224.  
  225.