This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 217
/
install.sh
executable file
·333 lines (301 loc) · 9.61 KB
/
install.sh
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
#!/usr/bin
#Copyright 2021 KITHACK
#Written by: Adrian Guillermo
#Facebook: https://facebook.com/adrian.guillermo.22
#Github: https://github.com/AdrMXR
# Installer KitHack
# Colors
red='\e[1;31m'
default='\e[0m'
yellow='\e[0;33m'
orange='\e[38;5;166m'
green='\033[92m'
# Location
path=$(pwd)
# Check root
if [ "$(id -u)" != "0" ] > /dev/null 2>&1; then
echo -e '\n$red[x] Este script necesita permisos root.' 1>&2
exit
fi
# Banner
clear
sleep 2
echo -e "$yellow ___ __ .__ .__ "
echo -e "$yellow | | ____ _______/ |______ | | | | ___________ "
echo -e "$yellow | |/ \ / ___/\ __\__ \ | | | | _/ __ \_ __ \ "
echo -e "$yellow | | | \___ \ | | / __ \| |_| |_\ ___/| | \/ "
echo -e "$yellow |___|___| /____ > |__| (____ /____/____/\___ >__| /\ /\ /\ "
echo -e "$yellow \/ \/ \/ \/ \/ \/ \/ "
echo -e " "
echo -e "$orange Setup KitHack v1.3.2 "
echo -e " "
echo -e "$orange By:AdrMXR "
# Check if there is an internet connection
ping -c 1 google.com > /dev/null 2>&1
if [[ "$?" == 0 ]]; then
echo ""
echo -e "$green[✔][Internet Connection]............[ OK ]"
sleep 1.5
else
echo ""
echo -e "$red[!][Internet Connection].........[ NOT FOUND ]"
echo ""
exit
fi
# Check dependencies
echo -e $yellow
echo -n [*] Checando dependencias...= ;
sleep 3 & while [ "$(ps a | awk '{print $1}' | grep $!)" ] ; do for X in '-' '\' '|' '/'; do echo -en "\b$X"; sleep 0.1; done; done
echo ""
# Check if xterm exists
which xterm > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo ""
echo -e "$green[✔][Xterm]..........................[ OK ]"
sleep 1.5
else
echo ""
echo -e "$red[x][Xterm].......................[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Installing Xterm...]"
sudo apt-get install -y xterm > /dev/null
fi
# Check if postgresql exists
which /etc/init.d/postgresql > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e "$green[✔][Postgresql].....................[ OK ]"
sleep 1.5
else
echo -e "$red[x][Postgresql]..................[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Installing Postgresql...]"
xterm -T "INSTALLER POSTGRESQL" -geometry 100x30 -e "sudo apt-get install -y postgresql"
fi
# Check if metasploit framework exists
which msfconsole > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e "$green[✔][Metasploit Framework]...........[ OK ]"
sleep 1.5
else
echo -e "$red[x][Metasploit Framework]........[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Installing Metasploit-Framework...]"
xterm -T "INSTALLER METASPLOIT FRAMEWORK" -geometry 100x30 -e "curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && chmod 755 msfinstall && ./msfinstall && sudo apt-get update && apt-get upgrade"
fi
# Check if apktool exists
which apktool > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e "$green[✔][Apktool]........................[ OK ]"
sleep 1.5
else
echo -e "$red[x][Apktool].....................[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Installing Apktool...]"
xterm -T "INSTALLER APKTOOL" -geometry 100x30 -e "wget -O apktool.jar https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.4.0.jar && wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool && mv apktool* /usr/local/bin && chmod +x /usr/local/bin/apktool*"
fi
# Check if aapt exists
which aapt > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e "$green[✔][Aapt]...........................[ OK ]"
sleep 1.5
else
echo -e "$red[x][Aapt]........................[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Installing Aapt...]"
xterm -T "INSTALLER AAPT" -geometry 100x30 -e "sudo apt-get install -y aapt && sudo apt-get install -y android-framework-res"
fi
# Check if jarsigner exists
which jarsigner > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e "$green[✔][Jarsigner]......................[ OK ]"
sleep 1.5
else
echo -e "$red[x][Jarsigner]...................[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Installing Jarsigner...]"
xterm -T "INSTALLER JARSIGNER" -geometry 100x30 -e "sudo apt-get install default-jdk"
fi
# Check if zipalign exists
which zipalign > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e "$green[✔][Zipalign].......................[ OK ]"
sleep 1.5
else
echo -e "$red[x][Zipalign]....................[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Installing Zipalign...]"
xterm -T "INSTALLER ZIPALIGN" -geometry 100x30 -e "sudo apt-get install -y zipalign"
fi
# Check if pwgen exists
which pwgen > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e "$green[✔][Pwgen]..........................[ OK ]"
sleep 1.5
else
echo -e "$red[x][Pwgen].......................[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Installing Pwgen...]"
xterm -T "INSTALLER PWGEN" -geometry 100x30 -e "sudo apt-get install pwgen"
fi
# Check if ngrok exists
arch=`arch`
if [ -f "ngrok" ]; then
echo -e "$green[✔][Ngrok]..........................[ OK ]"
sleep 1.5
else
echo -e "$red[x][Ngrok]........................[ NOT FOUND ]"
sleep 1.5
echo -e "$yellow[!][Downloading ngrok...]"
if [ "$arch" == "x86_64" ]; then
xterm -T "DOWNLOAD NGROK" -geometry 100x30 -e "wget https://bin.equinox.io/a/kpRGfBMYeTx/ngrok-2.2.8-linux-amd64.zip && unzip ngrok-2.2.8-linux-amd64.zip"
rm ngrok-2.2.8-linux-amd64.zip
else
xterm -T "DOWNLOAD NGROK" -geometry 100x30 -e "wget https://bin.equinox.io/a/4hREUYJSmzd/ngrok-2.2.8-linux-386.zip && unzip ngrok-2.2.8-linux-386.zip"
rm ngrok-2.2.8-linux-386.zip
fi
fi
# Configuring folders
echo -e $yellow
echo -n [*] Configurando carpetas...= ;
sleep 3 & while [ "$(ps a | awk '{print $1}' | grep $!)" ] ; do for X in '-' '\' '|' '/'; do echo -en "\b$X"; sleep 0.1; done; done
echo ""
echo -e $green
if [ -d output ]; then
echo -e "[✔]Ya existe $path/output"
sleep 0.2
else
mkdir output
echo -e "[✔]$path/output"
sleep 0.2
fi
if [ -d tools/Android ]; then
echo -e "[✔]Ya existe $path/tools/Android"
sleep 0.2
else
mkdir -p tools/Android
echo -e "[✔]$path/tools/Android"
sleep 0.2
fi
if [ -d tools/Windows ]; then
echo -e "[✔]Ya existe $path/tools/Windows"
sleep 0.2
else
mkdir -p tools/Windows
echo -e "[✔]$path/tools/Windows"
sleep 0.2
fi
if [ -d tools/Phishing ]; then
echo -e "[✔]Ya existe $path/tools/Phishing"
sleep 0.2
else
mkdir -p tools/Phishing
echo -e "[✔]$path/tools/Phishing"
sleep 0.2
fi
if [ -d tools/Wifi ]; then
echo -e "[✔]Ya existe $path/tools/Wifi"
sleep 0.2
else
mkdir -p tools/Wifi
echo -e "[✔]$path/tools/Wifi"
sleep 0.2
fi
if [ -d tools/Passwords ]; then
echo -e "[✔]Ya existe $path/tools/Passwords"
sleep 0.2
else
mkdir -p tools/Passwords
echo -e "[✔]$path/tools/Passwords"
sleep 0.2
fi
if [ -d tools/Web ]; then
echo -e "[✔]Ya existe $path/tools/Web"
sleep 0.2
else
mkdir -p tools/Web
echo -e "[✔]$path/tools/Web"
sleep 0.2
fi
if [ -d tools/Spoofing ]; then
echo -e "[✔]Ya existe $path/tools/Spoofing"
sleep 0.2
else
mkdir -p tools/Spoofing
echo -e "[✔]$path/tools/Spoofing"
sleep 0.2
fi
if [ -d tools/InformationGathering ]; then
echo -e "[✔]Ya existe $path/tools/InformationGathering"
sleep 0.2
else
mkdir -p tools/InformationGathering
echo -e "[✔]$path/tools/InformationGathering"
sleep 0.2
fi
if [ -d tools/Others ]; then
echo -e "[✔]Ya existe $path/tools/Others"
sleep 0.2
else
mkdir -p tools/Others
echo -e "[✔]$path/tools/Others"
sleep 0.2
fi
if [ -d .config ]; then
echo -e "[✔]Ya existe $path/.config"
sleep 0.2
else
mkdir -p .config
echo -e "[✔]$path/.config"
sleep 0.2
fi
# Installing requirements
echo -e $yellow
echo -n [*] Instalando requerimientos de python...= ;
sleep 3 & while [ "$(ps a | awk '{print $1}' | grep $!)" ] ; do for X in '-' '\' '|' '/'; do echo -en "\b$X"; sleep 0.1; done; done
echo ""
echo -e $green
pip3 install requests
pip3 install py-getch
apt-get install python3-tk
pip3 install pathlib
pip3 install zenipy
pip3 install pgrep
apt-get install libatk-adaptor libgail-common
sudo apt-get purge fcitx-module-dbus
# Shortcut for kithack
echo -e $yellow
echo -n [*] Configuración de acceso directo...= ;
sleep 3 & while [ "$(ps a | awk '{print $1}' | grep $!)" ] ; do for X in '-' '\' '|' '/'; do echo -en "\b$X"; sleep 0.1; done; done
echo ""
echo ""
echo -e "$green[!] ¿Desea poder ejecutar kithack desde cualquier lugar de su terminal? (y/n)"
echo -e "$red"
echo -ne "KitHack >> $default"
read -r option
case "$option" in
y|Y)
lnk=$?
if [ "$lnk" == "0" ];then
run="cd $path && sudo python3 KitHack.py"
touch /usr/local/bin/kithack
echo "#!/bin/bash" > /usr/local/bin/kithack
echo "$run" >> /usr/local/bin/kithack
chmod +x /usr/local/bin/kithack
cp images/kithack.desktop /usr/share/applications/kithack.desktop
cp images/kithack.png /usr/share/icons/kithack.png
sleep 2
echo -e $green
echo -e "╔──────────────────────────────────────────────────────────╗"
echo -e "|[✔] Installation complete. Type 'kithack' to run the tool.|"
echo -e "┖──────────────────────────────────────────────────────────┙"
fi
;;
n|N)
sleep 2
echo -e $green
echo -e "╔──────────────────────────╗"
echo -e "|[✔] Installation complete.|"
echo -e "┖──────────────────────────┙"
;;
esac
exit