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

On 05/09/2012 08:17 AM, magnum wrote:
> On 05/09/2012 02:42 AM, Frank Dittrich wrote:
>> But this works:
>> $ ./john --markov
>> --markov               --markov=LEVEL[:opts]
> 
> This is actually better, as --markov by itself is also valid. Though if
> you write --markov= and then TAB, I presume it will write all that to
> your line.

It would have, but I handled the --markov=* case before --markov.
For --markov=*, I don't provide any completion.

 Still, I think this would be a good addition. A similar
> approach could be used for -users, -groups, -shells and -salts.

IMO, this won't work.
The option --markov is valid without =value, but the others aren't.

If I would have just --users on the command line, and press [tab], I
would end up with --users=[-]LOGIN|UID[,..]

> Perhaps you could do this:
> $ ./john --markov
> --markov               --markov[=LEVEL[:START[:END[:LENGTH]]]]
> 
> This is even better than the usage blob, where this is too long to fit.

Sure.
I did, however, remove the outer pair of square brackets, otherwise the
second option would include the first one as a special case.

$ ./john --markov
--markov                               --markov=LEVEL[:START[:END[:LENGTH]]]

If we extend the usage of markov to --markov=MKV_SECTION (referring to a
section [Options.Markov:...], we can add the third option to the
expansion logic.

Frank

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