1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-29 19:38:18 +00:00

fix buffer sizes for -m 13600 = WinZip

This commit is contained in:
philsmd 2021-07-30 15:23:33 +02:00
parent 03ed06849a
commit 51adbbbe53
2 changed files with 7 additions and 4 deletions

View File

@ -37,7 +37,7 @@ typedef struct zip2
u32 verify_bytes;
u32 compress_length;
u32 data_len;
u32 data_buf[0x4000000];
u32 data_buf[0x200000];
u32 auth_len;
u32 auth_buf[4];

View File

@ -9,6 +9,7 @@
#include "bitops.h"
#include "convert.h"
#include "shared.h"
#include "memory.h"
static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL;
static const u32 DGST_POS0 = 0;
@ -61,7 +62,7 @@ typedef struct zip2
u32 verify_bytes;
u32 compress_length;
u32 data_len;
u32 data_buf[0x4000000];
u32 data_buf[0x200000];
u32 auth_len;
u32 auth_buf[4];
@ -166,7 +167,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
| TOKEN_ATTR_VERIFY_HEX;
token.len_min[7] = 0;
token.len_max[7] = 0x4000000 * 4 * 2;
token.len_max[7] = 0x200000 * 4 * 2;
token.sep[7] = '*';
token.attr[7] = TOKEN_ATTR_VERIFY_LENGTH
| TOKEN_ATTR_VERIFY_HEX;
@ -365,7 +366,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
const u32 data_len = zip2->data_len;
char data_tmp[16384 + 1] = { 0 };
char *data_tmp = (char *) hccalloc (1, (data_len * 2) + 1);
for (u32 i = 0, j = 0; i < data_len; i += 1, j += 2)
{
@ -397,6 +398,8 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
auth_tmp,
SIGNATURE_ZIP2_STOP);
hcfree (data_tmp);
return line_len;
}