mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 08:08:10 +00:00
Removed unnecessary parsing of salt2 in pure kernels
This commit is contained in:
parent
1a1baf45ac
commit
2a19e0c0bd
@ -51,6 +51,7 @@ KERNEL_FQ void m03730_m04 (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||
/**
|
||||
* bin2asc uppercase array
|
||||
*/
|
||||
|
||||
LOCAL_VK u32 u_bin2asc[256];
|
||||
|
||||
for (u32 j = lid; j < 256; j += lsz)
|
||||
@ -419,6 +420,7 @@ KERNEL_FQ void m03730_s04 (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||
/**
|
||||
* bin2asc uppercase array
|
||||
*/
|
||||
|
||||
LOCAL_VK u32 u_bin2asc[256];
|
||||
|
||||
for (u32 j = lid; j < 256; j += lsz)
|
||||
|
@ -38,7 +38,6 @@ typedef struct md5_double_salt
|
||||
|
||||
} md5_double_salt_t;
|
||||
|
||||
|
||||
KERNEL_FQ void m03730_mxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||
{
|
||||
/**
|
||||
@ -82,15 +81,6 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||
{
|
||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
||||
}
|
||||
|
||||
const int salt2_len = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_len;
|
||||
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_buf[idx];
|
||||
}
|
||||
|
||||
md5_ctx_t ctx0;
|
||||
|
||||
@ -181,6 +171,7 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||
/**
|
||||
* bin2asc uppercase table
|
||||
*/
|
||||
|
||||
LOCAL_VK u32 u_bin2asc[256];
|
||||
|
||||
for (u32 j = lid; j < 256; j += lsz)
|
||||
@ -222,15 +213,6 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||
{
|
||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
||||
}
|
||||
|
||||
const int salt2_len = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_len;
|
||||
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_buf[idx];
|
||||
}
|
||||
|
||||
md5_ctx_t ctx0;
|
||||
|
||||
@ -244,7 +226,6 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||
|
||||
for (u32 il_pos = 0; il_pos < IL_CNT; il_pos++)
|
||||
{
|
||||
|
||||
pw_t tmp = PASTE_PW;
|
||||
|
||||
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
|
||||
@ -307,4 +288,4 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||
|
||||
COMPARE_S_SCALAR (r0, r1, r2, r3);
|
||||
}
|
||||
}
|
||||
}
|
@ -78,15 +78,6 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
|
||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
||||
}
|
||||
|
||||
const int salt2_len = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_len;
|
||||
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_buf[idx];
|
||||
}
|
||||
|
||||
md5_ctx_t ctx0;
|
||||
|
||||
md5_init (&ctx0);
|
||||
@ -210,16 +201,7 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
|
||||
{
|
||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
||||
}
|
||||
|
||||
const u32 salt2_len = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_len;
|
||||
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_buf[idx];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
@ -49,6 +49,7 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_VECTOR_ESALT (md5_double_salt_t))
|
||||
/**
|
||||
* bin2asc uppercase array
|
||||
*/
|
||||
|
||||
LOCAL_VK u32 u_bin2asc[256];
|
||||
|
||||
for (u32 j = lid; j < 256; j += lsz)
|
||||
@ -85,15 +86,6 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_VECTOR_ESALT (md5_double_salt_t))
|
||||
{
|
||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
||||
}
|
||||
|
||||
const int salt2_len = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_len;
|
||||
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_buf[idx];
|
||||
}
|
||||
|
||||
md5_ctx_vector_t ctx0;
|
||||
|
||||
@ -238,15 +230,6 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_VECTOR_ESALT (md5_double_salt_t))
|
||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
||||
}
|
||||
|
||||
const u32 salt2_len = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_len;
|
||||
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt2_buf[idx];
|
||||
}
|
||||
|
||||
md5_ctx_vector_t ctx0;
|
||||
|
||||
md5_init_vector (&ctx0);
|
||||
|
@ -5,6 +5,7 @@
|
||||
##
|
||||
|
||||
- Added hash-mode: Bisq .wallet (scrypt)
|
||||
- Added hash-mode: Dahua NVR/DVR/HVR (md5($salt1.strtoupper(md5($salt2.$pass))))
|
||||
|
||||
##
|
||||
## Technical
|
||||
|
@ -95,11 +95,11 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
token.len_max[1] *= 2;
|
||||
|
||||
token.attr[1] |= TOKEN_ATTR_VERIFY_HEX;
|
||||
|
||||
token.len_min[2] *= 2;
|
||||
token.len_max[2] *= 2;
|
||||
|
||||
token.attr[2] |= TOKEN_ATTR_VERIFY_HEX;
|
||||
|
||||
token.len_min[2] *= 2;
|
||||
token.len_max[2] *= 2;
|
||||
|
||||
token.attr[2] |= TOKEN_ATTR_VERIFY_HEX;
|
||||
}
|
||||
|
||||
const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token);
|
||||
@ -194,7 +194,6 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
out_len += generic_salt_encode (hashconfig, (const u8 *) md5_double_salt->salt2_buf, (const int) md5_double_salt->salt2_len, out_buf + out_len);
|
||||
|
||||
return out_len;
|
||||
|
||||
}
|
||||
|
||||
void module_init (module_ctx_t *module_ctx)
|
||||
@ -275,4 +274,4 @@ void module_init (module_ctx_t *module_ctx)
|
||||
module_ctx->module_tmp_size = MODULE_DEFAULT;
|
||||
module_ctx->module_unstable_warning = MODULE_DEFAULT;
|
||||
module_ctx->module_warmup_disable = MODULE_DEFAULT;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user