Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 20 Jul 2012 23:42:39 +0200
From: Frank Dittrich <>
Subject: Re: Some more external mode definitions

On 07/20/2012 08:39 PM, Frank Dittrich wrote:
> On 07/20/2012 08:06 PM, Solar Designer wrote:
>> I don't mind, but I felt that Repeats was quick enough as it was, except
>> maybe for very slow hashes/ciphers - but in those rare cases you'd
>> probably want to reduce the length first / as well.
> BTW: I should try to write a patch which makes the max. password length
> (for the format, or specified using --stdout=LENGTH) available in
> external modes.
> Then, the external mode could stop if the length exceeds the max. length.

Now I did exactly this.
I created a new predefined external mode variable "maxlen" (filled
either from the --stdout[=LENGTH] value (default 125) or from the

I grepped all the conf files. I only found uses of "maxlength", not

The new predefined variable is documented in doc/EXTERNAL.

I made use of it in the [List.External_base:Repeats] section,
and removed "maxlength" here.

So, to cleanly apply this patch, the new [List.External:Repeats_*]
sections introduced in the previous patch have to stay.
$ ./john --stdout=2 --ext=repeats_digits 2>/dev/null|wc -l
$ ./john --stdout=10 --ext=repeats_digits 2>/dev/null|wc -l

$ ./john --stdout=1 --ext=repeats_lowercase 2>/dev/null|wc -l

$ ./john --stdout=1 --ext=repeats_printable_ascii 2>/dev/null|wc -l

Other external modes which generate more candidates per length shouldn't
switch to "maxlen" instead of the current limit.
Instead, they might consider reducing the hard coded max. length in
init(), should the format specific maximum length or the length
specified with --stdout=LENGTH be shorter than the hard coded maximum
Otherwise, these external modes would effectively produce duplicate
password candidates.


View attachment "0001-New-external-mode-variable-maxlen.patch" of type "text/x-patch" (4530 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.