mirror of
https://github.com/hashcat/hashcat.git
synced 2025-07-13 10:08:11 +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
|
* bin2asc uppercase array
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL_VK u32 u_bin2asc[256];
|
LOCAL_VK u32 u_bin2asc[256];
|
||||||
|
|
||||||
for (u32 j = lid; j < 256; j += lsz)
|
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
|
* bin2asc uppercase array
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL_VK u32 u_bin2asc[256];
|
LOCAL_VK u32 u_bin2asc[256];
|
||||||
|
|
||||||
for (u32 j = lid; j < 256; j += lsz)
|
for (u32 j = lid; j < 256; j += lsz)
|
||||||
|
@ -38,7 +38,6 @@ typedef struct md5_double_salt
|
|||||||
|
|
||||||
} md5_double_salt_t;
|
} md5_double_salt_t;
|
||||||
|
|
||||||
|
|
||||||
KERNEL_FQ void m03730_mxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
KERNEL_FQ void m03730_mxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -83,15 +82,6 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
|||||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
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_ctx_t ctx0;
|
||||||
|
|
||||||
md5_init (&ctx0);
|
md5_init (&ctx0);
|
||||||
@ -181,6 +171,7 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
|||||||
/**
|
/**
|
||||||
* bin2asc uppercase table
|
* bin2asc uppercase table
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL_VK u32 u_bin2asc[256];
|
LOCAL_VK u32 u_bin2asc[256];
|
||||||
|
|
||||||
for (u32 j = lid; j < 256; j += lsz)
|
for (u32 j = lid; j < 256; j += lsz)
|
||||||
@ -223,15 +214,6 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
|
|||||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
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;
|
md5_ctx_t ctx0;
|
||||||
|
|
||||||
md5_init (&ctx0);
|
md5_init (&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++)
|
for (u32 il_pos = 0; il_pos < IL_CNT; il_pos++)
|
||||||
{
|
{
|
||||||
|
|
||||||
pw_t tmp = PASTE_PW;
|
pw_t tmp = PASTE_PW;
|
||||||
|
|
||||||
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
|
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
|
||||||
|
@ -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];
|
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_ctx_t ctx0;
|
||||||
|
|
||||||
md5_init (&ctx0);
|
md5_init (&ctx0);
|
||||||
@ -211,15 +202,6 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
|
|||||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
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
|
* base
|
||||||
*/
|
*/
|
||||||
|
@ -49,6 +49,7 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_VECTOR_ESALT (md5_double_salt_t))
|
|||||||
/**
|
/**
|
||||||
* bin2asc uppercase array
|
* bin2asc uppercase array
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL_VK u32 u_bin2asc[256];
|
LOCAL_VK u32 u_bin2asc[256];
|
||||||
|
|
||||||
for (u32 j = lid; j < 256; j += lsz)
|
for (u32 j = lid; j < 256; j += lsz)
|
||||||
@ -86,15 +87,6 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_VECTOR_ESALT (md5_double_salt_t))
|
|||||||
s[idx] = esalt_bufs[DIGESTS_OFFSET_HOST].salt1_buf[idx];
|
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;
|
md5_ctx_vector_t ctx0;
|
||||||
|
|
||||||
md5_init_vector (&ctx0);
|
md5_init_vector (&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];
|
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_ctx_vector_t ctx0;
|
||||||
|
|
||||||
md5_init_vector (&ctx0);
|
md5_init_vector (&ctx0);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
- Added hash-mode: Bisq .wallet (scrypt)
|
- Added hash-mode: Bisq .wallet (scrypt)
|
||||||
|
- Added hash-mode: Dahua NVR/DVR/HVR (md5($salt1.strtoupper(md5($salt2.$pass))))
|
||||||
|
|
||||||
##
|
##
|
||||||
## Technical
|
## Technical
|
||||||
|
@ -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);
|
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;
|
return out_len;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void module_init (module_ctx_t *module_ctx)
|
void module_init (module_ctx_t *module_ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user