Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 3 Jan 2013 20:01:08 +0100
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-users@...ts.openwall.com
Subject: Re: Sequence of format registration

On 01/03/2013 07:11 PM, magnum wrote:
> LC_ALL=C $(SED) -n 's/^struct fmt_main \([^ ]*\) =.*/john_register_one(\&\1);/p' *_fmt_plug.c > fmt_registers.h
> 
> LC_ALL affects how sed handles 8-bit characters, but it doesn't affect sort order from the globbing (cause it's not done by sed). We could fix it by piping it through "LC_ALL=C sort" before the redirect to file, but this adds a dependency on 'sort' (not that it should be a problem).
> 
> Note that this makes it sorted after format *struct* name (eg. "fmt_DMD5") but I consider that a good thing. This lets us do ugly tweaks for placing things first or last, without changing the source file name nor the format name to something odd. If we can add a dependency on sort(1), I'd vote for this.

Now this definitely gets more on-topic for john-dev again. I should have
posted an excerpt of my previous mail to john.dev.

I also thought about adding LC_ALL=C sort before redirecting output to
fmt_registers.h and to fmt_externs.h, but wasn't sure if that sort
seque3nce could break something (it shouldn't).

May be it is indeed a good thing to sort by format struct names.
This would allow some formats which were made non-plugins because of the
sort order to become plugins again, and it would allow an easy way to
register raw-sha512 before blake2-512.
(Side note: I think it would be better if formats would use format
struct names which are derived from the format name in the same manner,
except those formats which *need* to be registered before or after some
other formats.)

Frank

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.