Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 23 Dec 2012 16:51:22 +0530
From: Dhiru Kholia <dhiru.kholia@...il.com>
To: john-users@...ts.openwall.com
Subject: Re: gpg2john -> false positive -> how to exclude?

On Sat, Dec 22, 2012 at 6:48 PM, Dhiru Kholia <dhiru.kholia@...il.com> wrote:
> On Sat, Dec 22, 2012 at 6:43 PM, Sebastian Krajenski <john@...jenski.de> wrote:
>> Hello again, many thanks for your efforts. Besides a real fix for this, how
>> were you able to let john /not/ to exit
>> after one false positive is found?
>
> You can use the following patch to do so.
>
> ✗ git diff gpg_fmt_plug.c
> diff --git a/src/gpg_fmt_plug.c b/src/gpg_fmt_plug.c
> index 644126b..533c503 100644
> --- a/src/gpg_fmt_plug.c
> +++ b/src/gpg_fmt_plug.c
> @@ -808,7 +808,7 @@ struct fmt_main fmt_gpg = {
>  #endif
>                 MIN_KEYS_PER_CRYPT,
>                 MAX_KEYS_PER_CRYPT,
> -               FMT_CASE | FMT_8_BIT | FMT_OMP,
> +               FMT_CASE | FMT_8_BIT | FMT_OMP | FMT_NOT_EXACT,
>                 gpg_tests
>         },
>         {
>

Sebastian,

Here is a better patch (to avoid stream of wrong passwords).

diff --git a/src/gpg_fmt_plug.c b/src/gpg_fmt_plug.c
index 644126b..3b53852 100644
--- a/src/gpg_fmt_plug.c
+++ b/src/gpg_fmt_plug.c
@@ -787,7 +787,11 @@ static int cmp_one(void *binary, int index)

 static int cmp_exact(char *source, int index)
 {
-       return cracked[index];
+       if(cracked[index]) {
+               cracked[index] = 0;
+               return 1;
+       }
+       return 0;
 }

 struct fmt_main fmt_gpg = {
@@ -808,7 +812,7 @@ struct fmt_main fmt_gpg = {
 #endif
                MIN_KEYS_PER_CRYPT,
                MAX_KEYS_PER_CRYPT,
-               FMT_CASE | FMT_8_BIT | FMT_OMP,
+               FMT_CASE | FMT_8_BIT | FMT_OMP | FMT_NOT_EXACT,
                gpg_tests
        },
        {

-- 
Cheers,
Dhiru

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.