--- john.conf.orig 2010-02-26 04:22:09 +0300 +++ john.conf 2010-03-08 00:35:31 +0300 @@ -775,10 +775,7 @@ } # Generic implementation of exhaustive search for a partially-known password. -# This is pre-configured for length 8, lowercase and uppercase letters in the -# first 4 positions (52 different characters), and digits in the remaining 4 -# positions - however, the corresponding part of init() may be modified to use -# arbitrary character sets or even fixed characters for each position. +# init() may be modified to use arbitrary character sets for each position. [List.External:KnownForce] int last; // Last character position, zero-based int lastofs; // Last character position offset into charset[] @@ -795,17 +792,36 @@ /* This defines the character sets for different character positions */ pos = 0; +/* Position 1 */ + ofs = pos++ << 8; + i = 0; + c = 'a'; + while (c <= 'z') + charset[ofs + i++] = c++; + c = 'A'; + while (c <= 'Z') + charset[ofs + i++] = c++; + charset[ofs + i] = 0; +/* Positions 2, 3, 4 */ while (pos < 4) { ofs = pos++ << 8; i = 0; - c = 'a'; - while (c <= 'z') - charset[ofs + i++] = c++; - c = 'A'; - while (c <= 'Z') + c = '0'; + while (c <= '9') charset[ofs + i++] = c++; charset[ofs + i] = 0; } +/* Position 5 */ + ofs = pos++ << 8; + i = 0; + c = 'a'; + while (c <= 'z') + charset[ofs + i++] = c++; + c = 'A'; + while (c <= 'Z') + charset[ofs + i++] = c++; + charset[ofs + i] = 0; +/* Positions 6, 7, 8 */ while (pos < length) { ofs = pos++ << 8; i = 0;