Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 26 Aug 2011 12:12:00 -0500
From: "jfoug" <jfoug@....net>
To: <john-dev@...ts.openwall.com>
Subject: #include "john.conf2"  (a wish list item)

I have done this.  It really is in PoC state right now.  

 

The changes were surprisingly trivial.  I simply made a change in
cfg_process_line(), so that when it sees a comment line, if the line does
not start with #include ", then it works like it used to. If it does start
with #include " then I set a recursion level, and call cfg_init() again with
the new file.  When cfg_init() returns, I decrement the recursion level.  If
the recursion level exceeds 4, then john bails out with an error message (to
avoid john.conf including john.confx which includes john.conf, or some
similar sillyness).   There was a simple change also needed to be made to
cfg_init, since it already had logic that did not allow it to be called more
than once.  Now, it 'can' be called more than once, if recursion level is >
0.

 

All in all, a very trivial change.  There may still be other things to do to
get it to 'really' work right.  It may return the wrong file name (or wrong
line number), if there are errors, I have not checked that out, but imagine
that is the case.  Also, I have not updated the documentation at all.  I
simply wanted to get this out.   There may also be issues if using
non-standard locations of john.conf, and how the includes 'find' the right
file.

 

This will likely be used by advanced john users.  Now, it would be easier to
build a library of rules, or library of externs, filters, etc.  Then have a
nice short john.conf that includes these 'library' files.  I certainly may
look at changing how the md5_gen (soon to be generic/general/common/template
or some other 'name), script file to be a library that is included.

 

Also, one way to do john.conf may be:

 

[Options]

# setup of the global options.

#include "incrementals.confh"

#include "rules.confh"

#include "filters.confh"

#include "externs.confh"

#include "scripts.confh"

 

However, I can certainly see putting dumb16, dumb32 and md5-gen scripts into
stand alone included conf data.  That will cut the conf file back down to a
manageable size, since it has grown hugely recently.

 

Jim.


Content of type "text/html" skipped

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.