1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 07:08:19 +00:00

Merge pull request #2322 from philsmd/master

solve $telegram$1 format conflict with JTR
This commit is contained in:
Jens Steube 2020-03-06 12:14:29 +01:00 committed by GitHub
commit fe12d2bcc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_BE;
static const u32 SALT_TYPE = SALT_TYPE_GENERIC;
static const char *ST_PASS = "hashcat";
static const char *ST_HASH = "$telegram$1*518c001aeb3b4ae96c6173be4cebe60a85f67b1e087b045935849e2f815b5e41*25184098058621950709328221838128";
static const char *ST_HASH = "$telegram$0*518c001aeb3b4ae96c6173be4cebe60a85f67b1e087b045935849e2f815b5e41*25184098058621950709328221838128";
u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; }
u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; }
@ -84,7 +84,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
const u8 *version_pos = token.buf[1];
if (version_pos[0] != '1') return (PARSER_SALT_VALUE);
if (version_pos[0] != '0') return (PARSER_SALT_VALUE);
const u8 *hash_pos = token.buf[2];
@ -162,7 +162,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
const int line_len = snprintf (line_buf, line_size, "%s%i*%08x%08x%08x%08x%08x%08x%08x%08x*%08x%08x%08x%08x",
SIGNATURE_TELEGRAM,
1,
0,
tmp[0],
tmp[1],
tmp[2],

View File

@ -21,7 +21,7 @@ sub module_generate_hash
my $digest = sha256_hex ($salt_bin . $word . $salt_bin);
my $hash = sprintf ("\$telegram\$1*%s*%s", $digest, $salt);
my $hash = sprintf ("\$telegram\$0*%s*%s", $digest, $salt);
return $hash;
}
@ -40,7 +40,7 @@ sub module_verify_hash
my $version = substr ($data[0], 10);
return unless ($version eq "1");
return unless ($version eq "0");
my $digest = $data[1];
my $salt = $data[2];