|
Message-ID: <20060617005638.GA7948@openwall.com> Date: Sat, 17 Jun 2006 04:56:38 +0400 From: Solar Designer <solar@...nwall.com> To: john-users@...ts.openwall.com Subject: Re: JtR -show output On Fri, Jun 16, 2006 at 05:56:57PM -0500, Randy B wrote: > > john --show passwd | fgrep : > cracked > > Random question, and has to do more with coding style than anything - > I'm sure you had a reason for not printing those to STDERR; would you > mind sharing it? Well, those last two lines are not an error message, so it is not obviously right to print them to stderr. Here's what I might change John to do: 1. Send the primary output of --show (the cracked passwords) to stdout. 2. Flush stdio buffers for stdout. 3. Send the "Cracked ... left ..." line to stderr. (And not print an empty line before it at all.) With no output redirection, the above change would affect the console output slightly (the empty line would not be printed). One disadvantage of this approach is that it would cause people to redirect stderr from John to /dev/null in some of their scripts. Then they would not get a chance to see real error messages, if any are printed. This is probably a good enough reason for not applying the above change. Another reason is that the distinction between stdout and stderr is non-obvious and hard to take advantage of for many non-Unix users. Instead, the --show option might be enhanced to accept an optional parameter list, which is needed for other reasons as well. For example: john --show=no-partial,no-summary passwd (in a future version of John) might print only fully-cracked passwords and not print the "Cracked ... left ..." line. -- Alexander Peslyak <solar at openwall.com> GPG key ID: B35D3598 fp: 6429 0D7E F130 C13E C929 6447 73C3 A290 B35D 3598 http://www.openwall.com - bringing security into open computing environments
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.