mirror of
https://github.com/hashcat/hashcat.git
synced 2025-08-05 05:15:20 +00:00
commit
ec987e68ae
@ -316,7 +316,7 @@ function init()
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
|
|
||||||
done 9< "${OUTD}/${hash_type}_passwords.txt"
|
done 9< "${OUTD}/${hash_type}_passwords.txt"
|
||||||
|
|
||||||
@ -339,7 +339,8 @@ function init()
|
|||||||
# generate multiple pass/hash foreach len (2 to 8)
|
# generate multiple pass/hash foreach len (2 to 8)
|
||||||
if [ "${MODE}" -ge 1 ]; then
|
if [ "${MODE}" -ge 1 ]; then
|
||||||
|
|
||||||
for ((i = 2; i < 9; i++)); do
|
i=2
|
||||||
|
while [ "$i" -lt 9 ]; do
|
||||||
|
|
||||||
cmd_file=${OUTD}/${hash_type}_multi_${i}.txt
|
cmd_file=${OUTD}/${hash_type}_multi_${i}.txt
|
||||||
|
|
||||||
@ -371,6 +372,7 @@ function init()
|
|||||||
echo "${pass}" | cut -c ${p1}- >> "${OUTD}/${hash_type}_dict2_multi_${i}"
|
echo "${pass}" | cut -c ${p1}- >> "${OUTD}/${hash_type}_dict2_multi_${i}"
|
||||||
|
|
||||||
done 9< "${OUTD}/${hash_type}_passwords_multi_${i}.txt"
|
done 9< "${OUTD}/${hash_type}_passwords_multi_${i}.txt"
|
||||||
|
i=$((i + 1))
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -381,7 +383,7 @@ function status()
|
|||||||
{
|
{
|
||||||
RET=$1
|
RET=$1
|
||||||
|
|
||||||
((cnt++))
|
cnt=$((cnt + 1))
|
||||||
|
|
||||||
if [ "${RET}" -ne 0 ]; then
|
if [ "${RET}" -ne 0 ]; then
|
||||||
case ${RET} in
|
case ${RET} in
|
||||||
@ -389,14 +391,14 @@ function status()
|
|||||||
if ! is_in_array "${hash_type}" ${NEVER_CRACK_ALGOS}; then
|
if ! is_in_array "${hash_type}" ${NEVER_CRACK_ALGOS}; then
|
||||||
|
|
||||||
echo "password not found, cmdline : ${CMD}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.txt"
|
echo "password not found, cmdline : ${CMD}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.txt"
|
||||||
((e_nf++))
|
e_nf=$((e_nf + 1))
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
echo "timeout reached, cmdline : ${CMD}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.txt"
|
echo "timeout reached, cmdline : ${CMD}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.txt"
|
||||||
((e_to++))
|
e_to=$((e_to + 1))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
10)
|
10)
|
||||||
@ -405,13 +407,13 @@ function status()
|
|||||||
else
|
else
|
||||||
echo "hash:plains not matched in output, cmdline : ${CMD}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.tx"t
|
echo "hash:plains not matched in output, cmdline : ${CMD}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.tx"t
|
||||||
fi
|
fi
|
||||||
((e_nm++))
|
e_nm=$((e_nm + 1))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "! unhandled return code ${RET}, cmdline : ${CMD}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.txt"
|
echo "! unhandled return code ${RET}, cmdline : ${CMD}" >> "${OUTD}/logfull.txt" 2>> "${OUTD}/logfull.txt"
|
||||||
echo "! unhandled return code, see ${OUTD}/logfull.txt for details."
|
echo "! unhandled return code, see ${OUTD}/logfull.txt for details."
|
||||||
((e_nf++))
|
e_nf=$((e_nf + 1))
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -752,7 +754,7 @@ function attack_1()
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
|
|
||||||
done 9< "${OUTD}/${hash_type}_hashes.txt"
|
done 9< "${OUTD}/${hash_type}_hashes.txt"
|
||||||
|
|
||||||
@ -957,7 +959,7 @@ function attack_3()
|
|||||||
# passwords can't be smaller than mask in -a 3 = mask attack
|
# passwords can't be smaller than mask in -a 3 = mask attack
|
||||||
|
|
||||||
if [ "${#pass}" -lt ${i} ]; then
|
if [ "${#pass}" -lt ${i} ]; then
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -985,7 +987,7 @@ function attack_3()
|
|||||||
|
|
||||||
if [ "${hash_type}" -eq 20510 ]; then # special case for PKZIP Master Key
|
if [ "${hash_type}" -eq 20510 ]; then # special case for PKZIP Master Key
|
||||||
if [ "${i}" -le 1 ]; then
|
if [ "${i}" -le 1 ]; then
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1032,7 +1034,7 @@ function attack_3()
|
|||||||
|
|
||||||
if [ $i -eq ${max} ]; then break; fi
|
if [ $i -eq ${max} ]; then break; fi
|
||||||
|
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
|
|
||||||
done 9< "${OUTD}/${hash_type}_hashes.txt"
|
done 9< "${OUTD}/${hash_type}_hashes.txt"
|
||||||
|
|
||||||
@ -1279,7 +1281,6 @@ function attack_3()
|
|||||||
|
|
||||||
# charset 1
|
# charset 1
|
||||||
char=$(echo "${pass}" | cut -b ${charset_1_pos})
|
char=$(echo "${pass}" | cut -b ${charset_1_pos})
|
||||||
charset_1=$(echo -e "${charset_1}\n${char}")
|
|
||||||
charset_1=$(printf "%s\n%s\n" "${charset_1}" "${char}")
|
charset_1=$(printf "%s\n%s\n" "${charset_1}" "${char}")
|
||||||
|
|
||||||
# charset 2
|
# charset 2
|
||||||
@ -1525,7 +1526,7 @@ function attack_6()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${#pass} -le ${i} ]; then
|
if [ ${#pass} -le ${i} ]; then
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1611,7 +1612,7 @@ function attack_6()
|
|||||||
|
|
||||||
if [ "${i}" -eq ${max} ]; then break; fi
|
if [ "${i}" -eq ${max} ]; then break; fi
|
||||||
|
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
|
|
||||||
done 9< "${OUTD}/${hash_type}_hashes.txt"
|
done 9< "${OUTD}/${hash_type}_hashes.txt"
|
||||||
|
|
||||||
@ -1680,7 +1681,8 @@ function attack_6()
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ((i = 2; i < max; i++)); do
|
i=2
|
||||||
|
while [ "$i" -lt "$max" ]; do
|
||||||
|
|
||||||
hash_file=${OUTD}/${hash_type}_hashes_multi_${i}.txt
|
hash_file=${OUTD}/${hash_type}_hashes_multi_${i}.txt
|
||||||
|
|
||||||
@ -1745,6 +1747,7 @@ function attack_6()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
status ${ret}
|
status ${ret}
|
||||||
|
i=$((i + 1))
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -1923,7 +1926,7 @@ function attack_7()
|
|||||||
pass_len=${#pass}
|
pass_len=${#pass}
|
||||||
|
|
||||||
if [ "${pass_len}" -le 6 ]; then
|
if [ "${pass_len}" -le 6 ]; then
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1994,7 +1997,7 @@ function attack_7()
|
|||||||
|
|
||||||
if [ $i -eq ${max} ]; then break; fi
|
if [ $i -eq ${max} ]; then break; fi
|
||||||
|
|
||||||
((i++))
|
i=$((i + 1))
|
||||||
|
|
||||||
done 9< "${OUTD}/${hash_type}_hashes.txt"
|
done 9< "${OUTD}/${hash_type}_hashes.txt"
|
||||||
|
|
||||||
@ -2071,7 +2074,8 @@ function attack_7()
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ((i = 2; i < max; i++)); do
|
i=2
|
||||||
|
while [ "$i" -lt "$max" ]; do
|
||||||
|
|
||||||
hash_file=${OUTD}/${hash_type}_hashes_multi_${i}.txt
|
hash_file=${OUTD}/${hash_type}_hashes_multi_${i}.txt
|
||||||
dict_file=${OUTD}/${hash_type}_dict2_multi_${i}
|
dict_file=${OUTD}/${hash_type}_dict2_multi_${i}
|
||||||
@ -2163,6 +2167,7 @@ function attack_7()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
status ${ret}
|
status ${ret}
|
||||||
|
i=$((i + 1))
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user