home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / programs / kc9_src.arj / PWP.H < prev   
Encoding:
C/C++ Source or Header  |  1991-10-07  |  5.4 KB  |  115 lines

  1. /****************************************************************************\
  2.  
  3. **        Password Preprocesser v2.00 - Password Cracker Guess Mutator      **
  4.  
  5. ** ======================================================================== **
  6.  
  7. **                Sourcefile: pwp.h -- Last Update: 09/20/91                **
  8.  
  9. ** ======================================================================== **
  10.  
  11. **           Written By Doctor Dissector, Copyright (C) 1990, 1991          **
  12.  
  13. ** ======================================================================== **
  14.  
  15. **                   LIMITED EDITION -- DO NOT DISTRIBUTE                   **
  16.  
  17. \****************************************************************************/
  18.  
  19.  
  20.  
  21. /*=[ License ]==============================================================*/
  22.  
  23.  
  24.  
  25. /*
  26.  
  27. ** Password Preprocesser - Version 2.00
  28.  
  29. ** Copyright (C) 1991 By Doctor Dissector
  30.  
  31. **
  32.  
  33. ** This program is NOT free software BUT may be used without charge or
  34.  
  35. ** payment in any form IF your copy is a "registered" distributed version.
  36.  
  37. ** You may modify it as much as you please, however, you MAY NOT re-
  38.  
  39. ** distribute it, in any shape or for: ie. modified OR unmodified,
  40.  
  41. ** without the expressed written consent (ie. e-mail) of
  42.  
  43. ** Doctor Dissector.
  44.  
  45. **
  46.  
  47. ** This program was initially distributed in the hope that it will be
  48.  
  49. ** useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  50.  
  51. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  52.  
  53. */
  54.  
  55.  
  56.  
  57. /*=[ Disclaimer ]===========================================================*/
  58.  
  59.  
  60.  
  61. /*
  62.  
  63. **  The author of this package, Doctor Dissector, will not assume liability
  64.  
  65. **  for ANY of the effects of the use or distribution of this package.  If
  66.  
  67. **  you, at ANY time compile or use this package, you will assume full
  68.  
  69. **  liability for your own actions; Doctor Dissector can neither enforce the
  70.  
  71. **  lawful use of this package nor your actions before, during, or after
  72.  
  73. **  exposure to this package.  Doctor Dissector does NOT endorse your unlawful
  74.  
  75. **  use of this package to appropriate computer accounts not under your lawful
  76.  
  77. **  ownership.
  78.  
  79. **
  80.  
  81. **  The original intent of this package was to prove that Un*x accounts can be
  82.  
  83. **  easily, efficiently, and effectively cracked utilizing modified DES
  84.  
  85. **  encryption routines and proper statistical, mathematical, logical, and
  86.  
  87. **  programming skills.
  88.  
  89. */
  90.  
  91.  
  92.  
  93. /*=[ Copyright ]============================================================*/
  94.  
  95.  
  96.  
  97. char pwp_h_msg[] = "Source: pwp.h, Copyright (C) 1990, 1991 By Doctor Dissector";
  98.  
  99.  
  100.  
  101. /*=[ General Definitions ]==================================================*/
  102.  
  103.  
  104.  
  105. #define MAX_FILE          256       /* Maximum filename/pathname length */
  106.  
  107. #define MAX_LINE          512       /* Maximum length of /etc/passwd lines */
  108.  
  109. #define MAX_TAIL          256       /* Maximum argument tail length */
  110.  
  111. #define MAX_XCHAR          20       /* Maximum amount of xlate characters */
  112.  
  113. #define MAX_WORD           81       /* Maximum word length */
  114.  
  115.  
  116.  
  117. /*=[ Command Definitions ]==================================================*/
  118.  
  119.  
  120.  
  121. #define ERROR_FLAG         -1       /* Command error */
  122.  
  123. #define DOUBLE_FLAG        10
  124.  
  125. #define GECOS_FLAG         20       /* Use GECOS fields */
  126.  
  127. #define HELP_FLAG          30       /* Help/Display usage */
  128.  
  129. #define INCLUDE_FLAG       40       /* Include original words */
  130.  
  131. #define KC_FLAG            50       /* Using KC9 format */
  132.  
  133. #define LOGINS_FLAG        60       /* Use login fields */
  134.  
  135. #define LOWERCASE_FLAG     70       /* All lowercase */
  136.  
  137. #define LOWREVERSE_FLAG    80       /* Lowercase & reverse */
  138.  
  139. #define MINLENGTH_FLAG     90       /* Minimum lengths */
  140.  
  141. #define NONALPHA_FLAG     100       /* Non-alphabetic characters */
  142.  
  143. #define NOVOWELS_FLAG     110       /* No vowels */
  144.  
  145. #define PREFIXES_FLAG     120       /* Prepend characters */
  146.  
  147. #define REVERSE_FLAG      130       /* Reverse */
  148.  
  149. #define TRANSLATE_FLAG    140       /* Translate chars */
  150.  
  151. #define SUFFIXES_FLAG     150       /* Append characters */
  152.  
  153. #define UPCHAR_FLAG       160       /* Make a char uppercase */
  154.  
  155. #define UPLAST_FLAG       170       /* Make last char uppercase */
  156.  
  157. #define UPPERCASE_FLAG    180       /* All uppercase */
  158.  
  159. #define UPREVERSE_FLAG    190       /* Uppercase & reverse */
  160.  
  161.  
  162.  
  163. /*=[ Structure: cmd ]=======================================================*/
  164.  
  165.  
  166.  
  167. struct cmd {
  168.  
  169.     char *cmd_name;
  170.  
  171.     int  unique,
  172.  
  173.          cmd_code;
  174.  
  175. };
  176.  
  177.  
  178.  
  179. /*=[ Variable: struct cmd cmdtab[] ]========================================*/
  180.  
  181.  
  182.  
  183. struct cmd cmdtab[] = {
  184.  
  185.     { "?",          1,  HELP_FLAG       },
  186.  
  187.     { "double",     1,  DOUBLE_FLAG     },
  188.  
  189.     { "gecos",      1,  GECOS_FLAG      },
  190.  
  191.     { "help",       1,  HELP_FLAG       },
  192.  
  193.     { "include",    1,  INCLUDE_FLAG    },
  194.  
  195.     { "kc",         1,  KC_FLAG         },
  196.  
  197.     { "logins",     3,  LOGINS_FLAG     },
  198.  
  199.     { "lowercase",  4,  LOWERCASE_FLAG  },
  200.  
  201.     { "lowreverse", 4,  LOWREVERSE_FLAG },
  202.  
  203.     { "minlength",  1,  MINLENGTH_FLAG  },
  204.  
  205.     { "nonalpha",   3,  NONALPHA_FLAG   },
  206.  
  207.     { "novowels",   3,  NOVOWELS_FLAG   },
  208.  
  209.     { "prefixes",   1,  PREFIXES_FLAG   },
  210.  
  211.     { "reverse",    1,  REVERSE_FLAG    },
  212.  
  213.     { "suffixes",   1,  SUFFIXES_FLAG   },
  214.  
  215.     { "translate",  1,  TRANSLATE_FLAG  },
  216.  
  217.     { "upchar",     3,  UPCHAR_FLAG     },
  218.  
  219.     { "uplast",     3,  UPLAST_FLAG     },
  220.  
  221.     { "uppercase",  3,  UPPERCASE_FLAG  },
  222.  
  223.     { "upreverse",  3,  UPREVERSE_FLAG  },
  224.  
  225.     0
  226.  
  227. };
  228.  
  229.