Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 7 Dec 2009 15:05:25 -0600
From: "Jim" <jfoug@....net>
To: <john-users@...ts.openwall.com>
Subject: RE: -nodupes option of JimF patch broken (not works at all)

I think this may be the problem.  There are a couple of places where there
were !db->options->nodupes was being checked, but in the 'wordlist' mode
(default now if the wordlist is smaller in size), this code was not 
present.  Thus in wordlist mode, the -nodupes switch was not being honored.
I think this (hope at least) that this is the bug listed.  Also the nodupes
option variable was not being set (but a flag was).  That flag was not
accessable
at certain points at runtime, so I simply changed options.c to set the older

variable in the loader section of the options structure.

diff -urpN john-1.7.3.4-jimf-after-jumbo-2/src/options.c
john-1.7.3.4/src/options.c
--- john-1.7.3.4-jimf-after-jumbo-2/src/options.c	Thu Oct 29 03:53:56
2009
+++ john-1.7.3.4/src/options.c	Mon Dec  7 20:55:58 2009
@@ -244,4 +244,7 @@ void opt_init(char *name, int argc, char
 	}
+
+	if (options.flags & FLG_NODUPES)
+		options.loader.nodupes = 1;
 
 	if ( (options.flags & FLG_SHOW_SET) && options.showuncracked_str) {
 		if (!strcasecmp( options.showuncracked_str, "left"))  {
diff -urpN john-1.7.3.4-jimf-after-jumbo-2/src/wordlist.c
john-1.7.3.4/src/wordlist.c
--- john-1.7.3.4-jimf-after-jumbo-2/src/wordlist.c	Wed Oct 28 19:46:48
2009
+++ john-1.7.3.4/src/wordlist.c	Mon Dec  7 20:57:33 2009
@@ -317,7 +317,7 @@ void do_wordlist_crack(struct db_main *d
 			if (!strncmp(line, "#!comment", 9)) continue;
 
 			if ((word = apply(line, rule, -1)))
-			if (strcmp(word, last)) {
+			if (db->options->nodupes || strcmp(word, last)) {
 				strcpy(last, word);
 
 				if (ext_filter(word))

Since I have had problems posting diff files before, I will also try to send
this as an attachment.

Jim.


-----Original Message-----
From: Solar Designer [mailto:solar@...nwall.com] 
Sent: Sunday, December 06, 2009 9:07 PM
To: john-users@...ts.openwall.com
Subject: Re: [john-users] -nodupes option of JimF patch broken (not works at
all)

On Sat, Nov 21, 2009 at 03:09:36PM +0100, Ze0n Kat wrote:
> After compile john the ripper in windows under cygwin, and apply jumbo and
> then JimF patch... tested and works good, but the option of JimF patch
> -nodupes is broken and not works at all.
> 
> If someone can fix it.

I was hoping that someone else (perhaps Jim) would reply, but it seems
that I have to.  "Doesn't work" is generally not a sufficiently
informative problem report.  For a useful bug report, you need to
include:

1. Information on the software involved (including the compiler and OS)
and its versions.  OK, you've almost provided this above. :-)

2. Your exact test case.  This would be the command you run and its
input files (reduced to the required minimum to reproduce the problem -
perhaps just a few lines).  Of course, it may also be a good idea to
avoid including hashes of actual passwords (replace them and state so
explicitly, yet make sure the problem can still be reproduced).

3. Expected behavior (e.g., this-many hashes loaded).

4. Actual behavior (the output from JtR actually received).

At the very least, you needed to mention what you thought the
"non-working" option was supposed to achieve (but did not).

It is quite possible that this will result in someone identifying and
explaining what you might have understood incorrectly (wrong
expectations). ;-)  If there is in fact a bug in the code that you would
demonstrate, it would likely get fixed.

Speaking of this specific option, perhaps it is misnamed, which may very
well be causing confusion...  Maybe it needs to be renamed.  Jim?

Thanks,

Alexander


Download attachment "john-nodupes-fix.patch" of type "application/octet-stream" (990 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.