1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-02-17 01:52:06 +00:00

tests: fixed problem with -m 0 or -m 0-10 with new hash type range code

This commit is contained in:
philsmd 2019-02-15 19:58:09 +01:00
parent 6c4416c9c0
commit 071f6de9cb
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

View File

@ -2682,10 +2682,10 @@ if [ "${PACKAGE}" -eq 0 -o -z "${PACKAGE_FOLDER}" ]; then
HT_MIN=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_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_MAX=$(echo -n ${HT} | sed "s/.*-//")