1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-01 20:38:14 +00:00

Not enforcing minimum and maximum password and salt length saves a lot of headache

This commit is contained in:
jsteube 2019-02-19 17:37:22 +01:00
parent 63fac132e3
commit 7721645758
2 changed files with 4 additions and 10 deletions

View File

@ -346,7 +346,7 @@ sub init_db_word_rand
my @pool; my @pool;
for (my $len = $len_min + 1; $len < $len_max - 1; $len++) for (my $len = $len_min; $len <= $len_max; $len++)
{ {
push @pool, $len; push @pool, $len;
} }
@ -357,9 +357,6 @@ sub init_db_word_rand
my $idx = 0; my $idx = 0;
$db_out->[$idx++] = $len_min;
$db_out->[$idx++] = $len_max;
for ($idx .. $outputs) for ($idx .. $outputs)
{ {
$db_out->[$idx++] = shift @pool; $db_out->[$idx++] = shift @pool;
@ -395,7 +392,7 @@ sub init_db_salt_rand
my @pool; my @pool;
for my $len ($len_min + 1 .. $len_max - 1) for (my $len = $len_min; $len <= $len_max; $len++)
{ {
push @pool, $len; push @pool, $len;
} }
@ -406,9 +403,6 @@ sub init_db_salt_rand
my $idx = 0; my $idx = 0;
$db_out->[$idx++] = $len_min;
$db_out->[$idx++] = $len_max;
for ($idx .. $outputs) for ($idx .. $outputs)
{ {
$db_out->[$idx++] = shift @pool; $db_out->[$idx++] = shift @pool;

View File

@ -16,9 +16,9 @@ VC_MODES="13711 13712 13713 13721 13722 13723 13731 13732 13733 13741 13742 1374
HASH_TYPES=$(ls ${TDIR}/test_modules/*.pm | sed 's/.*m0*\([0-9]\+\)\.pm/\1/') HASH_TYPES=$(ls ${TDIR}/test_modules/*.pm | sed 's/.*m0*\([0-9]\+\)\.pm/\1/')
HASH_TYPES="${HASH_TYPES} ${VC_MODES} 14600" #HASH_TYPES="${HASH_TYPES} ${VC_MODES} 14600"
HASH_TYPES="$(echo -n ${HASH_TYPES} | tr ' ' '\n' | sort -n | tr '\n' ' ')" #HASH_TYPES="$(echo -n ${HASH_TYPES} | tr ' ' '\n' | sort -n | tr '\n' ' ')"
VECTOR_WIDTHS="1 2 4 8 16" VECTOR_WIDTHS="1 2 4 8 16"