Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 23 Aug 2011 12:26:44 +0400
From: Aleksey Cherepanov <aleksey.4erepanov@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: check for filter() is added, patch and questions about it

On Tue, Aug 23, 2011 at 04:21:30AM +0400, Aleksey Cherepanov wrote:
> +#ifdef FLG_MKV_CHK
> +		if (options.flags & FLG_MKV_CHK)
> +#endif

That is wrong. I am sorry that I did not test it right.

I fixed it and prepared 2 patches: for John and for Jumbo. Both are
tested. I made that patch for Jumbo does not need patch for John, it
includes all changes needed. Is it right? Or should I make patch for
John and then patch with small Jumbo specific change to use both
patches with Jumbo and only first with John?

Regards,
Aleksey Cherepanov

diff -urpN john-1.7.8.orig//src/john.c john-1.7.8/src/john.c
--- john-1.7.8.orig//src/john.c	2011-02-27 12:31:36.000000000 +0000
+++ john-1.7.8/src/john.c	2011-08-23 07:35:02.000000000 +0000
@@ -129,8 +129,20 @@ static void john_load(void)
 
 	umask(077);
 
-	if (options.flags & FLG_EXTERNAL_CHK)
+	if (options.flags & FLG_EXTERNAL_CHK) {
 		ext_init(options.external);
+		if (options.flags & (FLG_BATCH_CHK | FLG_SINGLE_CHK |
+			    FLG_WORDLIST_CHK | FLG_INC_CHK | FLG_MAKECHR_CHK))
+		if (!f_filter) {
+			log_event("! No filter() function defined");
+#ifdef HAVE_MPI
+			if (mpi_id == 0)
+#endif
+			fprintf(stderr, "No filter() for external mode: %s\n",
+				ext_mode);
+			error();
+		}
+	}
 
 	if (options.flags & FLG_MAKECHR_CHK) {
 		options.loader.flags |= DB_CRACKED;

diff -urpN john-1.7.8-jumbo-5.orig//src/john.c john-1.7.8-jumbo-5/src/john.c
--- john-1.7.8-jumbo-5.orig//src/john.c	2011-08-23 07:58:57.000000000 +0000
+++ john-1.7.8-jumbo-5/src/john.c	2011-08-23 07:59:09.000000000 +0000
@@ -226,8 +226,21 @@ static void john_load(void)
 	umask(077);
 #endif
 
-	if (options.flags & FLG_EXTERNAL_CHK)
+	if (options.flags & FLG_EXTERNAL_CHK) {
 		ext_init(options.external);
+		if (options.flags & (FLG_BATCH_CHK | FLG_SINGLE_CHK |
+			    FLG_WORDLIST_CHK | FLG_INC_CHK | FLG_MAKECHR_CHK |
+			    FLG_MKV_CHK))
+		if (!f_filter) {
+			log_event("! No filter() function defined");
+#ifdef HAVE_MPI
+			if (mpi_id == 0)
+#endif
+			fprintf(stderr, "No filter() for external mode: %s\n",
+				ext_mode);
+			error();
+		}
+	}
 
 	if (options.flags & FLG_MAKECHR_CHK) {
 		options.loader.flags |= DB_CRACKED;

Powered by blists - more mailing lists

Your e-mail address:

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