home *** CD-ROM | disk | FTP | other *** search
/ Steganos Hacker Tools / SHT151.iso / programme / pw_system / john-16w / doc / RULES < prev   
Encoding:
Text File  |  1998-12-02  |  7.3 KB  |  187 lines

  1.  
  2.  Wordlist Rules Syntax
  3. =======================
  4.  
  5. Each wordlist rule consists of optional rule reject flags followed by one
  6. or more simple commands, listed all on one line and optionally separated
  7. with spaces. There's also a preprocessor, which generates multiple rules
  8. for a single source line. Below you'll find descriptions of rule reject
  9. flags, rule commands (many of them are compatible with Crack v5.0), and
  10. preprocessor syntax.
  11.  
  12.  Rule Reject Flags
  13. -------------------
  14.  
  15. -c    reject this rule unless current cipher is case-sensitive
  16. -8    reject this rule unless current cipher uses 8-bit characters
  17. -s    reject this rule unless some passwords were split at loading
  18.  
  19.  Position Codes
  20. ----------------
  21.  
  22. Character positions are numbered starting with 0, and specified in rules
  23. by the following characters:
  24.  
  25. 0...9    for 0...9
  26. A...Z    for 10...35
  27. *    for max_length
  28. -    for (max_length - 1)
  29. +    for (max_length + 1)
  30.  
  31. Here max_length is the maximum plaintext length supported for current
  32. ciphertext format.
  33.  
  34. The same characters are also used for specifying other numeric parameters.
  35.  
  36.  Character Classes
  37. -------------------
  38.  
  39. ??    matches '?'
  40. ?v    matches vowels: "aeiouAEIOU"
  41. ?c    matches consonants: "bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ"
  42. ?w    matches whitespace: " \t"
  43. ?p    matches punctuation: ".,:;'\"?!`"
  44. ?s    matches symbols "$%^&*()-_+=|\\<>[]{}#@/~"
  45. ?l    matches lowercase letters [a-z]
  46. ?u    matches uppercase letters [A-Z]
  47. ?d    matches digits [0-9]
  48. ?a    matches letters [a-zA-Z]
  49. ?x    matches letters and digits [a-zA-Z0-9]
  50.  
  51. The complement of a class can be specified by uppercasing its name. For
  52. example, '?D' matches everything but digits.
  53.  
  54.  Simple Commands
  55. -----------------
  56.  
  57. :    no-op: do nothing to the input word
  58. l    convert to lowercase
  59. u    convert to uppercase
  60. c    capitalize
  61. C    lowercase the first character, and uppercase the rest
  62. t    toggle case of all characters in the word
  63. TN    toggle case of the character in position N
  64. r    reverse: "Fred" -> "derF"
  65. d    duplicate: "Fred" -> "FredFred"
  66. f    reflect: "Fred" -> "FredderF"
  67. {    rotate the word left: "jsmith" -> "smithj"
  68. }    rotate the word right: "smithj" -> "jsmith"
  69. $X    append character X to the word
  70. ^X    prepend character X to the word
  71.  
  72.  Length Control Commands
  73. -------------------------
  74.  
  75. <N    reject the word unless it is less than N characters long
  76. >N    reject the word unless it is greater than N characters long
  77. 'N    truncate the word at length N
  78.  
  79.  English Grammar Commands
  80. --------------------------
  81.  
  82. p    pluralize: "crack" -> "cracks", etc (lowercase only)
  83. P    "crack" -> "cracked", etc (lowercase only)
  84. I    "crack" -> "cracking", etc (lowercase only)
  85.  
  86.  Insert/Delete Commands
  87. ------------------------
  88.  
  89. [    delete the first character
  90. ]    delete the last character
  91. DN    delete the character in position N
  92. xNM    extract substring from position N for up to M characters
  93. iNX    insert character X in position N and shift the rest right
  94. oNX    overstrike character in position N with character X
  95.  
  96. Note that '[' and ']' are control characters to the preprocessor: you
  97. should escape them with a '\' if using these commands.
  98.  
  99.  Charset Conversion Commands
  100. -----------------------------
  101.  
  102. S    shift case: "Crack96" -> "cRACK(^"
  103. V    lowercase vowels: "Crack96" -> "CRaCK96"
  104. R    shift each character right, by keyboard: "Crack96" -> "Vtsvl07"
  105. L    shift each character left, by keyboard: "Crack96" -> "Xeaxj85"
  106.  
  107.  Memory Access Commands
  108. ------------------------
  109.  
  110. M    memorize the word
  111. Q    reject the word unless it has changed
  112.  
  113.  Character Class Commands
  114. --------------------------
  115.  
  116. sXY    replace all characters X in the word with Y
  117. s?CY    replace all characters of class C in the word with Y
  118. @X    purge all characters X from the word
  119. @?C    purge all characters of class C from the word
  120. !X    reject the word if it contains character X
  121. !?C    reject the word if it contains a character in class C
  122. /X    reject the word unless it contains character X
  123. /?C    reject the word unless it contains a character in class C
  124. =NX    reject the word unless character in position N is equal to X
  125. =N?C    reject the word unless character in position N is in class C
  126. (X    reject the word unless its first character is X
  127. (?C    reject the word unless its first character is in class C
  128. )X    reject the word unless its last character is X
  129. )?C    reject the word unless its last character is in class C
  130. %NX    reject the word unless it contains at least N instances of X
  131. %N?C    reject the word unless it contains at least N characters of class C
  132.  
  133.  Extra "Single Crack" Mode Commands
  134. ------------------------------------
  135.  
  136. When defining "single crack" mode rules, extra commands are available for
  137. word pairs support, to control if other commands are applied to the first,
  138. second, or both words:
  139.  
  140. 1    first word only
  141. 2    second word only
  142. +    the concatenation of both (should only be used after a '1' or '2')
  143.  
  144. If you use some of the above commands in a rule, it will only process word
  145. pairs (full names, from the GECOS information), and reject single words.
  146. A '+' is assumed at the end of any rule that uses some of these commands,
  147. unless you specify it manually. For example, '1l2u' will convert the first
  148. word to lowercase, the second one to uppercase, and use the concatenation
  149. of both. The use for a '+' might be to apply some more commands: '1l2u+r'
  150. will reverse the concatenation of both words, after applying some commands
  151. to them separately.
  152.  
  153.  The Rule Preprocessor
  154. -----------------------
  155.  
  156. The preprocessor is used to combine similar rules into one source line.
  157. For example, if you need to make John try lowercased words with digits
  158. appended, you could write a rule for each digit, 10 rules total. Now
  159. imagine appending two-digit numbers -- the configuration file would get
  160. large and ugly.
  161.  
  162. With the preprocessor you can do these things easier. Simply write one
  163. source line containing the common part of these rules, and the list of
  164. characters you would have put into separate rules, in brackets (the way
  165. you would do in a regular expression). The preprocessor will then generate
  166. the rules for you (at startup for syntax checking, and once again while
  167. cracking, but never keeping all the expanded rules in memory). For the
  168. examples above, the source lines will be 'l$[0-9]' (lowercase and append a
  169. digit) and 'l$[0-9]$[0-9]' (lowercase and append two digits). These source
  170. lines will be expanded to 10 and 100 rules respectively. By the way, the
  171. preprocessor's commands are processed right-to-left, and the characters
  172. are processed left-to-right, which gets a normal order of numbers in such
  173. cases as in the example with appending two-digit numbers. Note that I only
  174. used character ranges in these examples, however you can combine them with
  175. character lists, like '[aeiou]' will use vowels, and '[aeiou0-9]' will use
  176. vowels and digits. If you need to try vowels first, and then all the other
  177. letters, you can use '[aeioua-z]' -- the preprocessor is smart enough not
  178. to produce duplicate rules in such cases.
  179.  
  180. There're some control characters in rules ('[' starts a preprocessor's
  181. character list, '-' marks a range inside the list, etc). You should prefix
  182. them with a '\' if you want to put them inside a rule without using their
  183. special meaning. Of course, the same applies to '\' itself. Also, if you
  184. need to start a preprocessor's character list at the very beginning of a
  185. line, you'll have to prefix it with a ':', or it would be treated as a new
  186. section start.
  187.