Follow us on Twitter or via RSS feeds with tweets or complete announcement texts or excerpts
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 28 Sep 2010 18:47:16 +0200
From: "Magnum, P.I." <rawsmooth@...dband.net>
To: john-users@...ts.openwall.com
Subject: Re: NT/unicode issue in current version

> Why is it unable to crack the ü? Isit a bug? Is it the unintended
> result of some black magic ninja optimization somewhere? Or is it just me?

Found it. Maybe it is architecture or compiler dependant, and maybe my 
enclosed fix is not the ultimate solution but it works now. I only fixed 
one of the architecture-dependant sections so it is incomplete. I guess 
the same casting could be applied to the other sections but I haven't 
looked at it. I added a self-test so it's easy to try for others.

magnum



diff --git a/src/NT_fmt.c b/src/NT_fmt.c
index 4c6d1fa..c4c1035 100644
--- a/src/NT_fmt.c
+++ b/src/NT_fmt.c
@@ -45,6 +45,7 @@ static struct fmt_tests tests[] = {
 	{"$NT$b7e4b9022cd45f275334bbdb83bb5be5", "John the Ripper"},
 	{"$NT$8846f7eaee8fb117ad06bdd830b7586c", "password"},
 	{"$NT$0cb6948805f797bf2a82807973b89537", "test"},
+	{"$NT$8bd6e4fb88e01009818749c5443ea712", "\xFC"},   // German u-diaeresis (here represented in Latin-1)
 	{"$NT$31d6cfe0d16ae931b73c59d7e0c089c0", ""},
 	{NULL}
 };
@@ -451,11 +452,11 @@ static void set_key(char *key, int index)
 		
 		if(temp)
 		{
-			nt_buffer8x[i+buff_base] = key[md4_size-1] | (temp<<16);
+			nt_buffer8x[i+buff_base] = (unsigned char)key[md4_size-1] | (temp<<16);
 		}
 		else
 		{
-			nt_buffer8x[i+buff_base] = key[md4_size-1] | 0x800000;
+			nt_buffer8x[i+buff_base] = (unsigned char)key[md4_size-1] | 0x800000;
 			goto key_cleaning;
 		}
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ