mirror of
https://github.com/hashcat/hashcat.git
synced 2025-06-26 18:02:39 +00:00
Make sure in test.pl to output always at least 8 passwords
This commit is contained in:
parent
2162e411e9
commit
ae360d8dca
@ -346,6 +346,8 @@ sub init_db_word_rand
|
|||||||
|
|
||||||
for (my $len = $len_min; $len <= $len_max; $len++)
|
for (my $len = $len_min; $len <= $len_max; $len++)
|
||||||
{
|
{
|
||||||
|
next if ($len == 0);
|
||||||
|
|
||||||
push @pool, $len;
|
push @pool, $len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,16 +358,16 @@ sub init_db_word_rand
|
|||||||
push @pool, $pool[0];
|
push @pool, $pool[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@pool = shuffle (@pool);
|
||||||
|
|
||||||
my $db_out;
|
my $db_out;
|
||||||
|
|
||||||
my $idx = 0;
|
$db_out->[0] = $len_min;
|
||||||
|
$db_out->[1] = $len_max;
|
||||||
|
|
||||||
$db_out->[$idx++] = $len_min;
|
for (my $idx = 2; $idx < $single_outputs; $idx++)
|
||||||
$db_out->[$idx++] = $len_max;
|
|
||||||
|
|
||||||
for ($idx .. $single_outputs)
|
|
||||||
{
|
{
|
||||||
$db_out->[$idx++] = shift @pool;
|
$db_out->[$idx] = shift @pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
# make sure the password length is only increasing, which is important for test.sh in -a 1 mode to work
|
# make sure the password length is only increasing, which is important for test.sh in -a 1 mode to work
|
||||||
@ -398,6 +400,8 @@ sub init_db_salt_rand
|
|||||||
|
|
||||||
for (my $len = $len_min; $len <= $len_max; $len++)
|
for (my $len = $len_min; $len <= $len_max; $len++)
|
||||||
{
|
{
|
||||||
|
next if ($len == 0);
|
||||||
|
|
||||||
push @pool, $len;
|
push @pool, $len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,16 +412,16 @@ sub init_db_salt_rand
|
|||||||
push @pool, $pool[0];
|
push @pool, $pool[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@pool = shuffle (@pool);
|
||||||
|
|
||||||
my $db_out;
|
my $db_out;
|
||||||
|
|
||||||
my $idx = 0;
|
$db_out->[0] = $len_min;
|
||||||
|
$db_out->[1] = $len_max;
|
||||||
|
|
||||||
$db_out->[$idx++] = $len_min;
|
for (my $idx = 2; $idx < $single_outputs; $idx++)
|
||||||
$db_out->[$idx++] = $len_max;
|
|
||||||
|
|
||||||
for ($idx .. $single_outputs)
|
|
||||||
{
|
{
|
||||||
$db_out->[$idx++] = shift @pool;
|
$db_out->[$idx] = shift @pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
@{$db_out} = sort { length $b <=> length $a } @{$db_out};
|
@{$db_out} = sort { length $b <=> length $a } @{$db_out};
|
||||||
|
Loading…
Reference in New Issue
Block a user