|
Message-ID: <20110823002129.GA4579@eee>
Date: Tue, 23 Aug 2011 04:21:30 +0400
From: Aleksey Cherepanov <aleksey.4erepanov@...il.com>
To: john-dev@...ts.openwall.com
Subject: check for filter() is added, patch and questions about it
To start being more involved in John development I tried to solve
problem that John does not check for filter() function when external
mode is used in conjunction with other mode. (I described this problem
on john-users list.)
This check seems to be like check for generate() function in
external.c . So I considered that it would be easier to be kept inside
ext_filter() function called from different placed. ext_filter() is
called for every word. So I added for every word wasteful check
'if (!f_filter) { error(); }'. It gave me 3% speed decrease with
external mode containing empty filter() function with dummy format
(echo 'a:$dummy$61' > hashes) and with rather big wordlist
(seq 10000000 > w). I tried to run it several times to figure out real
difference in speed but I am not sure my 3% are accurate. Is it good
even with such speed decrease?
So I searched for better place for this check. Finally I stoped on john.c
file right after ext_init() call. So I check options.flags to have any
mode flag or make-char-set flag and if so I check that filter() is
defined and so on like with generate(). Is it right place for the
check?
However I found that in John there is no Markov mode while in Jumbo
there is it. So I tried to make patch applicable for both John and
Jumbo using ifdef with Markov mode flag. Should I prepare separated
patches for John and Jumbo? Or should I prepare patch only for John?
Or should I prepare patch only for Jumbo?
I enclose patch applicable for both John and Jumbo that adds check for
filter() function right after ext_init() call.
Regards,
Aleksey Cherepanov
View attachment "john-1.7.8-filtercheck-1.patch" of type "text/x-diff" (846 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.