using shared buffer between md5 and sha1 SNMPV3_TMP_ELEMS_OPT, fix to crack real hashes

This commit is contained in:
Gabriele Gristina
2021-07-26 22:25:15 +02:00
parent 7c8d7f7831
commit c20ff01c39
3 changed files with 79 additions and 57 deletions
+3 -3
View File
@@ -12,14 +12,14 @@ use Digest::MD5 qw (md5 md5_hex);
use Digest::SHA qw (sha1 sha1_hex);
use Digest::HMAC qw (hmac hmac_hex);
sub module_constraints { [[1, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] }
sub module_constraints { [[8, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] }
sub module_generate_hash
{
my $word = shift;
my $salt = shift;
my $pkt_num = shift // int(rand(99999999));
my $engineID = shift // random_hex_string(6);
my $pkt_num = shift // int(rand(100000000));
my $engineID = shift // random_hex_string(26, 34);
my $mode = shift // int(rand(1)) + 1;
# make even if needed