Date: Fri, 13 Jul 2012 1:24:11 -0400 From: <jfoug@....net> To: john-dev@...ts.openwall.com Cc: Solar Designer <solar@...nwall.com> Subject: Re: XSHA_fmt_plug.c should support hashes in lower-case ---- Solar Designer <solar@...nwall.com> wrote: > On Fri, Jul 13, 2012 at 12:23:42AM -0400, jfoug@....net wrote: > In the core tree copy that I am currently hacking on (this is > unpublished code at this time), it does: I was able to work around this, but having 2 split functions, and then setting the proper pointer, when I set the unify case flag. > char *(*split)(char *ciphertext, int index, struct fmt_main *self); > > > Can the split function modify the buffer that is passed in, or should it copy to it's own static buffer? > > I was assuming that split() does not modify its input string, but I > don't know if the current code (split() callers) actually depends on > this assumption or not. The existing dynamic certainly had this bug. I simply took my new dyna-71 format, copied a single line 2 extra times, and set some upper case hex (same hex, just some chars upper case). The dynamic before the change found 1502, and after proper split and the bit being set, only 1500 were found. So it is obvious dynamic has had this bug for a long time. I will make some changes to make it 'easier' for the thin formats to have their own split function (some need one), yet still have access to the 'base' class split, to do the case unification. Thanks for explaining the split and case-unification, even if it was not directed at my code ;) Jim.
Powered by blists - more mailing lists
Powered by Openwall GNU/*/Linux - Powered by OpenVZ