From: Jens Steube Date: Sun, 27 Dec 2015 09:37:13 +0000 (+0100) Subject: Fix bug in test.pl, did not handle zero length passwords in -m 7700 X-Git-Tag: v3.00-beta~584^2~19 X-Git-Url: https://www.flypig.org.uk/git/?a=commitdiff_plain;h=eb7e096956b3cf0631479dd1f0ff27c1061e44bd;p=hashcat.git Fix bug in test.pl, did not handle zero length passwords in -m 7700 --- diff --git a/tools/test.pl b/tools/test.pl index eea8da4..692d36c 100755 --- a/tools/test.pl +++ b/tools/test.pl @@ -929,9 +929,11 @@ sub verify # $salt$$hash elsif ($mode == 7700 || $mode == 7800) { - my @split1 = split (":", $line); + my $index1 = index ($line, ":"); - next unless scalar @split1 == 2; + next if $index1 < 1; + + my @split1 = split (":", $line); my @split2 = split ('\$', $split1[0]); @@ -939,7 +941,14 @@ sub verify $hash_in = $split1[0]; - $word = $split1[1]; + if (scalar @split1 > 1) + { + $word = $split1[1]; + } + else + { + $word = ""; + } next unless (exists ($db->{$hash_in}) and (! defined ($db->{$hash_in})));