|
Message-ID: <000701cbd89b$ae7206b0$0b561410$@net> Date: Tue, 1 Mar 2011 23:35:46 -0600 From: "jfoug" <jfoug@....net> To: <john-users@...ts.openwall.com> Subject: RE: MD5 Generic improvements The problem is that saltlen will always be zero, at this 'point'. The saltlen is set in the salt function. The get_salt function is called by john, to get the salt from the original string. John then uses that value, and gives it back to the format in the 'salt' function. The salt sets the saltlen. I am not sure what is going wrong, but I will get it fixed. The code as you have it will work fine, for any unsalted (md5($p), md5(md5($p)), etc) format. But anything with a salt will fail during fmt_self_test function, and rightly so. Jim. -----Original Message----- From: magnum [mailto:rawsmooth@...dband.net] Sent: Tuesday, March 01, 2011 1:13 PM To: john-users@...ts.openwall.com Subject: Re: [john-users] MD5 Generic improvements On 03/01/2011 05:04 PM, bartavelle wrote: > This doesn't seem to work for me : > Loaded 1593941 password hashes with 42272 different salts ( md5_gen(0): > md5($p) (raw-md5) [128x1 (MD5_Go)]) > Reverting to what Jim wrote in http://www.openwall.com/lists/john-users/2011/02/26/2 fixes the problem: > This change is to md5_gen_fmt.c in the get_salt function: > > static void *get_salt(char *ciphertext) > { > static char Salt[SALT_SIZE+1]; > memset(Salt, 0, SALT_SIZE+1); > + if (saltlen==0) > + return Salt; > strncpy(Salt, &ciphertext[md5_gen_SALT_OFFSET], SALT_SIZE); > Salt[SALT_SIZE] = 0; > if (md5_gen_salt_as_hex) But then in the early-release-02 it was changed to if (fmt_MD5gen.params.salt_size==0) I just tried both (no idea if that makes sense) and it works fine: if (fmt_MD5gen.params.salt_size==0 || saltlen==0)
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.