From 587ca752e74c87d0544c539c85420628bd748a75 Mon Sep 17 00:00:00 2001 From: philsmd <921533+philsmd@users.noreply.github.com> Date: Mon, 13 Jan 2020 10:40:28 +0100 Subject: [PATCH] tests: fixed new problem with -m 20510 and hash type ranges --- tools/test.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/test.sh b/tools/test.sh index 16d7a111d..35df022e5 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -2979,13 +2979,6 @@ if [ "${TYPE}" = "null" ]; then TYPE="Gpu" fi -if [ "${HT}" -eq 20510 ]; then # special case for PKZIP Master Key - if [ "${MODE}" -eq 1 ]; then # if "multi" was forced we need to exit - echo "ERROR: -m 20510 = PKZIP Master Key can only be run with a single hash" - exit 1 - fi -fi - if [ -n "${ARCHITECTURE}" ]; then BIN="${BIN}${ARCHITECTURE}" @@ -3117,6 +3110,18 @@ if [ "${PACKAGE}" -eq 0 ] || [ -z "${PACKAGE_FOLDER}" ]; then fi fi + if [ "${hash_type}" -eq 20510 ]; then # special case for PKZIP Master Key + if [ "${MODE}" -eq 1 ]; then # if "multi" was forced we need to skip it + if [ "${HT_MIN}" -lt "${HT_MAX}" ]; then + echo "WARNING: -m 20510 = PKZIP Master Key can only be run with a single hash" + else + echo "ERROR: -m 20510 = PKZIP Master Key can only be run with a single hash" + fi + + continue + fi + fi + if [ -z "${PACKAGE_FOLDER}" ]; then # init test data