1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 07:08:19 +00:00

Merge pull request #208 from gm4tr1x/testVectorHandlingFix

Fix -V (vector width) handling
This commit is contained in:
Jens Steube 2016-02-06 16:35:01 +01:00
commit 7b652239f9

View File

@ -1582,7 +1582,7 @@ MARKOV="enabled"
ATTACK=0
MODE=0
TYPE="null"
VECTOR=0
VECTOR="default"
HT=0
PACKAGE=0
@ -1591,19 +1591,14 @@ while getopts "V:T:t:m:a:b:hcpd:x:o:" opt; do
case ${opt} in
"V")
if [ ${OPTARG} == "1" ]; then
OPTS="${OPTS} --opencl-vector-width 1"
VECTOR=1
elif [ ${OPTARG} == "2" ]; then
OPTS="${OPTS} --opencl-vector-width 2"
VECTOR=2
elif [ ${OPTARG} == "4" ]; then
OPTS="${OPTS} --opencl-vector-width 4"
VECTOR=4
elif [ ${OPTARG} == "8" ]; then
OPTS="${OPTS} --opencl-vector-width 8"
VECTOR=8
elif [ ${OPTARG} == "all" ]; then
OPTS="${OPTS} --opencl-vector-width 1,2,4,8"
VECTOR="all"
else
usage
@ -1709,11 +1704,6 @@ while getopts "V:T:t:m:a:b:hcpd:x:o:" opt; do
done
if [ "${VECTOR}" == "0" ]; then
VECTOR="default"
OPTS="${OPTS} --opencl-vector-width 1,4"
fi
if [ "${TYPE}" == "null" ]; then
TYPE="Gpu"
OPTS="${OPTS} --opencl-device-types 2"
@ -1869,6 +1859,8 @@ if [ "${PACKAGE}" -eq 0 -o -z "${PACKAGE_FOLDER}" ]; then
fi
fi
done
OPTS="${OPTS_OLD}"
VECTOR="${VECTOR_OLD}"
fi
done