mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-15 18:20:59 +00:00
Do not load data from hashfile if hashfile changed during runtime
This commit is contained in:
parent
c02a0cbf3f
commit
7958479b62
16
src/hashes.c
16
src/hashes.c
@ -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…
Reference in New Issue
Block a user