mirror of
https://github.com/hashcat/hashcat
synced 2024-12-23 14:13:43 +01:00
Merge pull request #1161 from philsmd/master
fixes #1160: parsing/displaying -m 7000 = Fortigate hashes
This commit is contained in:
commit
af39f63e6f
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
- Fixed a problem where --keyspace combined with custom charsets incorrectly displayed an error message
|
- Fixed a problem where --keyspace combined with custom charsets incorrectly displayed an error message
|
||||||
- Fixed a typo that resulted in the minimum password length not being correctly initialized
|
- Fixed a typo that resulted in the minimum password length not being correctly initialized
|
||||||
|
- Fixed a problem with parsing and displaying -m 7000 = Fortigate (FortiOS) hashes
|
||||||
|
|
||||||
* changes v3.30 -> v3.40:
|
* changes v3.30 -> v3.40:
|
||||||
|
|
||||||
|
@ -14054,7 +14054,7 @@ int fortigate_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_
|
|||||||
|
|
||||||
int decoded_len = base64_decode (base64_to_int, (const u8 *) hash_pos, DISPLAY_LEN_MAX_7000 - 3, tmp_buf);
|
int decoded_len = base64_decode (base64_to_int, (const u8 *) hash_pos, DISPLAY_LEN_MAX_7000 - 3, tmp_buf);
|
||||||
|
|
||||||
if (decoded_len != 32 + 1) return (PARSER_HASH_LENGTH);
|
if (decoded_len != 32) return (PARSER_HASH_LENGTH);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* store data
|
* store data
|
||||||
@ -16219,7 +16219,7 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const size_t out_le
|
|||||||
|
|
||||||
// base64 encode (salt + SHA1)
|
// base64 encode (salt + SHA1)
|
||||||
|
|
||||||
base64_encode (int_to_base64, (const u8 *) tmp_buf, 12 + 20 + 1, (u8 *) ptr_plain);
|
base64_encode (int_to_base64, (const u8 *) tmp_buf, 12 + 20, (u8 *) ptr_plain);
|
||||||
|
|
||||||
ptr_plain[44] = 0;
|
ptr_plain[44] = 0;
|
||||||
|
|
||||||
|
@ -5492,7 +5492,7 @@ sub gen_hash
|
|||||||
|
|
||||||
my $hash = sha1 ($salt_bin . $word_buf . $FORTIGATE_MAGIC);
|
my $hash = sha1 ($salt_bin . $word_buf . $FORTIGATE_MAGIC);
|
||||||
|
|
||||||
$hash = encode_base64 ($salt_bin . $hash . "\x00");
|
$hash = encode_base64 ($salt_bin . $hash);
|
||||||
$hash =~ s/[\r\n]//g;
|
$hash =~ s/[\r\n]//g;
|
||||||
|
|
||||||
$tmp_hash = sprintf ("%s%s", $FORTIGATE_SIGNATURE, $hash);
|
$tmp_hash = sprintf ("%s%s", $FORTIGATE_SIGNATURE, $hash);
|
||||||
|
Loading…
Reference in New Issue
Block a user