Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 5 Jul 2012 14:50:27 +0200
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Make some more --list= commands work despite a broken config

I tried

$ ./john --list=formats

for an older binary (not *that* old:1.7.9-jumbo-6), and got:

Error, unknown flag:  Flag=MGF_FULL_CLEAN_REQUIRED
Error parsing section [List.Generic:dynamic_1003]
Error in line 63 file is ./dynamic.conf

$ echo $?
1

The only --list= commands that work are

--list=?
--list=build-info
--list=hidden-options

After compiling a new binary, and changing that line 63 in dynamic-conf
to simulate a newly introduced flag, I verified that this option works
as well (as expected):

--list=help[:WHAT]

This option should also work, because there is no need to read the config:

$ ./john --list=encodings
Error, unknown flag:  Flag=MGF_BUG_BUG_BUG
Error parsing section [List.Generic:dynamic_1003]
Error in line 63 file is ./dynamic.conf

I can't test --list=opencl-devices and --list=cuda-devices,
but I think it is the same here (I had a look at the code). Currently
these formats will fail, but they shouldn't.

That's why the attached patch moves processing these 3 --list= options
further up, so that the config is read afterwards.

Currently, the config is read inside

if (!make_check) {
...
}

I kept it this way, because I don't know if that was needed, or done by
accident.

I'm afraid for the other --list= options, we have to live with the fact
that a broken config makes these options fail.
Other commands which need to read the config fail in the same way:

$ ./john --test=0 --format=des
Error, unknown flag:  Flag=MGF_BUG_BUG_BUG
Error parsing section [List.Generic:dynamic_1003]
Error in line 63 file is ./dynamic.conf


Frank

View attachment "0001-Make-some-more-list-commands-work-despite-a-broken-c.patch" of type "text/x-patch" (1722 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.