Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d88df35d9cde1ede14efbebdf0b50da9@smtp.hushmail.com>
Date: Mon, 03 Mar 2014 10:05:35 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Reload pot file

On 2014-03-03 05:08, magnum wrote:
> A different approach - and maybe quicker unless the above is simpler
> than I imagine - would be to do it more like cracker.c does when
> cmp_exact() returns true. I'd need to process the "hash:plain" into
> binaries, salts, sources and plains as if it came from a running format
> after a crack loop. This might be simpler but I haven't thought it
> through yet.

Thinking out loud:

First I copy
crk_process_guess(struct db_salt, struct db_password, int index)
and modify it into a
crk_process_potword(struct db_salt, struct db_password, char *plain)

(or better have one function handle both cases)

Then,

for (each line of .pot file) {
      char *ciphertext = field[0];
      char *plain = field[1];
      if (fmt.methods.valid(ciphertext)) {
          pot_salt = fmt.get_salt(ciphertext);
          salt = crk_db->salts;
          do {
              if memcmp(pot_salt, salt->salt, fmt.salt_size)
              {
                  pw = salt->list;
                  do {
                      if (strcmp(pw->source, ciphertext)) {
                          if (crk_process_potword(salt, pw, plain))
                              goto next_line;
                          else {
                              if (!(crk_params.flags & FMT_NOT_EXACT))
                                  break;
                          }
                      }
                  } while ((pw = pw->next));
                  break;
              }
          } while ((salt = salt->next));
      }
next_line:
}

Maybe this would work. This seems simpler than the loader stuff I looked at.

magnum

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.