diff -urpN jumbo-un1/run/john.conf jumbo-un0/run/john.conf --- jumbo-un1/run/john.conf 2012-08-02 15:05:58.015625000 +0000 +++ jumbo-un0/run/john.conf 2012-08-02 15:06:06.062500000 +0000 @@ -22,6 +22,10 @@ Idle = Y Save = 600 # Beep when a password is found (who needs this anyway?) Beep = N +# if set to Y then dynamic format will always work with raw hashes. Normally +# dynamic only uses raw hashes if a single dynamic type is selected with +# the -format= (so -format=dynamic_0 would use valid raw hashes). +DynamicAlwaysUseRawHashes = N # Time formatting string used in status ETA. # %c means 'local' specific canonical form, such as: diff -urpN jumbo-un1/src/dynamic_fmt.c jumbo-un0/src/dynamic_fmt.c --- jumbo-un1/src/dynamic_fmt.c 2012-08-02 15:06:05.546875000 +0000 +++ jumbo-un0/src/dynamic_fmt.c 2012-08-02 15:11:48.453125000 +0000 @@ -8816,9 +8816,9 @@ static int LoadOneFormat(int idx, struct cp = strchr(label_id, '$'); *cp = 0; - if (!options.format || strncmp(options.format, "dynamic_", 8)) - pFmt->params.label = str_alloc_copy("dynamic"); - else +// if (!options.format || strncmp(options.format, "dynamic_", 8)) +// pFmt->params.label = str_alloc_copy("dynamic"); +// else pFmt->params.label = str_alloc_copy(label_id); strcpy(curdat.dynamic_WHICH_TYPE_SIG, label); @@ -8866,6 +8866,10 @@ int dynamic_Register_formats(struct fmt_ sscanf(options.format, "dynamic_%d", &single); if (options.format && options.subformat && !strcmp(options.format, "dynamic") && !strncmp(options.subformat, "dynamic_", 8)) sscanf(options.subformat, "dynamic_%d", &single); + if (options.dynamic_raw_hashes_always_valid == 'Y') + m_allow_rawhash_fixup = 1; + else if (options.dynamic_raw_hashes_always_valid != 'N' && cfg_get_bool(SECTION_OPTIONS, NULL, "DynamicAlwaysUseRawHashes", 1)) + m_allow_rawhash_fixup = 1; if (single != -1) { // user wanted only a 'specific' format. Simply load that one. diff -urpN jumbo-un1/src/john.c jumbo-un0/src/john.c --- jumbo-un1/src/john.c 2012-08-02 15:06:07.765625000 +0000 +++ jumbo-un0/src/john.c 2012-08-02 15:08:32.296875000 +0000 @@ -646,6 +646,8 @@ static void john_init(char *name, int ar puts("--field-separator-char=C use 'C' instead of the ':' in input and pot files"); puts("--fix-state-delay=N performance tweak, see documentation"); puts("--log-stderr log to screen instead of file\n"); + puts("--raw-always-valid=C if C is 'Y' or 'y', then the dynamic format will"); + puts(" always treat raw hashes as valid."); exit(0); } diff -urpN jumbo-un1/src/options.c jumbo-un0/src/options.c --- jumbo-un1/src/options.c 2012-08-02 15:06:13.390625000 +0000 +++ jumbo-un0/src/options.c 2012-08-02 15:09:15.015625000 +0000 @@ -140,6 +140,8 @@ static struct opt_entry opt_list[] = { "%u", &options.max_run_time}, {"regen-lost-salts", FLG_NONE, FLG_NONE, 0, OPT_REQ_PARAM, "%u", &options.regen_lost_salts}, + {"raw-always-valid", FLG_NONE, FLG_NONE, 0, OPT_REQ_PARAM, + "%c", &options.dynamic_raw_hashes_always_valid}, #ifdef CL_VERSION_1_0 {"platform", FLG_NONE, FLG_NONE, 0, OPT_REQ_PARAM, OPT_FMT_STR_ALLOC, &options.ocl_platform}, @@ -297,6 +299,7 @@ void opt_init(char *name, int argc, char options.loader.max_wordfile_memory = WORDLIST_BUFFER_DEFAULT; options.force_maxkeys = options.force_maxlength = 0; options.max_run_time = -2; + options.dynamic_raw_hashes_always_valid = 0; list_init(&options.passwd); @@ -454,6 +457,13 @@ void opt_init(char *name, int argc, char if (options.loader.activesinglerules == NULL) options.loader.activesinglerules = str_alloc_copy(SUBSECTION_SINGLE); + if (options.dynamic_raw_hashes_always_valid == 'Y' || options.dynamic_raw_hashes_always_valid == 'y' || + options.dynamic_raw_hashes_always_valid == '1' || options.dynamic_raw_hashes_always_valid == 't' || options.dynamic_raw_hashes_always_valid == 'T') + options.dynamic_raw_hashes_always_valid = 'Y'; + else if (options.dynamic_raw_hashes_always_valid == 'N' || options.dynamic_raw_hashes_always_valid == 'n' || + options.dynamic_raw_hashes_always_valid == '0' || options.dynamic_raw_hashes_always_valid == 'f' || options.dynamic_raw_hashes_always_valid == 'F') + options.dynamic_raw_hashes_always_valid = 'N'; + options.loader.regen_lost_salts = options.regen_lost_salts; if (field_sep_char_string != NULL)