diff --git a/docs/changes.txt b/docs/changes.txt index 579baeb9d..6216738a3 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -26,6 +26,7 @@ ## Technical ## +- Autodetect: Limit the number of errors per hash-mode try to 100 to avoid long startup time - LM: Workaround JiT compiler bug in -m 3000 on NV leading to false negatives with large amount of hashes - Tests: Changed tests for VeraCrypt from -a 0 to -a 3, because password extension is not available to all shells diff --git a/src/hashcat.c b/src/hashcat.c index 8328f6c91..d403b4b2d 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -1271,6 +1271,8 @@ bool autodetect_hashmode_test (hashcat_ctx_t *hashcat_ctx) { HCFILE fp; + int error_count = 0; + if (hc_fopen (&fp, hashfile, "rb") == false) return false; char *line_buf = (char *) hcmalloc (HCBUFSIZ_LARGE); @@ -1301,6 +1303,17 @@ bool autodetect_hashmode_test (hashcat_ctx_t *hashcat_ctx) break; } + + // abort this list after 100 errors + + if (error_count == 100) + { + break; + } + else + { + error_count++; + } } hcfree (line_buf);