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 22:52:04 +0400
From: Aleksey Cherepanov <aleksey.4erepanov@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Fwd: bash auto-completion for john

On Wed, May 09, 2012 at 02:42:48AM +0200, Frank Dittrich wrote:
> On 05/09/2012 01:15 AM, magnum wrote:
> > On 05/09/2012 12:31 AM, Frank Dittrich wrote:
> >> OK. Currently implemented:
> >>
> >> 1.
> >> Improved expansion for --config= (only files *.conf and *.ini will be
> >> suggested; IMO this is what sane people would want to have, even if you
> >> could also name your config file john.log)
> >> Negative side effect: expansion for ~ doesn't work anymore, but that is
> >> probably less important. (I hate doing this "manually", there really
> >> must be another way. The code is already full of ugly hacks, no need to
> >> add even more of them.)
> > 
> > Is your very first approach, with "complete -F _filedir_xspec john" not
> > usable together with auto-completion?
> 
> No, because the
> 	complete -F _filedir_xspec john
> in my .bashrc would overwrite the
> 	complete -F _john john
> at the end of the bash completion script.

Did you look inside _filedir_xspec? Could you call this function for
expansion or use similar approach?

> you can check the effect with
> 
> complete -p|grep john
> 
> >> For proper support of --incremental=, --external=, --rules=, --single=,
> >> I think we need a hidden option in john to get those lists (2 different
> >> lists for --external; one for modes with generate() function, one for
> >> modes without) in an easy to parse way.
> > 
> > Maybe I'll get time to have a look at this soon-ish. So at a minimum we
> > need the following:
> > 
> > --list=incremental
> > --list=ext-modes  (external w/ generate)
> > --list=rules
> > --list=filters	(external w/o generate)
> 
> Yes. If splitting external modes is too hard, just one list will do.
> (The two separate lists are only needed when I start interpreting other
> command line options. But I never intended to write a bash completion
> script for john which is larger than the one for git.
> But may be these separate lists are needed for the GUI as well.)

It is not critical for gui but it would be nice. Because in gui these lists
are separate by design and could be used easily.

Also it could be helpful to have an option to show where default configuration
file is stored. Probably there should be information about other default files
too. Or maybe it is only needed to show either it is local installation or
system wide.

Regards,
Aleksey Cherepanov

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.