Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BLU0-SMTP41110E6A8049C716C4FFD0FD4C0@phx.gbl>
Date: Sat, 15 Dec 2012 11:07:11 +0100
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Re: bash completion failures

On 12/14/2012 11:20 PM, magnum wrote:
> There are some recent problems with bash completion. At first I thought it was OSX only so I postponed reporting it for collecting more data, but it seems to be general.
> 
> Normal options work fine. Hidden options does not seem to work at all.
> 
> ../run/john --req[tab][tab]
> 	->
>  nothing happens

[...]

> ../run/john --list=req[tab]
> 	->
> ../run/john --list=request-
> 
> 
> ../run/john --list=request-sc[tab]
> 	->
> ../run/john --list=request-scalar
> 
> 
> So the hidden options are there, but misplaced!

Now I did have some time to look into the issue.
Since I don't have a CUDA or OpenCL build, I didn't know about
request-scalar and request-vectorize.

So I grepped the source, and found
	printf("request-vectorize, request-scalar, ");
in john.c, inside john_list_options().

So, expanding
./john --list=request-sc[tab]
to
./john --list=request-scalar
is correct.
I also found
	puts("--request-vectorize       request vectorized mode");
	puts("--request-scalar          request non-vectorized mode");
in options.c inside print_hidden_usage(void).

After removing the #ifdefs, I can see these options with
--list=hidden-options and with --list=help.

After these changes, on my system
./john --req[tab]
completes to
./john --request-
and
./john --request-s[tab]
completes to
./john --request-scalar

.john --list=re[tab]
completes to
./john --list=request-
and
./john --list=request-v
completes to
./john --list=request-vectorize

So far, for me everything works as designed.

Of course, if I try to run those commands, I get:
$ ./john --list=request-vectorize
Section [request-vectorize] not found.
help[:WHAT], subformats, inc-modes, rules, externals, ext-filters,
ext-filters-only, ext-modes, build-info, hidden-options, encodings,
formats, format-details, format-all-details, format-methods[:WHICH],
sections, parameters:SECTION, list-data:SECTION,
request-vectorize, request-scalar, <conf section name>

$ ./john --request-scalar
Unknown option: "--request-scalar"

But that is to be expected, since I don't use a CUDA/OpenCL version and
instead just removed the #ifdefs for the usage output.

Does completion work for you if you try other hidden options like
--plug[tab]?

Are you sure you really use the latest john.bash_completion, and not
some older version?

Can you send me the output of these commands:
./john
./john --list=hidden-options
./john --list=help
(Private mail is OK. If I find what caused your problem, I can post a
summary to the list.)

Thanks.

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.