|
Message-ID: <20191113155734.GA6614@openwall.com> Date: Wed, 13 Nov 2019 16:57:35 +0100 From: Solar Designer <solar@...nwall.com> To: john-users@...ts.openwall.com Subject: Re: skip or try passwords with repeated characters On Wed, Nov 13, 2019 at 04:40:11PM +0100, Solar Designer wrote: > I've just written the following two external modes, which I think others > might find useful as well. We'll likely add them to default john.conf. The handling of "now" wraparound at 1 billion input candidates was wrong in the code I posted. Oops. Corrected version (tested by triggering the wraparound earlier): [List.External:Filter_NoRepeats] int seen[0x100], now; void init() { now = 1; } void filter() { int i, c; if (!--now) { i = 0; while (i < 0x100) seen[i++] = 0; now = 1000000000; } i = 0; while (c = word[i++]) { if (seen[c] == now) { word = 0; return; } seen[c] = now; } } [List.External:Filter_Repeats] int seen[0x100], now; void init() { now = 1; } void filter() { int i, c; if (!--now) { i = 0; while (i < 0x100) seen[i++] = 0; now = 1000000000; } i = 0; while (c = word[i++]) { if (seen[c] == now) return; seen[c] = now; } word = 0; } Alexander
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.