mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-02 02:41:35 +00:00
Add output buffer size to ascii_digest()
This commit is contained in:
parent
ab3fd9e439
commit
e8078f2c73
@ -1515,7 +1515,7 @@ char *strparser (const u32 parser_status);
|
||||
|
||||
void to_hccap_t (hashcat_ctx_t *hashcat_ctx, hccap_t *hccap, const u32 salt_pos, const u32 digest_pos);
|
||||
|
||||
int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const u32 salt_pos, const u32 digest_pos);
|
||||
int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const size_t out_len, const u32 salt_pos, const u32 digest_pos);
|
||||
|
||||
int hashconfig_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void hashconfig_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
|
@ -196,7 +196,7 @@ int save_hash (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
out_buf[0] = 0;
|
||||
|
||||
ascii_digest (hashcat_ctx, (char *) out_buf, salt_pos, digest_pos);
|
||||
ascii_digest (hashcat_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_pos, digest_pos);
|
||||
|
||||
fprintf (fp, "%s" EOL, out_buf);
|
||||
}
|
||||
@ -245,7 +245,7 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
|
||||
|
||||
out_buf[0] = 0;
|
||||
|
||||
ascii_digest (hashcat_ctx, (char *) out_buf, salt_pos, digest_pos);
|
||||
ascii_digest (hashcat_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_pos, digest_pos);
|
||||
|
||||
// plain
|
||||
|
||||
|
315
src/interface.c
315
src/interface.c
File diff suppressed because it is too large
Load Diff
@ -508,7 +508,7 @@ int potfile_handle_show (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
out_buf[0] = 0;
|
||||
|
||||
ascii_digest (hashcat_ctx, (char *) out_buf, salt_idx, digest_idx);
|
||||
ascii_digest (hashcat_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_idx, digest_idx);
|
||||
|
||||
hash_t *hash = &hashes_buf[hashes_idx];
|
||||
|
||||
@ -572,7 +572,7 @@ int potfile_handle_left (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
out_buf[0] = 0;
|
||||
|
||||
ascii_digest (hashcat_ctx, (char *) out_buf, salt_idx, digest_idx);
|
||||
ascii_digest (hashcat_ctx, (char *) out_buf, HCBUFSIZ_LARGE, salt_idx, digest_idx);
|
||||
|
||||
hash_t *hash = &hashes_buf[hashes_idx];
|
||||
|
||||
|
10
src/status.c
10
src/status.c
@ -276,7 +276,7 @@ char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
tmp_buf[0] = 0;
|
||||
|
||||
ascii_digest ((hashcat_ctx_t *) hashcat_ctx, tmp_buf, 0, 0);
|
||||
ascii_digest ((hashcat_ctx_t *) hashcat_ctx, tmp_buf, HCBUFSIZ_LARGE, 0, 0);
|
||||
|
||||
char *tmp_buf2 = strdup (tmp_buf);
|
||||
|
||||
@ -291,11 +291,11 @@ char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
char *tmp_buf = (char *) malloc (HCBUFSIZ_TINY);
|
||||
|
||||
char out_buf1[32] = { 0 };
|
||||
char out_buf2[32] = { 0 };
|
||||
char out_buf1[64] = { 0 };
|
||||
char out_buf2[64] = { 0 };
|
||||
|
||||
ascii_digest ((hashcat_ctx_t *) hashcat_ctx, out_buf1, 0, 0);
|
||||
ascii_digest ((hashcat_ctx_t *) hashcat_ctx, out_buf2, 0, 1);
|
||||
ascii_digest ((hashcat_ctx_t *) hashcat_ctx, out_buf1, sizeof (out_buf1), 0, 0);
|
||||
ascii_digest ((hashcat_ctx_t *) hashcat_ctx, out_buf2, sizeof (out_buf2), 0, 1);
|
||||
|
||||
snprintf (tmp_buf, HCBUFSIZ_TINY - 1, "%s, %s", out_buf1, out_buf2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user