1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-10 15:51:10 +00:00

in case of a parser error we always should include the actual error message even if hash is long

This commit is contained in:
philsmd 2017-11-16 12:37:31 +01:00
parent 6c34a8074d
commit 612a50408c
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF
2 changed files with 43 additions and 4 deletions

View File

@ -14,6 +14,12 @@
* changes v4.0.0 -> v4.0.1:
##
## Improvements
##
- Changed the maximum length of the substring of a hash shown whenever the parser found a problem while parsing the hash
##
## Bugs
##

View File

@ -14,6 +14,7 @@
#include "filehandling.h"
#include "hlfmt.h"
#include "interface.h"
#include "terminal.h"
#include "logfile.h"
#include "loopback.h"
#include "mpsp.h"
@ -1035,7 +1036,15 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (parser_status < PARSER_GLOBAL_ZERO)
{
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, line_buf, strparser (parser_status));
char *tmp_line_buf = (char *) malloc (HCBUFSIZ_LARGE);
snprintf (tmp_line_buf, HCBUFSIZ_LARGE, "%s", line_buf);
compress_terminal_line_length (tmp_line_buf, 38, 32);
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, tmp_line_buf, strparser (parser_status));
hcfree (tmp_line_buf);
continue;
}
@ -1049,7 +1058,15 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (parser_status < PARSER_GLOBAL_ZERO)
{
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, line_buf, strparser (parser_status));
char *tmp_line_buf = (char *) malloc (HCBUFSIZ_LARGE);
snprintf (tmp_line_buf, HCBUFSIZ_LARGE, "%s", line_buf);
compress_terminal_line_length (tmp_line_buf, 38, 32);
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, tmp_line_buf, strparser (parser_status));
hcfree (tmp_line_buf);
continue;
}
@ -1065,7 +1082,15 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (parser_status < PARSER_GLOBAL_ZERO)
{
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, line_buf, strparser (parser_status));
char *tmp_line_buf = (char *) malloc (HCBUFSIZ_LARGE);
snprintf (tmp_line_buf, HCBUFSIZ_LARGE, "%s", line_buf);
compress_terminal_line_length (tmp_line_buf, 38, 32);
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, tmp_line_buf, strparser (parser_status));
hcfree (tmp_line_buf);
continue;
}
@ -1082,7 +1107,15 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (parser_status < PARSER_GLOBAL_ZERO)
{
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, line_buf, strparser (parser_status));
char *tmp_line_buf = (char *) malloc (HCBUFSIZ_LARGE);
snprintf (tmp_line_buf, HCBUFSIZ_LARGE, "%s", line_buf);
compress_terminal_line_length (tmp_line_buf, 38, 32);
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u (%s): %s", hashes->hashfile, line_num, tmp_line_buf, strparser (parser_status));
hcfree (tmp_line_buf);
continue;
}