Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 23 May 2012 00:43:39 +0200
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Fwd: bash auto-completion for john

On 05/22/2012 10:29 PM, magnum wrote:
> On 05/22/2012 07:39 PM, Frank Dittrich wrote:
>> Can someone post john's usage output for a CUDA/OpenCL build
> 
> Ah, yes. For CUDA builds there is -device only. For OpenCL builds, there
> are -platform and -device. A GPU build has both CUDA and OpenCL (and
> then the -device option will mean CUDA device or OpenCL device depending
> on what format you chose). They will show up like this in the usage blob:

Thanks for your reply.

> CUDA build:
> --device=N                set CUDA device, default 0

So, for a CUDA build I cannot provide completion for --device=

I hope $? will be != 0 if I try ./john --device=LIST.

> OpenCL build:
> --platform=N (or =LIST)   set OpenCL platform, default 0
> --device=N                set OpenCL device, default 0

Normally, I should check whether --platform=N (or -pla:N ...) exists on
the command line, and list only devices for that platform.
(This will have to wait for a later release, I'm afraid.)

> GPU build:
> --platform=N (or =LIST)   set OpenCL platform, default 0
> --device=N                set OpenCL or CUDA device, default 0

Same as above, but for CUDA there could even be other device numbers...
Tricky.
Whether CUDA or OpenCL is used depends on the format name, I guess.

What is the output of
$ ./john --list=build-info

for CUDA / OpenCL / GPU build?

> The question is mostly about what distribution you use.

Fedora 16.

> --device=LIST (or --platform=LIST which is currently exactly the same)

John's usage output (as provided above) currently doesn't indicate that
"--device=LIST" is allowed (for GPU and OpenCL).

Can --device=LIST in combination with --platform=N be changed to only
list devices for platform N, instead of listing all devices for all
platforms?

Or doesn't this make sense at all?

I already started implementing completion after reading the source, but
somehow I missed that --platform=LIST will list platforms and devices.
I think I fixed the logic now.

Currently, I would list these completion options for --platform= for
your build (unless I made a stupid mistake):
0 1 LIST
And --platform=l would get expanded to --platform=list

For --device=, I would just find one value (0), and complete --device=
to --device=0, without listing LIST as a possible completion.

Since I cannot yet test completion for --device= and --platform=, can
you do it before committing the change? Thanks.


BTW:
There is an inconsistency between john options and options for the jumbo
version of unique.
While john allows --option and -option, unique only allows -option.
Should that be fixed? (If so, the usage output should use --option, even
if -option is allowed (--v should only be allowed as an abbreviated form
of --verbose).
Then, I could also complete -option to --option, to be consistent with
completion for john.
Is this important?
There is another inconsistency:
john allows -option:value, while unique doesn't allow -option:value.
(But I wouldn't spend effort changing this.)

Frank

View attachment "john.bash_completion" of type "text/plain" (18704 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.