Add -m 18600 module

This commit is contained in:
jsteube
2019-01-15 10:25:19 +01:00
parent 2a5f473ef1
commit 85ae6d0905
2 changed files with 364 additions and 7 deletions
+7 -7
View File
@@ -189,19 +189,19 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
const u32 salt_len = strtol ((const char *) token.buf[8], NULL, 10);
const u32 unused = strtol ((const char *) token.buf[10], NULL, 10);
if (cipher_type != 1) return (PARSER_SALT_VALUE);
if (checksum_type != 1) return (PARSER_SALT_VALUE);
if (cipher_type != 1) return (PARSER_SALT_VALUE);
if (checksum_type != 1) return (PARSER_SALT_VALUE);
if (key_size != 32) return (PARSER_SALT_VALUE);
if (iv_len != 16) return (PARSER_SALT_VALUE);
if (salt_len != 16) return (PARSER_SALT_VALUE);
if (unused != 0) return (PARSER_SALT_VALUE);
if (unused != 0) return (PARSER_SALT_VALUE);
// esalt
odf12->iterations = iterations;
odf12->checksum[0] = hex_to_u32 (&checksum[0]);
odf12->checksum[1] = hex_to_u32 (&checksum[8]);
odf12->checksum[0] = hex_to_u32 (&checksum[ 0]);
odf12->checksum[1] = hex_to_u32 (&checksum[ 8]);
odf12->checksum[2] = hex_to_u32 (&checksum[16]);
odf12->checksum[3] = hex_to_u32 (&checksum[24]);
odf12->checksum[4] = hex_to_u32 (&checksum[32]);
@@ -214,9 +214,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
odf12->iv[2] = hex_to_u32 (&iv[16]);
odf12->iv[3] = hex_to_u32 (&iv[24]);
for (int i = 0; i < 256; i++)
for (int i = 0, j = 0; i < 256; i += 1, j += 8)
{
odf12->encrypted_data[i] = hex_to_u32 (&encrypted_data[8 * i]);
odf12->encrypted_data[i] = hex_to_u32 (&encrypted_data[j]);
}
// salt