Do not load data from hashfile if hashfile changed during runtime

pull/576/head
Jens Steube 8 years ago
parent c02a0cbf3f
commit 7958479b62

@ -730,11 +730,18 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
break;
}
if (hashes_avail == hashes_cnt)
{
event_log_warning (hashcat_ctx, "Hashfile '%s': File changed during runtime, skipping new data", hash_buf);
break;
}
parser_status = hashconfig->parse_func ((u8 *) in, hccap_size, &hashes_buf[hashes_cnt], hashconfig);
if (parser_status != PARSER_OK)
{
event_log_warning (hashcat_ctx, "Hash '%s': %s", hash_buf, strparser (parser_status));
event_log_warning (hashcat_ctx, "Hashfile '%s': %s", hash_buf, strparser (parser_status));
continue;
}
@ -829,6 +836,13 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (line_len == 0) continue;
if (hashes_avail == hashes_cnt)
{
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u: File changed during runtime, skipping new data", hashes->hashfile, line_num);
break;
}
char *hash_buf = NULL;
int hash_len = 0;

Loading…
Cancel
Save