diff --git a/src/cracker.c b/src/cracker.c index 6fc46e2b07..570a182a31 100644 --- a/src/cracker.c +++ b/src/cracker.c @@ -875,27 +875,11 @@ static int crk_salt_loop(void) return 1; salt = crk_db->salts; - - /* on first run, right after restore, this can be non-zero */ - if (status.salt_idx) { - int i = status.salt_idx; - while (i--) { - salt = salt->next; - if (!salt) { - salt = crk_db->salts; - status.salt_idx = 0; - break; - } - } - } do { crk_methods.set_salt(salt->salt); if ((done = crk_password_loop(salt))) break; - ++status.salt_idx; } while ((salt = salt->next)); - if (!salt) - status.salt_idx = 0; if (done >= 0) { #if !HAVE_OPENCL diff --git a/src/recovery.c b/src/recovery.c index 59354d381b..7b0b6ddf85 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -377,11 +377,6 @@ void rec_save(void) rec_check); if (rec_save_mode) rec_save_mode(rec_file); - - /* these are 'appended' resume blocks */ - /* add a v1 record for salt resume, if salt_idx not at start */ - if (status.salt_idx) - fprintf(rec_file, "slt-v1\n%x\n", status.salt_idx); if (rec_save_mode2) rec_save_mode2(rec_file); if (rec_save_mode3) rec_save_mode3(rec_file); if (options.flags & FLG_MASK_STACKED) @@ -615,19 +610,17 @@ void rec_restore_mode(int (*restore_mode)(FILE *file)) fgetl(buf, sizeof(buf), rec_file); while (!feof(rec_file)) { if (!strncmp(buf, "ext-v", 5)) { - if (ext_restore_state_hybrid(buf, rec_file)) - rec_format_error("external-hybrid"); + if (ext_restore_state_hybrid(buf, rec_file)) rec_format_error("external-hybrid"); + fgetl(buf, sizeof(buf), rec_file); + continue; } /* - else if (!strncmp(buf, "rex-v", 5)) { - if (rexgen_restore_state_hybrid(buf, rec_file)) - rec_format_error("rexgen-hybrid"); + if (!strncmp(buf, "rex-v", 5)) { + if (rexgen_restore_state_hybrid(buf, rec_file)) rec_format_error("rexgen-hybrid"); + fgetl(buf, sizeof(buf), rec_file); + continue; } */ - if (!strcmp(buf, "slt-v1")) { - if (fscanf(rec_file, "%x\n", &status.salt_idx) != 1) - rec_format_error("salt-restore block"); - } fgetl(buf, sizeof(buf), rec_file); } diff --git a/src/status.h b/src/status.h index 8f10f23d5c..258defb4d1 100644 --- a/src/status.h +++ b/src/status.h @@ -41,7 +41,6 @@ struct status_main { int compat; int pass; int progress; - int salt_idx; }; extern struct status_main status;