1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-06-25 17:32:38 +00:00

Improve handling of MAX_CUT_TRIES

This commit is contained in:
jsteube 2016-11-19 15:25:01 +01:00
parent daeb5f66ac
commit e777c25a67
2 changed files with 5 additions and 3 deletions

View File

@ -158,6 +158,8 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx)
{ {
if (line_buf[i] != separator) continue; if (line_buf[i] != separator) continue;
iter--;
int parser_status = PARSER_OK; int parser_status = PARSER_OK;
if ((hash_mode != 2500) && (hash_mode != 6800)) if ((hash_mode != 2500) && (hash_mode != 6800))
@ -269,8 +271,6 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx)
if (found) break; if (found) break;
if (status_ctx->devices_status == STATUS_CRACKED) break; if (status_ctx->devices_status == STATUS_CRACKED) break;
iter--;
} }
if (status_ctx->devices_status == STATUS_CRACKED) break; if (status_ctx->devices_status == STATUS_CRACKED) break;

View File

@ -321,10 +321,12 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx)
int iter = MAX_CUT_TRIES; int iter = MAX_CUT_TRIES;
for (int i = line_len - 1; i && iter; i--, iter--, line_len--) for (int i = line_len - 1; i && iter; i--, line_len--)
{ {
if (line_buf[i] != ':') continue; if (line_buf[i] != ':') continue;
iter--;
if (hashconfig->is_salted) if (hashconfig->is_salted)
{ {
memset (hash_buf.salt, 0, sizeof (salt_t)); memset (hash_buf.salt, 0, sizeof (salt_t));