-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
chk_tools
400 lines (396 loc) · 13.2 KB
/
chk_tools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
#!/bin/bash
cyan='\033[0;36m'
green='\033[0;32m'
lightgreen='\e[0;32m'
white='\e[0;37m'
red='\e[0;31m'
yellow='\033[0;33m'
blue='\033[0;34m'
orange='\e[38;5;166m'
echo -e "$orange""---------$green TheFatRat tools version check$orange----------"
echo -e "$orange""-------------------------------------------------"
echo -ne "$green""* - Checking$cyan Netcat$green (Net Check)..............."
which nc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install netcat"
fi
echo -ne "$green""* - Checking$cyan Xterm$green (Terminal)................."
which xterm > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install xterm"
fi
echo -ne "$green""* - Checking$cyan Dig$green (Dns-Util)..................."
which dig > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install dnsutils"
fi
echo -ne "$green""* - Checking$cyan mono-mcs$green (compiler).............."
which mcs > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install mono-mcs mono-devel"
fi
echo -ne "$green""* - Checking$cyan Gcc$green (compiler)..................."
which gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install gcc"
fi
echo -ne "$green""* - Checking$cyan Apache2$green (Web Server)............."
which apache2 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install apache2"
fi
echo -ne "$green""* - Checking$cyan Gnome Terminal$green (Terminal)........"
which gnome-terminal > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install gnome-terminal"
fi
echo -ne "$green""* - Checking$cyan Upx$green (File Compressor)............"
which upx > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install upx-ucl"
fi
echo -ne "$green""* - Checking$cyan Ruby$green (Programming)..............."
which ruby > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install ruby"
fi
echo -ne "$green""* - Checking$cyan Gem$green (Ruby modules installer)....."
which gem > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
echo -ne "$green""* - Checking$cyan nokogiri$green (Ruby module)..........."
chkvs=$(gem list | grep "nokogiri")
if [[ ! -z "$chkvs" ]]
then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green gem install nokogiri"
fi
else
echo -e "$green""[${red}x$green]$orange Solution:$green https://rubygems.org/pages/download"
fi
echo -ne "$green""* - Checking$cyan Openssl$green (Certificates)..........."
which openssl > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install openssl"
fi
echo -ne "$green""* - Checking$cyan Python2$green (Programming)............"
which python2 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install python2-minimal"
fi
echo -ne "$green""* - Checking$cyan Python3$green (Programming)............"
which python3 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install python3"
fi
echo -ne "$green""* - Checking$cyan Python-pip3$green (Module Installer)..."
which pip3 > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
echo -ne "$green""* - Checking$cyan names$green (python module)............"
chkvs=$(pip3 list | grep "names")
if [[ ! -z "$chkvs" ]]
then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green pip3 install names"
fi
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install python3-pip"
fi
echo -ne "$green""* - Checking$cyan Build-Essential$green (Cross Compiler)."
chkvs=$(apt-cache policy build-essential | grep "Installed" | awk '{print$2}')
if [[ "$chkvs" == "(none)" ]]
then
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install build-essential"
else
echo "[✔]"
fi
echo -ne "$green""* - Checking$cyan lib32z1$green (apk Req.)..............."
chkvs=$(apt-cache policy lib32z1 | grep "Installed" | awk '{print$2}')
if [[ "$chkvs" == "(none)" ]]
then
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install lib32z1"
else
echo "[✔]"
fi
echo -ne "$green""* - Checking$cyan lib32ncurses5$green (apk Req.)........."
chkvs=$(apt-cache policy lib32ncurses5 | grep "Installed" | awk '{print$2}')
if [[ "$chkvs" == "(none)" ]]
then
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install lib32ncurses5"
else
echo "[✔]"
fi
echo -ne "$green""* - Checking$cyan lib32stdc++6$green (apk Req.).........."
chkvs=$(apt-cache policy lib32stdc++6 | grep "Installed" | awk '{print$2}')
if [[ "$chkvs" == "(none)" ]]
then
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install lib32stdc++6"
else
echo "[✔]"
fi
echo -ne "$green""* - Checking$cyan Jarsigner$green (apk Req.)............."
which jarsigner > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
echo -ne "$green""* - Checking$cyan Keytool$green (apk Req.)..............."
which keytool > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install default-jdk default-jre"
fi
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install default-jdk default-jre"
fi
echo -ne "$green""* - Checking$cyan Unzip$green (Unpacker)................."
which unzip > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install unzip"
fi
echo -ne "$green""* - Checking$cyan Zipalign$green (Apk Req.).............."
if [ -f "tools/android-sdk/zipalign" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green Clone Fatrat Git again to a different directory"
echo -e "$orange""zipalign was not found in fatrat package"
fi
echo -ne "$green""* - Checking$cyan Mingw 64 Bit$green (Compiler).........."
which x86_64-w64-mingw32-gcc >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(x86_64-w64-mingw32-gcc --version | sed -n 1p | awk '{print$3}')
case $chkvs in
4.9.1)
echo "[✔]"
;;
6.3.0)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect 64Bit Version for Fudwin in Fatrat"
echo ""
echo -e "$orange""------------Solution -------------"
echo -e "$cyan""Step 1 - Remove your current ming installation"
echo ""
echo -e "$green""apt-get remove --purge *mingw* -y && apt-get autoremove -y"
echo ""
echo -e "$cyan""Step 2 - Run Setup from fatrat"
echo ""
echo -e "$green""chmod +x setup.sh && ./setup.sh"
echo -e "$orange""----------------------------------"
echo ""
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo ""
echo -e "$orange""------------Solution -------------"
echo -e "$cyan""Step 1 - Run Setup from fatrat"
echo ""
echo -e "$green""chmod +x setup.sh && ./setup.sh"
echo ""
echo -e "$orange""----------------------------------"
fi
echo -ne "$green""* - Checking$cyan Mingw 32 Bit$green (Compiler).........."
which i686-w64-mingw32-gcc >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(i686-w64-mingw32-gcc --version | sed -n 1p | awk '{print$3}')
case $chkvs in
4.9.1)
echo "[✔]"
;;
6.3.0)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect 64Bit Version for Fudwin in Fatrat"
echo ""
echo -e "$orange""------------Solution -------------"
echo -e "$cyan""Step 1 - Remove your current ming installation"
echo ""
echo -e "$green""apt-get remove --purge *mingw* -y && apt-get autoremove -y"
echo ""
echo -e "$cyan""Step 2 - Run Setup from fatrat"
echo ""
echo -e "$green""chmod +x setup.sh && ./setup.sh"
echo -e "$orange""----------------------------------"
echo ""
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo ""
echo -e "$orange""------------Solution -------------"
echo -e "$cyan""Step 1 - Run setup from fatrat"
echo ""
echo -e "$green""chmod +x setup.sh && ./setup.sh"
echo -e "$orange""----------------------------------"
echo ""
echo ""
fi
rm -rf temp/dx >/dev/null 2>&1
echo -ne "$green""* - Checking$cyan Dx$green (Apk Req.)...................."
which dx >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
dxg=$(dx --version 2>&1 | tee temp/dx > /dev/null 2>&1)
chkvs=$(grep "version" < temp/dx | awk '{print $3}')
case "$chkvs" in
1.16)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect Version for apk builder in Fatrat"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Remove your current install dx version"
echo ""
echo -e "$green""apt-get remove --purge dx"
echo ""
echo -e "$cyan""Step 2 - Run setup.sh from fatrat and let it install the correct version"
echo -e "$orange""----------------------------------"
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Run setup.sh from fatrat and let it install the tool"
echo -e "$orange""----------------------------------"
fi
rm -f temp/dx >/dev/null 2>&1
echo -ne "$green""* - Checking$cyan Aapt$green (Apk Req.).................."
which aapt >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(aapt v | grep "Android" | awk '{print $5}')
case "$chkvs" in
v0.2-6625208)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect Version for apk builder in Fatrat"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Remove your current installed aapt version"
echo ""
echo -e "$green""apt-get remove --purge aapt"
echo ""
echo -e "$cyan""Step 2 - Run setup.sh from fatrat and let it install the correct version"
echo -e "$orange""----------------------------------"
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Run setup.sh from fatrat and let it install the tool"
echo -e "$orange""----------------------------------"
fi
echo -ne "$green""* - Checking$cyan Apktool$green (Apk Req.)..............."
which apktool >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(apktool --version | awk '{print$1}')
case "$chkvs" in
2.6.0)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect Version for apk builder in Fatrat"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Remove your current installed apktool version"
echo ""
echo -e "$green""apt-get remove --purge apktool -y && rm /usr/local/sbin/apktool > /dev/null 2>&1"
echo ""
echo -e "$cyan""Step 2 - Run setup.sh from fatrat and let it install the correct version"
echo -e "$orange""----------------------------------"
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Run setup.sh from fatrat and let it install the tool"
echo -e "$orange""----------------------------------"
fi
echo -ne "$green""* - Checking$cyan Baksmali$green (Apk Req.).............."
which baksmali >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
chkvs=$(baksmali --version | grep "baksmali" | awk '{print$2}')
case "$chkvs" in
2.3.3)
echo "[✔]"
;;
*)
echo -e "$green""[${red}x$green]$orange Incorrect Version for apk builder in Fatrat"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Remove your current installed baksmali version"
echo ""
echo -e "$green""apt-get remove --purge smali"
echo ""
echo -e "$cyan""Step 2 - Run setup.sh from fatrat and let it install the correct version"
echo -e "$orange""----------------------------------"
;;
esac
else
echo -e "$green""[${red}x$green]$orange Not Found"
echo -e "$orange""------------Solution-------------"
echo -e "$cyan""Step 1 - Run setup.sh from fatrat and let it install the tool"
echo -e "$orange""----------------------------------"
fi
echo -ne "$green""* - Checking$cyan Metasploit-Framework$green (msfc)......"
which msfconsole > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install metasploit-framework"
echo -e "$orange""Install using kali repository"
fi
echo -ne "$green""* - Checking$cyan Metasploit-Framework$green (msfv)......"
which msfvenom > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install metasploit-framework"
echo -e "$orange""Install using kali repository"
fi
echo -ne "$green""* - Checking$cyan Backdoor Factory$green (exe backdoor).."
which backdoor-factory > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install backdoor-factory"
echo -e "$orange""Install using kali repository/Ignore in case manually installed"
fi
echo -ne "$green""* - Checking$cyan Searchsploit$green (exploit db)........"
which searchsploit > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo "[✔]"
else
echo -e "$green""[${red}x$green]$orange Solution:$green apt-get install exploitdb"
echo -e "$orange""Install using kali repository/Ignore in case manually installed"
fi
echo ""
echo -e "$orange""--------------End Of Check tool for fatrat---------------"
exit 0