Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 7 May 2011 14:54:33 -0500
From: "JimF" <>
To: <>
Subject: Re: Plumbing changes   [moved from john-users]

From: "magnum" Sent: Saturday, May 07, 2011 1:59 PM
Subject: Re: [john-dev] Plumbing changes [moved from john-users]

> On 2011-05-07 20:14, jfoug wrote:
>> I wonder if this could be done:
> That's a cool idea. Just drop a new format file named *_fmt.c in the src 
> directory and rebuild. It doesn't even sound too hard to accomplish.

I did not figure this would be 'too' hard.  However, there are a couple 
gotcha's along the way. There may be certain order dependancies (md5_gen has 
to be init() prior to any thin format using it).  Also, the order they are 
init, is the 'precendence' used for finding which hash's valid is the one 
used, if the user does not supply a -format=X param. Thus, we would want to 
keep some form of consistancy (at least where it matters).  It may also be 
that the buildin's are in the code, and the make rule only builds format 
declarations and definitions for non-core formats.

It may be that a true script is the best way to go about building these code 
include files.

Likely, the formats would have to have certain 'core' values, in code in 
certain 'exact' ways.  Like #define FORMAT_NAME "name" might be one of them. 
We may also want to do things like have:


Then, only proper formats could be included in the build.  Thus, 
experimentals could be in the source tree, but if the user only wants a 
'stable' release, then only the core and stable formats would be included.

Again, I think it is ./configure which usually does stuff like this 
(with -enable=xyz  -disable=yzx ...), but this would give us some of this, 
with not to huge of a change.

> For Makefile, listing object files is easy:
> $ ls -1 *_fmt.c | sed 's/\.c$/.o/'
> AFS_fmt.o
> BFEgg_fmt.o
> BF_fmt.o
> ...
> For the "extern struct fmt_main" and "john_register_one()", this rough 
> example line catches all 51 formats I had there:
> $ grep struct *_fmt.c|grep =|grep fmt_main|grep -v pFmt|awk '{print $3}'
> fmt_AFS
> fmt_BFEgg
> fmt_BF
> ...

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.