1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 15:18:16 +00:00

Merge pull request #1917 from philsmd/hash-mode-plugin-test-m-fix

tests: fixed problem with -m 0 or -m 0-10 with new hash type range code
This commit is contained in:
Jens Steube 2019-02-15 20:02:58 +01:00 committed by GitHub
commit 65a143140a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2690,10 +2690,10 @@ if [ "${PACKAGE}" -eq 0 -o -z "${PACKAGE_FOLDER}" ]; then
HT_MIN=0 HT_MIN=0
HT_MAX=0 HT_MAX=0
if echo -n ${HT} | grep -q '^[1-9][0-9]*$'; then if echo -n ${HT} | grep -q '^[0-9]\+$'; then
HT_MIN=${HT} HT_MIN=${HT}
HT_MAX=${HT} HT_MAX=${HT}
elif echo -n ${HT} | grep -q '^[1-9][0-9]*-[1-9][0-9]*$'; then elif echo -n ${HT} | grep -q '^[0-9]\+-[1-9][0-9]*$'; then
HT_MIN=$(echo -n ${HT} | sed "s/-.*//") HT_MIN=$(echo -n ${HT} | sed "s/-.*//")
HT_MAX=$(echo -n ${HT} | sed "s/.*-//") HT_MAX=$(echo -n ${HT} | sed "s/.*-//")