Skip to content

Commit beec01d

Browse files
authored
Fix error
1 parent f15687a commit beec01d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hashcatch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,16 @@ hc_setup(){
8989

9090
if [[ `cat /etc/os-release` == *debian* ]]
9191
then
92-
if [[ `dpkg -s aircrack-ng hashcat-utils hcxtools jq 2>&1` == *"not installed"* ]]
92+
if [[ (`dpkg -s aircrack-ng jq 2>&1` == *"not installed"*) || (! `command -v cap2hccapx`) || (! `command -v wlanhcxinfo`) ]]
9393
then
9494
echo -e "${YELLOW}[!] The following packages are missing. Please ensure that you have installed them properly before starting hashcatch${NC}"
9595
if [[ `dpkg -s aircrack-ng 2>&1` == *"not installed"* ]]
9696
then
9797
echo -e "\taircrack-ng"
98-
elif [[ `dpkg -s hashcat-utils 2>&1` == *"not installed"* ]]
98+
elif [[ ! `command -v cap2hccapx 2>&1` ]]
9999
then
100100
echo -e "\thashcat-utils"
101-
elif [[ `dpkg -s hcxtools 2>&1` == *"not installed"* ]]
101+
elif [[ ! `command -v wlanhcxinfo 2>&1` ]]
102102
then
103103
echo -e "\thcxtools"
104104
elif [[ `dpkg -s jq 2>&1` == *"not installed"* ]]
@@ -169,19 +169,19 @@ hc_run(){
169169

170170
if [[ `cat /etc/os-release` == *debian* ]]
171171
then
172-
if [[ `dpkg -s aircrack-ng hashcat-utils hcxtools jq 2>&1` == *"not installed"* ]]
172+
if [[ (`dpkg -s aircrack-ng jq 2>&1` == *"not installed"*) || (! `command -v cap2hccapx`) || (! `command -v wlanhcxinfo`)]]
173173
then
174174
echo "${YELLOW}[!] The following packages are missing. Install them and try again!${NC}"
175175
exit 0
176176
if [[ `dpkg -s aircrack-ng 2>&1` == *"not installed"* ]]
177177
then
178178
echo -e "\taircrack-ng"
179179
exit 0
180-
elif [[ `dpkg -s hashcat-utils 2>&1` == *"not installed"* ]]
180+
elif [[ ! `command -v cap2hccapx 2>&1` ]]
181181
then
182182
echo -e "\thashcat-utils"
183183
exit 0
184-
elif [[ `dpkg -s hcxtools 2>&1` == *"not installed"* ]]
184+
elif [[ ! `command -v wlanhcxinfo 2>&1` ]]
185185
then
186186
echo -e "\thcxtools"
187187
exit 0

0 commit comments

Comments
 (0)