|
Message-ID: <20120507093114.GA9726@debian> Date: Mon, 7 May 2012 13:31:14 +0400 From: Aleksey Cherepanov <aleksey.4erepanov@...il.com> To: john-users@...ts.openwall.com Subject: Re: file name expansion for --wordlist= and file name starting with ~ On Mon, May 07, 2012 at 10:42:53AM +0200, Frank Dittrich wrote: > On 05/07/2012 10:02 AM, Aleksey Cherepanov wrote: > > On Sun, May 06, 2012 at 02:52:47PM -0600, Stephen John Smoogen wrote: > >> On 6 May 2012 13:59, Frank Dittrich <frank_dittrich@...mail.com> wrote: > >>> did anybody else of you notice that for --wordlist=filename, even bash > >>> auto-completion for file names starting with ~/ or ~user works, but john > >>> fails to recognize e.g. --wordlist=~/test.txt? > > > > It does not work for me too. > > > > $ bash --version > > GNU bash, version 4.2.20(1)-release (x86_64-pc-linux-gnu) > > ... > > $ apt-cache show john > > Package: john > > Version: 1.7.8-1 > > ... > > Filename: pool/main/j/john/john_1.7.8-1_amd64.deb > > $ bash --version > GNU bash, version 4.2.24(1)-release (i386-redhat-linux-gnu) > > The john version is irrelevant, since this seems to be a bash issue. > (That's why it might be off topic here, but since I started the thread, > I'd like to add some more findings.) It seems there are two problems: with bash and with john. I think john has problem too because Stephen said that expansion occurs for him but we know that bash does not expand. Hence the question why does one john expand ~ while others don't? I guess it could depend on library that parses arguments and options. > > I do not think that shell should expand this. I think it should expand ~ only > > at the begin of argument: > > Yes, the bash documentation suggests the same. > But then, why is it expanding such filenames in GNU options (starting > with --, like --wordlist=) and even in normal option? Bash itself does not need (and should not) know meaning of arguments and options of programs. But auto-completion is the other thing: to be more comfortable it should know meaning of arguments to complete them right. But we see that it does not do its job well for some versions/builds of john. It is the second problem. Maybe completion's developers tested their completions on the version of john that expands ~ itself. Other approach is to expand it on the cmd line in-place (like your bash do for vim). 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.