Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://john-1.7.2-62.src.rpm:727233/john-MD5_fmt.c.diff  info  downloads

diff -Naur john-1.6.37/src/MD5_fmt.c john-1.6.37/src/MD5_fmt.c
--- john-1.6.37/src/MD5_fmt.c	2003-08-21 06:04:45.000000000 +0200
+++ john-1.6.37/src/MD5_fmt.c	2004-07-26 09:15:57.000000000 +0200
@@ -1,4 +1,11 @@
 /*
+    Modified by Sun-Zero <sun-zero@freemail.hu>
+    2004. 07. 26. 
+    
+    Now, its work with md5 hash of apache.
+*/
+
+/*
  * This file is part of John the Ripper password cracker,
  * Copyright (c) 1996-2001 by Solar Designer
  */
@@ -117,10 +124,22 @@
 
 static int cmp_exact(char *source, int index)
 {
-	return !memcmp(MD5_std_get_binary(source), MD5_out[index],
+	return !memcmp(MD5_std_get_binary(source, MD5_TYPE_STD), MD5_out[index],
 		sizeof(MD5_binary));
 }
 
+static void crypt_all(int count) {
+    MD5_std_crypt(MD5_TYPE_STD);
+}
+
+static void *get_salt(char *ciphertext) {
+    return MD5_std_get_salt(ciphertext, MD5_TYPE_STD);
+}
+
+static void *get_binary(char *ciphertext) {
+    return MD5_std_get_binary(ciphertext, MD5_TYPE_STD);
+}
+
 struct fmt_main fmt_MD5 = {
 	{
 		FORMAT_LABEL,
@@ -139,8 +158,8 @@
 		MD5_std_init,
 		valid,
 		fmt_default_split,
-		(void *(*)(char *))MD5_std_get_binary,
-		(void *(*)(char *))MD5_std_get_salt,
+		get_binary,		//(void *(*)(char *))MD5_std_get_binary,
+		get_salt,		//(void *(*)(char *))MD5_std_get_salt,
 		{
 			binary_hash_0,
 			binary_hash_1,
@@ -151,7 +170,7 @@
 		set_key,
 		get_key,
 		fmt_default_clear_keys,
-		(void (*)(int))MD5_std_crypt,
+		crypt_all,		// (void (*)(int))MD5_std_crypt,
 		{
 			get_hash_0,
 			get_hash_1,
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 IT MARUHN