1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-25 09:28:20 +00:00

Merge pull request #3846 from philsmd/31900_verify_fix

verify test fix for -m 31900 = MetaMask Mobile Wallet
This commit is contained in:
Jens Steube 2023-09-04 15:31:33 +02:00 committed by GitHub
commit 4d31e4d6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,25 @@ sub module_generate_hash
padding => "none"
});
my $pt = "[{\"type\":\"HD Key Tree\",\"data\":{\"mnemonic\":\"ocean hidden kidney famous rich season gloom husband spring convince attitude boy\",\"numberOfAccounts\":1,\"hdPath\":\"m/44'/60'/0'/0\"}}]";
my $pt = "";
if (! defined ($ct))
{
$pt = "[{\"type\":\"HD Key Tree\",\"data\":{\"mnemonic\":\"ocean hidden kidney famous rich season gloom husband spring convince attitude boy\",\"numberOfAccounts\":1,\"hdPath\":\"m/44'/60'/0'/0\"}}]";
}
else
{
$pt = $cipher->decrypt (pack ("H*", $ct));
if ($pt =~ m/^[ -~]*$/) # is_valid_printable_32 ()
{
# ok
}
else
{
$pt = ""; # fake
}
}
my $ct1 = substr ($cipher->encrypt ($pt), 0, 32);