@@ -89,16 +89,16 @@ hc_setup(){
89
89
90
90
if [[ ` cat /etc/os-release` == * debian* ]]
91
91
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 ` ) ]]
93
93
then
94
94
echo -e " ${YELLOW} [!] The following packages are missing. Please ensure that you have installed them properly before starting hashcatch${NC} "
95
95
if [[ ` dpkg -s aircrack-ng 2>&1 ` == * " not installed" * ]]
96
96
then
97
97
echo -e " \taircrack-ng"
98
- elif [[ ` dpkg -s hashcat-utils 2>&1 ` == * " not installed " * ]]
98
+ elif [[ ! ` command -v cap2hccapx 2>&1 ` ]]
99
99
then
100
100
echo -e " \thashcat-utils"
101
- elif [[ ` dpkg -s hcxtools 2>&1 ` == * " not installed " * ]]
101
+ elif [[ ! ` command -v wlanhcxinfo 2>&1 ` ]]
102
102
then
103
103
echo -e " \thcxtools"
104
104
elif [[ ` dpkg -s jq 2>&1 ` == * " not installed" * ]]
@@ -169,19 +169,19 @@ hc_run(){
169
169
170
170
if [[ ` cat /etc/os-release` == * debian* ]]
171
171
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 ` ) ]]
173
173
then
174
174
echo " ${YELLOW} [!] The following packages are missing. Install them and try again!${NC} "
175
175
exit 0
176
176
if [[ ` dpkg -s aircrack-ng 2>&1 ` == * " not installed" * ]]
177
177
then
178
178
echo -e " \taircrack-ng"
179
179
exit 0
180
- elif [[ ` dpkg -s hashcat-utils 2>&1 ` == * " not installed " * ]]
180
+ elif [[ ! ` command -v cap2hccapx 2>&1 ` ]]
181
181
then
182
182
echo -e " \thashcat-utils"
183
183
exit 0
184
- elif [[ ` dpkg -s hcxtools 2>&1 ` == * " not installed " * ]]
184
+ elif [[ ! ` command -v wlanhcxinfo 2>&1 ` ]]
185
185
then
186
186
echo -e " \thcxtools"
187
187
exit 0
0 commit comments