>From f84b31cb1d7b16f4a890d03434003c224237f8f5 Mon Sep 17 00:00:00 2001 From: Frank Dittrich Date: Fri, 20 Jul 2012 18:52:22 +0200 Subject: [PATCH 1/2] Define new [List.External:Repeats_*] sections ... with restricted character sets (instead of 0x20-0xff) Repeats_digits: '0' - '9' Repeats_lowercase: 'a' - 'z' Repeats_printable_ASCII: ' ' - '~' All of these sections as well as the original section [List.External:Repeats] now include a new section [List.External_base:Repeats] containing variable definitions and the generate() function. --- run/john.conf | 60 ++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 49 insertions(+), 11 deletions(-) diff --git a/run/john.conf b/run/john.conf index f17dcaf..d9e51c7 100644 --- a/run/john.conf +++ b/run/john.conf @@ -1208,19 +1208,9 @@ void restore() } # Try strings of repeated characters. -[List.External:Repeats] +[List.External_base:Repeats] int minlength, maxlength, minc, maxc, length, c; -void init() -{ - minlength = 1; - maxlength = 72; - minc = 0x20; - maxc = 0xff; - - length = minlength; c = minc; -} - void generate() { int i; @@ -1238,6 +1228,54 @@ void generate() c = 0; // Will NUL out the next "word" and thus terminate } +[List.External:Repeats] +.include [List.External_base:Repeats] +void init() +{ + minlength = 1; + maxlength = 72; + minc = 0x20; + maxc = 0xff; + + length = minlength; c = minc; +} + +[List.External:Repeats_digits] +.include [List.External_base:Repeats] +void init() +{ + minlength = 1; + maxlength = 72; + minc = '0'; + maxc = '9'; + + length = minlength; c = minc; +} + +[List.External:Repeats_lowercase] +.include [List.External_base:Repeats] +void init() +{ + minlength = 1; + maxlength = 72; + minc = 'a'; + maxc = 'z'; + + length = minlength; c = minc; +} + +[List.External:Repeats_printable_ASCII] +.include [List.External_base:Repeats] +void init() +{ + minlength = 1; + maxlength = 72; + minc = ' '; + maxc = '~'; + + length = minlength; c = minc; +} + # Generate candidate passwords from many small subsets of characters from a # much larger full character set. This will test for passwords containing too # few different characters. As currently implemented, this code will produce -- 1.7.7.6