Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 19 Jul 2012 21:48:38 +0200
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: [PATCH] New --list=[sections|parameters=SECTION|list-data=SECTION]

I developed this patch against 1.7.9-jumbo-6-fixes, because it is not
intrusive, and I think this functionality is useful (if you have doubts,
please ask).
But the patch applied cleanly against latest bleeding-jumbo as well.

Instead of further explanations, I'll just insert the commit description
and diff stat.
----------------------------------------------------------------------
--list=sections prints all existing sections from john.conf
or the config file specified with --config=, resolving includes
The order in which these sections are listed is reversed to
the order of the definition of these sections

--list=parameters:SECTION prints all the parameter definitions
that exist in a section, included sections and included files
are resolved.
If a parameter is defined multiple times, it appears multiple times
in the list.
The order of definitions printed is reversed, compared to the order
of the parameter definitions.

--list=list-data:SECTION prints all the lines in a section that
doesn't contain parameter definitions, but list data.
Included sections and included files are resolved.
Comments (lines starting with '#' or ';') are not printed.
Indention is not preserved, i.e., there are no leading spaces.

--list=help:parameters lists the names of sections which include
parameter definitions

--list=help:list-data lists the names of sections which
(are supposed to) contain list data instead of parameter
definitions

The bash completion script also needed a few adjustments to get
this working.
---
 run/john.bash_completion |   19 +++++++++++--
 src/config.c             |   50 ++++++++++++++++++++++++++++++++++++
 src/config.h             |   25 ++++++++++++++++++
 src/john.c               |   64
++++++++++++++++++++++++++++++++++++++++------
 4 files changed, 147 insertions(+), 11 deletions(-)

----------------------------------------------------------------------
Frank

View attachment "0001-New-list-sections-parameters-SECTION-list-data-SECTI.patch" of type "text/x-patch" (9835 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.