Increase buffer size for --example-hashes output

pull/1988/head
jsteube 5 years ago
parent 4579ddb5b2
commit 92f4ccce93

@ -104,6 +104,7 @@ but this is nededed for VS compiler which doesn't have inline keyword but has __
#define SALT_MAX_OLD 51
#define HCBUFSIZ_TINY 0x1000
#define HCBUFSIZ_SMALL 0x2000
#define HCBUFSIZ_LARGE 0xb0000
#define CPT_CACHE 0x20000

@ -1519,7 +1519,7 @@ typedef struct outfile_ctx
typedef struct pot
{
char plain_buf[HCBUFSIZ_TINY];
char plain_buf[HCBUFSIZ_SMALL];
int plain_len;
hash_t hash;
@ -1614,7 +1614,7 @@ typedef struct out
{
FILE *fp;
char buf[HCBUFSIZ_TINY];
char buf[HCBUFSIZ_SMALL];
int len;
} out_t;
@ -2180,11 +2180,11 @@ typedef struct hashlist_parse
typedef struct event_ctx
{
char old_buf[MAX_OLD_EVENTS][HCBUFSIZ_TINY];
char old_buf[MAX_OLD_EVENTS][HCBUFSIZ_SMALL];
size_t old_len[MAX_OLD_EVENTS];
int old_cnt;
char msg_buf[HCBUFSIZ_TINY];
char msg_buf[HCBUFSIZ_SMALL];
size_t msg_len;
bool msg_newline;

@ -91,7 +91,7 @@ size_t event_log_advice_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
va_start (ap, fmt);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1);
va_end (ap);
}
@ -119,7 +119,7 @@ size_t event_log_info_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
va_start (ap, fmt);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1);
va_end (ap);
}
@ -147,7 +147,7 @@ size_t event_log_warning_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
va_start (ap, fmt);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1);
va_end (ap);
}
@ -175,7 +175,7 @@ size_t event_log_error_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
va_start (ap, fmt);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1);
va_end (ap);
}
@ -203,7 +203,7 @@ size_t event_log_advice (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
va_start (ap, fmt);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1);
va_end (ap);
}
@ -231,7 +231,7 @@ size_t event_log_info (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
va_start (ap, fmt);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1);
va_end (ap);
}
@ -259,7 +259,7 @@ size_t event_log_warning (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
va_start (ap, fmt);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1);
va_end (ap);
}
@ -287,7 +287,7 @@ size_t event_log_error (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
va_start (ap, fmt);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_TINY - 1);
event_ctx->msg_len = event_log (fmt, ap, event_ctx->msg_buf, HCBUFSIZ_SMALL - 1);
va_end (ap);
}

@ -836,7 +836,7 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
if (is_collider_hex_password == true)
{
u8 pass_unhexified[HCBUFSIZ_TINY] = { 0 };
u8 pass_unhexified[HCBUFSIZ_SMALL] = { 0 };
const size_t pass_unhexified_len = exec_unhexify ((u8 *) hash->pw_buf, hash->pw_len, pass_unhexified, sizeof (pass_unhexified));

@ -44,7 +44,7 @@ static void out_push (out_t *out, const u8 *pw_buf, const int pw_len)
#endif
if (out->len >= HCBUFSIZ_TINY - 300)
if (out->len >= HCBUFSIZ_SMALL - 300)
{
out_flush (out);
}

Loading…
Cancel
Save