home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / private / pw500.zip / PASSWORD.DOC < prev    next >
Text File  |  1993-02-06  |  23KB  |  465 lines

  1.                              PASSWORD 5.0
  2.                          (C)1993 Ray Dittmeier
  3.                              P.O. Box 4724
  4.                          Louisville, KY  40204
  5.  
  6.  
  7.  
  8. DESCRIPTION
  9.  
  10.      PASSWORD is designed with two main ideas in mind.  The first is
  11. that a good password protection program shouldn't look like a password
  12. protection program, and the second is that even though you can't keep
  13. a determined expert out no matter what you do, you can at least design
  14. a feature or two that will probably keep most folks out, and that will
  15. tip you off if someone has been poking around at your system.
  16.  
  17.      When PASSWORD starts, it gives you a normal-looking but phony C>
  18. prompt.  Type in anything but the correct password, and the program
  19. gives a "Bad command or file name" message.  After a specified number
  20. (chosen by you) of wrong guesses, it goes into an endless loop of
  21. giving the phony C> prompt, accepting input, running the disk drive a
  22. little (for the sake of realism), and giving the error message.  The
  23. only way out of the loop is to reboot the computer.  What we hope is
  24. that the intruder will think something is wrong with the computer,
  25. give up, and go down to the corner bar for a beer.
  26.  
  27.      However, typing in the correct password will cause the program to
  28. display a message telling you the time and date of the last attempted
  29. access, and whether or not the correct password was entered.
  30.  
  31.  
  32. FILES YOU SHOULD HAVE:
  33.  
  34. 1.  PASSWORD.EXE--The main program.
  35. 2.  NEW.EXE--A utility program that allows you to change the password.
  36. 3.  PASSWORD.DOC--This documentation file.
  37.  
  38.      The password provided with the program is "hello" (without the
  39. quotation marks).  The program is case-sensitive, meaning that upper
  40. case letters and lower case letters are not interchangeable.
  41.  
  42.  
  43.  
  44. RUNNING THE PROGRAM:
  45.  
  46.      PASSWORD is designed to be run from your AUTOEXEC.BAT file.
  47. Since batch files can be terminated early by hitting Control-C,
  48. PASSWORD should run as early in your AUTOEXEC.BAT as possible.  This
  49. will give your intruder less opportunity to cut it off.  Ideally,
  50. PASSWORD should be preceeded only by ECHO OFF (or @ECHO OFF), and by
  51. the PATH command if necessary (discussed below).  After displaying the
  52. above-mentioned "last attempted access" information, PASSWORD waits
  53. for you to press any key to continue.  This way, you have the
  54. opportunity to read the message and still run subsequent programs from
  55. AUTOEXEC.BAT.
  56.  
  57.      PASSWORD gives you various options for controlling its appearance
  58. and behavior.  You can select these options by using command-line
  59. parameters when you run the program.  (Command-line parameters are
  60. merely commands you type after the name of a program at the DOS
  61. prompt.  For example, when you type FORMAT A:, the "A:" part is a
  62. parameter.)
  63.  
  64.      The parameters can be typed in any order, and must be separated
  65. by spaces.  The parameters, and what they do, are:
  66.  
  67. F : This parameter will cause PASSWORD to save the last attempted
  68.     access information to a text file called PLOG.TXT instead of
  69.     displaying it on the screen.  (You can't get it to use PLOG.TXT
  70.     and display the information on the screen at the same time; it's
  71.     either/or.)  The program will put the time and date in an ASCII
  72.     text file, so you can use any text editor (or even DOS' TYPE
  73.     command) to look at it later.  If the correct password was
  74.     entered, the program adds a + sign after the time/date for that
  75.     attempt.  If the correct password was not entered, the program
  76.     puts a - after the time/date.
  77.  
  78.     The first time you use the F option, PASSWORD creates PLOG.TXT. 
  79.     Thereafter, it adds the time/date/result of each attempt to the
  80.     file.  PLOG.TXT will appear in the same subdirectory with the
  81.     PASSWORD program.  If you want to move PLOG.TXT to a different
  82.     subdirectory, PASSWORD will be able to find it, and add to it
  83.     where it is, as long as it's in a subdirectory included in your 
  84.     PATH command.
  85.  
  86.     Using F will also bypass the "press any key" feature after the
  87.     password is entered.  Therefore, anyone watching over your
  88.     shoulder may not catch on that a password program is running.  
  89.     Or if they do, it won't be apparent that the program keeps 
  90.     track of when the computer is turned on.
  91.  
  92. (any number) : Tells PASSWORD to give the user the given number of
  93.     chances to enter the correct password before going into the
  94.     endless loop.  For example, if you run the program with
  95.  
  96.        PASSWORD 5
  97.  
  98.     the program will go into the endless loop after the fifth time
  99.     something wrong is typed in.  Of course, if the right password is
  100.     entered before the fifth input, the last access information is
  101.     displayed immediately, and the program proceeds onward from there.
  102.  
  103.     If no parameter is given, PASSWORD gives you, by default, three
  104.     chances.  
  105.  
  106.     If 0 (number zero) is entered, the program will continue to accept 
  107.     input until the correct password is typed in, no matter how many 
  108.     times the user tries.
  109.  
  110. A : This parameter tells PASSWORD to sound an alarm each time an
  111.     incorrect password is entered.
  112.  
  113. O : This parameter will cause PASSWORD to simulate loading a different
  114.     operating system when it starts.  You will see a message that "The
  115.     Delta Operating System is being loaded," with some disk drive
  116.     activity, and you will see a different prompt.  But the PASSWORD
  117.     program will still operate exactly as it does otherwise.
  118.  
  119. W : This parameter will cause PASSWORD to execute a warm boot after
  120.     the last-allowed incorrect password is entered.  For example, if
  121.     you're using the program with the default of allowing three
  122.     incorrect passwords, W will warm boot the computer after the third
  123.     incorrect entry.  Of course, if you use 0, giving users an
  124.     unlimited number of guesses, there will be no warm boot.
  125.  
  126. P : Allows the user to designate his or her own prompt.  By default,
  127.     the program uses C> as the phony prompt.  But you can set your own
  128.     by entering it on the command line, with P as the first character
  129.     to tell PASSWORD that what follows is a new prompt.  As is the
  130.     case with the regular DOS prompt command, the $ character can be
  131.     used to put certain items in the prompt:
  132.  
  133.          $D = Current Date (read from system clock)
  134.          $T = Current Time (read from system clock)
  135.          $G = > (the "greater than" character)
  136.          $L = < (the "less than" character)
  137.          $_ = Space
  138.  
  139.     Note that $_ is not one of the choices in the regular DOS PROMPT
  140.     command.  In DOS, a blank space can be placed in the prompt by
  141.     merely putting a space in the appropriate place in the PROMPT
  142.     command.  However, PASSWORD will interpret a blank space as a
  143.     space between parameters; therefore, anything after the space will
  144.     be seen as a different parameter and left out of the prompt.  So
  145.     $_ is necessary to give you the possibility of including a space.
  146.  
  147.     A period cannot be used in the prompt.  If a period occurs
  148.     anywhere in your P parameter, PASSWORD will think the entire
  149.     parameter is supposed to be a file name rather than a prompt. 
  150.     (The reason for entering a file name is explained below.)
  151.  
  152.     Although DOS recognizes other "$ commands" for its prompts, the
  153.     ones listed above are the only ones PASSWORD uses.  Anything else
  154.     you want, such as a directory name, must be typed in exactly as
  155.     you want it.  For example, if you want your PASSWORD prompt to
  156.     give the current time and show the C:\ directory with the usual >
  157.     character at the end, enter
  158.  
  159.          PASSWORD P$TC:\>
  160.  
  161.     Using the letter P by itself will give you no prompt at all; the
  162.     cursor will appear at the left-hand edge of the screen.
  163.  
  164. The following six parameters affect the screen display only.  The 
  165. PASSWORD program will still recognize the real letters you type from 
  166. the keyboard.  These options are designed to confuse intruders,  hide 
  167. the password if someone's looking over your shoulders, or both.
  168.  
  169. R : Displays a randomly chosen ASCII character instead of the actual
  170.     letter typed from the keyboard.  Remember that some ASCII codes,
  171.     when sent to the screen, will do things like give you carriage
  172.     returns, backspaces, beeps, etc., which may be distracting.  So
  173.     with R, it might take a bit of extra concentration to get the
  174.     password correct.
  175.  
  176. L : Displays a randomly chosen letter, rather than actual letter typed
  177.     at the keyboard.  (Not any ASCII character, as with "R"; this
  178.     option limits the choice to letters of the alphabet.)  If you type
  179.     an upper-case letter, an upper case letter will be displayed.  If
  180.     you type a lower case letter, a lower case letter will be
  181.     displayed.
  182.  
  183.     This option can be useful if other people are likely to be in the
  184.     room when you turn on your computer.  Anyone who watches the
  185.     screen will, we hope, think the randomly-chosen letters are
  186.     actually the password.
  187.  
  188.     In addition to selecting this option by typing "L" on the command
  189.     line, you can also turn it on after the program's already running.
  190.     Merely press the Tab key, and all further input will give randomly
  191.     chosen letters on your screen.
  192.  
  193.     The reason for this "Tab" feature is that using "L" in your
  194.     AUTOEXEC.BAT will give it to you every time.  But if you have
  195.     extra people lurking in the room only occasionally, you might want
  196.     to use it only on those occasions.
  197.  
  198. D : Displays a dot (period) instead of the letter typed.
  199.  
  200. N : Displays nothing in response to keyboard entry (until the Enter
  201.     key is pressed).
  202.  
  203. B : Clears the screen and displays nothing at all--not even a cursor.
  204.  
  205. V : This parameter will cause PASSWORD to start with a phony virus
  206.     warning.  The message (falsely) identifies the program as "Virus
  207.     Cop" (as far as I know, there's really no program by that name)
  208.     and states that a virus has been detected.  The message instructs
  209.     the user to "run the INSPECT program from the original floppy disk
  210.     in your VIRUS COP package before proceeding further.  Insert disk 
  211.     in drive A and press return to continue."  Any time an incorrect
  212.     password is entered, the program runs the A drive a bit, beeps,
  213.     and repeats the message--as if it's looking for the INSPECT
  214.     program and not finding it.  However, all you have to do is enter
  215.     the correct password.
  216.  
  217. Some of the parameters described above can be used in various
  218. combinations; others can't.  For example, you can use V and O 
  219. together.  It'll simulate loading the other operating system, then
  220. give the phony virus warning.  However, B and R won't work at the same
  221. time; B gives you nothing on your display, and R gives you random
  222. characters.  They are, obviously, not compatible.  However, if you
  223. choose options that don't work together, it's not a problem.  PASSWORD
  224. will merely use the one that appears first on the command line and
  225. ignore the other.  If you don't get what you expect on the screen,
  226. it's likely you've chosen a combination of options that won't work
  227. together.
  228.  
  229.  
  230. Any file name (as a parameter):
  231.      First, a brief (I hope) explanation.
  232.      The program maintains a text file called PLS.COM (by default),
  233. which contains:
  234. 1.  The current password,
  235. 2.  The date and time of the last attempted access, and
  236. 3.  Whether the correct password was given.
  237.      The .COM extension in the file name is just in case an intruder
  238. gets in and pulls up a directory listing.  He's not likely to try to
  239. look at the file with the "TYPE" command, since he'll think it's a
  240. program.  But even if he does for some weird reason, he'll just see
  241. high-ASCII graphics characters because the file's encrypted--hopefully
  242. giving the appearance of an authentic .COM file.
  243.      Obviously, PLS.COM will be read from, and written to, every time
  244. you start your computer.  But it was brought to my attention by a user
  245. of an earlier version of PASSWORD that his virus-detection program
  246. sounds an alarm every time an .EXE or .COM file is modified.  Not
  247. really a big deal.  In fact, I like the idea (thus the A option
  248. described above).  But modifying a .COM file could be a real problem
  249. with other virus-detection schemes, or for people who don't want an
  250. alarm.
  251.      So I've provided the possibility to have PASSWORD use a name
  252. other than PLS.COM for its text file.  Simply enter the new name you
  253. want to use for the text file as a command-line parameter, and
  254. PASSWORD will use that name instead.  This file doesn't have to be in
  255. the same subdirectory with PASSWORD; if you don't want it there,
  256. specify the full subdirectory name or make sure it's in a subdirectory
  257. included in your PATH command.
  258.      If you use this feature, keep the following in mind:
  259.  
  260. 1.  The new file name must have an extension (the one-to-three-
  261.     letter part of the file name that follows the period, such as the
  262.     .COM in PLS.COM).  It doesn't matter what the extension is, but
  263.     PASSWORD looks for the period to determine whether a parameter is
  264.     a file name.  If there's no period, the program won't recognize it
  265.     as a file name.  If you don't want to use an extension, put a
  266.     period at the end of the file name on your command line:  
  267.     PLS. rather than PLS 
  268. 2.  Make absolutely sure that the new name you use isn't the name of a
  269.     file that already exists.  Otherwise, PASSWORD won't work
  270.     correctly, and you'll destroy the already- existing file that has
  271.     that name.
  272. 3.  Test-run PASSWORD after you set it up to use the new file name.  
  273.     If you've make a mistake in typing in the new file name, PASSWORD
  274.     will display the error message "Illegal file name for PASSWORD
  275.     data file."  In this case, the problem is probably one of two
  276.     things.  Either you've used an illegal file name (consult your DOS
  277.     manual for guidelines on legal file names), or you've specified a
  278.     subdirectory that doesn't exist on your system.
  279.  
  280.  
  281. EXAMPLES
  282.  
  283. PASSWORD A R 4
  284. will run PASSWORD with the alarm option, have it display random ASCII 
  285. characters, and give the user four chances to enter the correct 
  286. password.
  287.  
  288. PASSWORD O 0 C:\DOS\SAMPLE.TXT
  289. will run password with the simulation of another operating system, 
  290. give the user an unlimited number of chances to enter the correct 
  291. password, and use a file called SAMPLE.TXT (located in the 
  292. subdirectory C:\DOS) instead of PLS.COM.
  293.  
  294. PASSWORD N B
  295. will run password with the N parameter option only--it can't run both
  296. N and B, and N appears first on the command line.
  297.  
  298. PASSWORD O B
  299. This is one I particularly like.  It gives the simulation of the other
  300. operating system, leaving the "Delta" message at the top of the
  301. screen, but gives no prompt or cursor.  It gives the appearance that
  302. loading Delta locked up the machine.
  303.  
  304. PASSWORD P$D$T$G 2 L F
  305. will run PASSWORD with a prompt that gives the current date and time,
  306. ending with the > character.  It gives you two chances to enter the
  307. correct password, and displays random letters in response to what you
  308. type.  The "attempted access" information is added to PLOG.TXT, and is
  309. not displayed after the password is entered.
  310.  
  311.  
  312. OTHER IDEAS
  313.  
  314.      I named PASSWORD and NEW as I did to make them easy for you to
  315. identify.  However, this will, at least in the case of PASSWORD, make
  316. identification easy for the intruder also, should he happen to get in. 
  317. You may want to rename them to something less obvious.  If you do,
  318. though, keep in mind that they must have the .EXE extension in order
  319. to run.
  320.  
  321.      Also, you can place each file in a different directory.  If you
  322. do this, be sure of two things:
  323.  
  324. (1) PLS.COM (or the renamed version) must be in the same subdirectory
  325. with PASSWORD, or in a subdirectory listed in your PATH command, or
  326. its directory must be specified on your PASSWORD command line.
  327. (2) The PATH command, if you need it, must come before the call to
  328. PASSWORD in AUTOEXEC.BAT.
  329.  
  330.  
  331. CHANGING THE PASSWORD
  332.  
  333.      To change the password, I've provided NEW.EXE.  If you're using a
  334. different name than PLS.COM for your data file, enter that name after
  335. you type NEW at the DOS prompt.  Typing
  336.  
  337.       NEW C:\DOS\SAMPLE.TXT
  338.  
  339. will run NEW and instruct it not to look for PLS.COM, but for
  340. C:\DOS\SAMPLE.TXT instead.
  341.  
  342.      If you specify a file name, and there is no file with the name
  343. you specify, NEW will create it.  If you don't specify a file name,
  344. NEW will use PLS.COM.
  345.  
  346.      If you don't specify a subdirectory, NEW will first look in the
  347. current directory to see if the information file exists.  If it's not
  348. there, it will look at all the subdirectories listed in your PATH
  349. command, if you have one.  If it still doesn't find the file, the
  350. program will create a new one with the name you specified on the
  351. command line--or, if you didn't specify a name, it will use PLS.COM.
  352.  
  353.      When NEW starts, it gives you a ? as a prompt.  Enter the current
  354. password.  The program then prompts you to type in your new password.
  355. The new password can be up to 79 characters long and can include any
  356. character that can be typed on the keyboard, including spaces.  NEW
  357. then replaces the old password in PLS.COM (or its replacement) with an
  358. encrypted version of the new one.  The last access information
  359. contained in the file is preserved.  Or, if appropriate, NEW creates a
  360. new file containing the password you give it.
  361.  
  362.      If, when starting NEW, you enter an illegal file name, or specify
  363. a subdirectory that doesn't exist, NEW will merely stop and give you
  364. back your real DOS prompt.
  365.  
  366.      If, at NEW's ? prompt, you enter the wrong password, the program
  367. harmlessly goes back to DOS.  You get just one chance to get it right,
  368. but if you make a mistake, you can run NEW again.
  369.  
  370.  
  371.  
  372. A FEW OTHER NOTES:
  373.  
  374.      PASSWORD can be run at times other than when you boot up your
  375. computer.  For example, suppose you're running an application that has
  376. a DOS Shell feature.  When you're ready to go out to lunch, simply
  377. shell to DOS and run PASSWORD.  This will keep other folks in the office
  378. from snooping around on your machine.  If you do this, it might be a
  379. good idea to use the 0 option (unlimited number of wrong entries).
  380. That way, if someone gets curious, you'll still be able to get back in,
  381. no matter how much typing your curious friend does.  In any case, be
  382. certain to save your work first.
  383.  
  384.      If you're using an option that doesn't display your input (N, B, or
  385. V), and you lose track of what you're typing, remember that Escape will
  386. wipe out anything you've typed for the current entry.  So you can hit
  387. Escape and start over without PASSWORD counting a wrong guess.  (I just
  388. mention this because it might be useful some time, but some folks might
  389. not think of it if they can't see any input.)
  390.  
  391.      If PLS.COM isn't present (such as the first time you run the
  392. program, or if something happens to erase it), PASSWORD will create a
  393. new one.  The only way you will know this has happened will be if you
  394. are sure you have entered the correct password but are still denied
  395. access.  In this case, the password will be "hello."
  396.  
  397.      When PASSWORD creates a new PLS.COM, it will be in the same
  398. subdirectory as the program itself, unless you've specified a
  399. different subdirectory with the "rename PLS.COM" option described
  400. above.  If you've specified a different file name on your PASSWORD
  401. command line, the new PLS.COM-type file will have the name you gave
  402. it.
  403.  
  404.      If you forget your password, simply follow these steps:
  405. (1) Start your computer with a bootable floppy disk in drive A, so
  406. that PASSWORD will not run.
  407. (2) Delete PLS.COM.  (Or whatever name you're using for the file)
  408. (3) Run NEW.  The password will be "hello".  It will create a new
  409. PLS.COM containing the password you enter at the ? prompt.
  410.  
  411.      PASSWORD is set up to simulate DOS with as much realism as is
  412. reasonably possible.  For this reason, the F1 key will give you a
  413. single character from your previous entry (if there is a previous
  414. entry), and the F3 key will reproduce your entire previous entry.
  415. The Escape key will erase anything you've typed in your current
  416. entry.
  417.  
  418.      However, if the L option is in effect, F1 will give you any
  419. random character that can be typed from the keyboard.  F3 will display
  420. a different, but same-sized, set of random characters.  If you're
  421. using the R option, those two keys will do the same thing, but will
  422. give you any ASCII character at random.
  423.  
  424.      After entering the correct password, keep in mind that if the
  425. message indicates the password was not given, this still doesn't mean
  426. the intruder didn't get in.  He may have figured out that he was
  427. dealing with some kind of security system and rebooted with a floppy
  428. disk in drive A.  Of course, PASSWORD has no way of knowing if this
  429. happens, but if the intruder starts out by trying to boot off the hard
  430. drive (and that's the most likely thing he'd do), you'll at least know
  431. someone was there.  A hedge against this would be to include PASSWORD
  432. in the AUTOEXEC.BAT of each of your bootable floppy disks (The
  433. password program doesn't have to be on the disk; just specify C: and
  434. the path in the line that calls it).  This way, the intruder will have
  435. to bring his own disk in order to avoid PASSWORD.
  436.  
  437.      I was careful to design PASSWORD so that it would run smoothly if
  438. used correctly, and I'm sure I succeeded.  Further, the possibility of
  439. disaster is, to the best of my knowledge, nonexistent, because you can
  440. always bypass PASSWORD by booting off drive A.  However, since this is
  441. a harsh and unpredictable world, and since I've seen people do many
  442. weird and impossible things on computers, I feel it's prudent to
  443. disclaim responsibility for any disasters that may result from the use
  444. of this software.  I'm happy to help with whatever problems I can, but
  445. don't send me a bill for a new computer.
  446.  
  447.      Finally, I'm distributing this program as shareware.  Feel free to
  448. copy it and pass it around; just be sure to keep all the files together.
  449. If you're a distributor, put it in your catalog and send me a copy.
  450. If you like and use PASSWORD, please register it for $12.00, and I'll
  451. send you a disk with more programs.  These programs will be my most
  452. popular and/or most recent ones.  Usage of anything on the disk is
  453. covered by the one registration fee you'll already have paid.  So you
  454. may use any or all of the programs with no further obligation.  Also,
  455. I'd like to receive any comments, criticisms, or suggestions you may
  456. have, and I'll be glad to answer questions.  Send all correspondence
  457. to:
  458.  
  459.      Ray Dittmeier
  460.      P.O. Box 4724
  461.      Louisville, Ky.  40204
  462.  
  463. E-mail can be sent on GEnie to R.DITTMEIER, or on CompuServe to
  464. 71650,1214.
  465.