diff --git a/include/status.h b/include/status.h index 5c255be3a..eb6dafe9d 100644 --- a/include/status.h +++ b/include/status.h @@ -39,6 +39,7 @@ char *status_get_guess_candidates_dev (const hashcat_ctx_t *hash char *status_get_hash_name (const hashcat_ctx_t *hashcat_ctx); char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx); int status_get_digests_done (const hashcat_ctx_t *hashcat_ctx); +int status_get_digests_done_pot (const hashcat_ctx_t *hashcat_ctx); int status_get_digests_cnt (const hashcat_ctx_t *hashcat_ctx); double status_get_digests_percent (const hashcat_ctx_t *hashcat_ctx); int status_get_salts_done (const hashcat_ctx_t *hashcat_ctx); diff --git a/include/types.h b/include/types.h index 51ff141e4..c7c836d76 100644 --- a/include/types.h +++ b/include/types.h @@ -941,6 +941,7 @@ typedef struct hashes u32 digests_cnt; u32 digests_done; + u32 digests_done_pot; u32 digests_saved; void *digests_buf; @@ -2631,6 +2632,7 @@ typedef struct hashcat_status double msec_real; int digests_cnt; int digests_done; + int digests_done_pot; double digests_percent; int salts_cnt; int salts_done; diff --git a/src/hashcat.c b/src/hashcat.c index fabce3002..2fff7f4b5 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -1927,6 +1927,7 @@ int hashcat_get_status (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_st hashcat_status->digests_cnt = status_get_digests_cnt (hashcat_ctx); hashcat_status->digests_done = status_get_digests_done (hashcat_ctx); + hashcat_status->digests_done_pot = status_get_digests_done_pot (hashcat_ctx); hashcat_status->digests_percent = status_get_digests_percent (hashcat_ctx); hashcat_status->hash_target = status_get_hash_target (hashcat_ctx); hashcat_status->hash_name = status_get_hash_name (hashcat_ctx); diff --git a/src/main.c b/src/main.c index 8f17b4151..4e976b2d2 100644 --- a/src/main.c +++ b/src/main.c @@ -402,22 +402,22 @@ static void main_potfile_hash_left (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAY static void main_potfile_num_cracked (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len) { const user_options_t *user_options = hashcat_ctx->user_options; - const hashes_t *hashes = hashcat_ctx->hashes; + hashes_t *hashes = hashcat_ctx->hashes; if (user_options->quiet == true) return; - const int potfile_remove_cracks = hashes->digests_done; + hashes->digests_done_pot = hashes->digests_done; - if (potfile_remove_cracks > 0) + if (hashes->digests_done_pot > 0) { - if (potfile_remove_cracks == 1) + if (hashes->digests_done_pot == 1) { event_log_info (hashcat_ctx, "INFO: Removed 1 hash found as potfile entry or as empty hash."); event_log_info (hashcat_ctx, NULL); } else { - event_log_info (hashcat_ctx, "INFO: Removed %d hashes found as potfile entries or as empty hashes.", potfile_remove_cracks); + event_log_info (hashcat_ctx, "INFO: Removed %d hashes found as potfile entries or as empty hashes.", hashes->digests_done_pot); event_log_info (hashcat_ctx, NULL); } } diff --git a/src/modules/module_02501.c b/src/modules/module_02501.c index 873802cc8..9a0f3f0cd 100644 --- a/src/modules/module_02501.c +++ b/src/modules/module_02501.c @@ -36,7 +36,8 @@ static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE | OPTS_TYPE_DEEP_COMP_KERNEL | OPTS_TYPE_POTFILE_NOPASS - | OPTS_TYPE_COPY_TMPS; + | OPTS_TYPE_COPY_TMPS + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "7f620a599c445155935a35634638fa67b4aafecb92e0bd8625388757a63c2dda"; static const char *ST_HASH = "4843505804000000000235380000000000000000000000000000000000000000000000000000000000000151aecc428f182acefbd1a9e62d369a079265784da83ba4cf88375c44c830e6e5aa5d6faf352aa496a9ee129fb8292f7435df5420b823a1cd402aed449cced04f552c5b5acfebf06ae96a09c96d9a01c443a17aa62258c4f651a68aa67b0001030077fe010900200000000000000001a4cf88375c44c830e6e5aa5d6faf352aa496a9ee129fb8292f7435df5420b8230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018dd160050f20101000050f20201000050f20201000050f20200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; diff --git a/src/modules/module_09710.c b/src/modules/module_09710.c index 434e8521a..5a872d5dc 100644 --- a/src/modules/module_09710.c +++ b/src/modules/module_09710.c @@ -24,7 +24,8 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE | OPTI_TYPE_NOT_ITERATED; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_PT_ADD80 - | OPTS_TYPE_PT_ALWAYS_HEXIFY; + | OPTS_TYPE_PT_ALWAYS_HEXIFY + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "\x91\xb2\xe0\x62\xb9"; static const char *ST_HASH = "$oldoffice$0*55045061647456688860411218030058*e7e24d163fbd743992d4b8892bf3f2f7*493410dbc832557d3fe1870ace8397e2"; diff --git a/src/modules/module_09720.c b/src/modules/module_09720.c index e859fa7fe..1d179233b 100644 --- a/src/modules/module_09720.c +++ b/src/modules/module_09720.c @@ -25,7 +25,8 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_PT_ADD80 | OPTS_TYPE_PT_UTF16LE - | OPTS_TYPE_SUGGEST_KG; + | OPTS_TYPE_SUGGEST_KG + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; static const char *ST_HASH = "$oldoffice$0*55045061647456688860411218030058*e7e24d163fbd743992d4b8892bf3f2f7*493410dbc832557d3fe1870ace8397e2:91b2e062b9"; diff --git a/src/modules/module_09810.c b/src/modules/module_09810.c index 861cf9595..71e7f2b13 100644 --- a/src/modules/module_09810.c +++ b/src/modules/module_09810.c @@ -23,7 +23,8 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE | OPTI_TYPE_PRECOMPUTE_INIT | OPTI_TYPE_NOT_ITERATED; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE - | OPTS_TYPE_PT_ALWAYS_HEXIFY; + | OPTS_TYPE_PT_ALWAYS_HEXIFY + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "\xb8\xf6\x36\x19\xca"; static const char *ST_HASH = "$oldoffice$3*83328705222323020515404251156288*2855956a165ff6511bc7f4cd77b9e101*941861655e73a09c40f7b1e9dfd0c256ed285acd"; diff --git a/src/modules/module_09820.c b/src/modules/module_09820.c index 3e12913c7..7b455f4e9 100644 --- a/src/modules/module_09820.c +++ b/src/modules/module_09820.c @@ -25,7 +25,8 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_BE | OPTS_TYPE_PT_ADD80 | OPTS_TYPE_PT_UTF16LE - | OPTS_TYPE_SUGGEST_KG; + | OPTS_TYPE_SUGGEST_KG + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; static const char *ST_HASH = "$oldoffice$3*83328705222323020515404251156288*2855956a165ff6511bc7f4cd77b9e101*941861655e73a09c40f7b1e9dfd0c256ed285acd:b8f63619ca"; diff --git a/src/modules/module_10410.c b/src/modules/module_10410.c index cc424d865..f5d4f0796 100644 --- a/src/modules/module_10410.c +++ b/src/modules/module_10410.c @@ -22,7 +22,8 @@ static const u64 KERN_TYPE = 10410; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE | OPTI_TYPE_NOT_ITERATED; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE - | OPTS_TYPE_PT_ALWAYS_HEXIFY; + | OPTS_TYPE_PT_ALWAYS_HEXIFY + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "\x6a\x8a\xed\xcc\xb7"; static const char *ST_HASH = "$pdf$1*2*40*-1*0*16*01221086741440841668371056103222*32*27c3fecef6d46a78eb61b8b4dbc690f5f8a2912bbb9afc842c12d79481568b74*32*0000000000000000000000000000000000000000000000000000000000000000"; diff --git a/src/modules/module_10420.c b/src/modules/module_10420.c index 263783236..f9de4eea9 100644 --- a/src/modules/module_10420.c +++ b/src/modules/module_10420.c @@ -21,7 +21,8 @@ static const char *HASH_NAME = "PDF 1.1 - 1.3 (Acrobat 2 - 4), collider #2" static const u64 KERN_TYPE = 10420; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE | OPTI_TYPE_NOT_ITERATED; -static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; static const char *ST_HASH = "$pdf$1*2*40*-1*0*16*01221086741440841668371056103222*32*27c3fecef6d46a78eb61b8b4dbc690f5f8a2912bbb9afc842c12d79481568b74*32*0000000000000000000000000000000000000000000000000000000000000000:6a8aedccb7"; diff --git a/src/modules/module_16800.c b/src/modules/module_16800.c index b880d15e9..bbfd912e5 100644 --- a/src/modules/module_16800.c +++ b/src/modules/module_16800.c @@ -30,7 +30,8 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_AUX1 | OPTS_TYPE_DEEP_COMP_KERNEL - | OPTS_TYPE_COPY_TMPS; + | OPTS_TYPE_COPY_TMPS + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat!"; static const char *ST_HASH = "2582a8281bf9d4308d6f5731d0e61c61:4604ba734d4e:89acf0e761f4:ed487162465a774bfba60eb603a39f3a"; diff --git a/src/modules/module_16801.c b/src/modules/module_16801.c index b860ca1f4..a34b58b7b 100644 --- a/src/modules/module_16801.c +++ b/src/modules/module_16801.c @@ -31,7 +31,8 @@ static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_AUX1 | OPTS_TYPE_DEEP_COMP_KERNEL | OPTS_TYPE_POTFILE_NOPASS - | OPTS_TYPE_COPY_TMPS; + | OPTS_TYPE_COPY_TMPS + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "5b13d4babb3714ccc62c9f71864bc984efd6a55f237c7a87fc2151e1ca658a9d"; static const char *ST_HASH = "2582a8281bf9d4308d6f5731d0e61c61:4604ba734d4e:89acf0e761f4"; diff --git a/src/modules/module_20510.c b/src/modules/module_20510.c index 5fcdf408b..7ae6bc4ad 100644 --- a/src/modules/module_20510.c +++ b/src/modules/module_20510.c @@ -79,7 +79,8 @@ static const char *HASH_NAME = "PKZIP Master Key (6 byte optimization)"; static const u64 KERN_TYPE = 20510; static const u32 OPTI_TYPE = 0; static const u64 OPTS_TYPE = OPTS_TYPE_COPY_TMPS - | OPTS_TYPE_MAXIMUM_THREADS; + | OPTS_TYPE_MAXIMUM_THREADS + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_NONE; static const char *ST_PASS = "t"; // actually "hashcat" static const char *ST_HASH = "f1eff5c0368d10311dcfc419"; diff --git a/src/modules/module_22001.c b/src/modules/module_22001.c index 8c67e515c..fd16d53ba 100644 --- a/src/modules/module_22001.c +++ b/src/modules/module_22001.c @@ -38,7 +38,8 @@ static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_BINARY_HASHFILE_OPTIONAL | OPTS_TYPE_DEEP_COMP_KERNEL | OPTS_TYPE_COPY_TMPS - | OPTS_TYPE_POTFILE_NOPASS; + | OPTS_TYPE_POTFILE_NOPASS + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "88f43854ae7b1624fc2ab7724859e795130f4843c7535729e819cf92f39535dc"; static const char *ST_HASH = "WPA*01*5ce7ebe97a1bbfeb2822ae627b726d5b*27462da350ac*accd10fb464e*686173686361742d6573736964***"; diff --git a/src/modules/module_27000.c b/src/modules/module_27000.c index f6f307a1a..09bd6d554 100644 --- a/src/modules/module_27000.c +++ b/src/modules/module_27000.c @@ -27,7 +27,8 @@ static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_PT_ADDBITS14 | OPTS_TYPE_PT_UTF16LE | OPTS_TYPE_ST_HEX - | OPTS_TYPE_MAXIMUM_THREADS; + | OPTS_TYPE_MAXIMUM_THREADS + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "b4b9b02e6f09a9bd760f388b67351e2b"; static const char *ST_HASH = "::5V4T:ada06359242920a500000000000000000000000000000000:0556d5297b5daa70eaffde82ef99293a3f3bb59b7c9704ea:9c23f6c094853920"; diff --git a/src/modules/module_27100.c b/src/modules/module_27100.c index 40064b9a0..f97b6d3b7 100644 --- a/src/modules/module_27100.c +++ b/src/modules/module_27100.c @@ -27,7 +27,8 @@ static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_PT_ADDBITS14 | OPTS_TYPE_PT_UTF16LE | OPTS_TYPE_ST_HEX - | OPTS_TYPE_MAXIMUM_THREADS; + | OPTS_TYPE_MAXIMUM_THREADS + | OPTS_TYPE_AUTODETECT_DISABLE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "b4b9b02e6f09a9bd760f388b67351e2b"; static const char *ST_HASH = "0UL5G37JOI0SX::6VB1IS0KA74:ebe1afa18b7fbfa6:aab8bf8675658dd2a939458a1077ba08:010100000000000031c8aa092510945398b9f7b7dde1a9fb00000000f7876f2b04b700"; diff --git a/src/status.c b/src/status.c index ed7d0ba9a..b22c9846d 100644 --- a/src/status.c +++ b/src/status.c @@ -893,6 +893,13 @@ int status_get_digests_done (const hashcat_ctx_t *hashcat_ctx) return hashes->digests_done; } +int status_get_digests_done_pot (const hashcat_ctx_t *hashcat_ctx) +{ + const hashes_t *hashes = hashcat_ctx->hashes; + + return hashes->digests_done_pot; +} + int status_get_digests_cnt (const hashcat_ctx_t *hashcat_ctx) { const hashes_t *hashes = hashcat_ctx->hashes; diff --git a/src/terminal.c b/src/terminal.c index 9072dbda7..7adace095 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -2090,27 +2090,91 @@ void status_display (hashcat_ctx_t *hashcat_ctx) "Speed.#*.........: %9sH/s", hashcat_status->speed_sec_all); } - - if (hashcat_status->salts_cnt > 1) + if (hashcat_status->digests_done_pot > 0) { - event_log_info (hashcat_ctx, - "Recovered........: %d/%d (%.2f%%) Digests, %d/%d (%.2f%%) Salts", - hashcat_status->digests_done, - hashcat_status->digests_cnt, - hashcat_status->digests_percent, - hashcat_status->salts_done, - hashcat_status->salts_cnt, - hashcat_status->salts_percent); + if (hashcat_status->salts_cnt > 1) + { + const int digests_new = hashcat_status->digests_done - hashcat_status->digests_done_pot; + const double digests_new_perc = (double) digests_new / (double) hashcat_status->digests_cnt * 100; + + if (digests_new > 1) + { + event_log_info (hashcat_ctx, + "Recovered.Total..: %d/%d (%.2f%%) Digests, %d/%d (%.2f%%) Salts", + hashcat_status->digests_done, + hashcat_status->digests_cnt, + hashcat_status->digests_percent, + hashcat_status->salts_done, + hashcat_status->salts_cnt, + hashcat_status->salts_percent); + event_log_info (hashcat_ctx, + "Recovered.New....: %d/%d (%.2f%%) Digests", + digests_new, + hashcat_status->digests_cnt, + digests_new_perc); + } + else + { + event_log_info (hashcat_ctx, + "Recovered.Total..: %d/%d (%.2f%%) Digests, %d/%d (%.2f%%) Salts", + hashcat_status->digests_done, + hashcat_status->digests_cnt, + hashcat_status->digests_percent, + hashcat_status->salts_done, + hashcat_status->salts_cnt, + hashcat_status->salts_percent); + } + } + else + { + const int digests_new = hashcat_status->digests_done - hashcat_status->digests_done_pot; + const double digests_new_perc = (double) digests_new / (double) hashcat_status->digests_cnt * 100; + + if (digests_new > 1) + { + event_log_info (hashcat_ctx, + "Recovered.Total..: %d/%d (%.2f%%) Digests", + hashcat_status->digests_done, + hashcat_status->digests_cnt, + hashcat_status->digests_percent); + event_log_info (hashcat_ctx, + "Recovered.New....: %d/%d (%.2f%%) Digests", + digests_new, + hashcat_status->digests_cnt, + digests_new_perc); + } + else + { + event_log_info (hashcat_ctx, + "Recovered.Total..: %d/%d (%.2f%%) Digests", + hashcat_status->digests_done, + hashcat_status->digests_cnt, + hashcat_status->digests_percent); + } + } } else { - event_log_info (hashcat_ctx, - "Recovered........: %d/%d (%.2f%%) Digests", - hashcat_status->digests_done, - hashcat_status->digests_cnt, - hashcat_status->digests_percent); + if (hashcat_status->salts_cnt > 1) + { + event_log_info (hashcat_ctx, + "Recovered.Total..: %d/%d (%.2f%%) Digests, %d/%d (%.2f%%) Salts", + hashcat_status->digests_done, + hashcat_status->digests_cnt, + hashcat_status->digests_percent, + hashcat_status->salts_done, + hashcat_status->salts_cnt, + hashcat_status->salts_percent); + } + else + { + event_log_info (hashcat_ctx, + "Recovered.Total..: %d/%d (%.2f%%) Digests", + hashcat_status->digests_done, + hashcat_status->digests_cnt, + hashcat_status->digests_percent); + } } - if (hashcat_status->digests_cnt > 1000) { const int digests_remain = hashcat_status->digests_cnt - hashcat_status->digests_done;