diff --git a/src/outfile_check.c b/src/outfile_check.c index 53a8997a5..9a2ee0106 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -158,6 +158,8 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) { if (line_buf[i] != separator) continue; + iter--; + int parser_status = PARSER_OK; if ((hash_mode != 2500) && (hash_mode != 6800)) @@ -269,8 +271,6 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) if (found) break; if (status_ctx->devices_status == STATUS_CRACKED) break; - - iter--; } if (status_ctx->devices_status == STATUS_CRACKED) break; diff --git a/src/potfile.c b/src/potfile.c index eb1bb069b..ad219467f 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -321,10 +321,12 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx) 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; + iter--; + if (hashconfig->is_salted) { memset (hash_buf.salt, 0, sizeof (salt_t));