1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 08:08:10 +00:00

tab completion: allow using "install version" of hashcat

With this little update we also allow the installed version of "hashcat" (e.g. in /usr/local/bin/hashcat) to work with the tab completion script (most importantly used for the "hashcat -I" device lists).
This commit is contained in:
philsmd 2019-05-17 09:46:53 +02:00 committed by GitHub
parent a5fc9cda73
commit de0ff9a42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,15 @@ _hashcat_backend_devices ()
fi
if [ ! -x "${executable}" ]; then
return ""
local which_hashcat=$(which hashcat 2>/dev/null)
if [ -n "${which_hashcat}" ]; then
executable="${which_hashcat}"
fi
fi
if [ ! -x "${executable}" ]; then
return
fi
# remove separator at the end (if present)
@ -134,7 +142,7 @@ _hashcat_backend_devices ()
continue
fi
# we add it because we didn't find any conflict:
# we add it because we didn't find any conflicts:
if [ -z "${hashcat_device_list}" ]; then
hashcat_device_list="${device_str}"