-
Notifications
You must be signed in to change notification settings - Fork 0
/
After-Arch.sh
434 lines (387 loc) · 12.1 KB
/
After-Arch.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
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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
#!/bin/bash
RED="\033[31m"
GREEN="\u001b[32;1m"
YELLOW="\u001b[33;1m"
CYAN="\033[36m"
RESET="\033[0;39m"
BLUE="\u001b[34;1m"
warn="$RED[!]$NORMAL"
inf="$BLUE[~]$NORMAL"
succ="$GREEN[+]$NORMAL"
yes="y"
no="n"
FAILURE=1
printf "\n $CYAN"
echo """
_________________________________________
##
####
######
########
##########
############
##############
################
##################
####################
######################
######### #########
########## ##########
########### ###########
########## ##########
####### #######
#### ####
### ###
_________________________________________
"""
printf "$RESET"
printf " $RED This script developed by Melih isbilen https://github.com/melihi $RESET"
sysinfo(){
printf "\n $inf Whoami:$RED $( whoami ) $RESET"
printf "\n $inf Hostname:$RED $(hostname) $RESET"
printf "\n $inf Users :$RED $( users ) $RESET"
printf "\n $inf Local Ip :$RED $(hostname -i) $RESET"
printf "\n $inf Public Ip :$RED $(curl -s ifconfig.me/ip) $RESET"
printf "\n $inf Sysinfo:$RED $(cat /proc/version) $RESET"
printf "\n $inf Disk :\n$RED $( lsblk ) $RESET"
printf "\n $inf Memory :\n$RED $(free -mh) $RESET"
}
start(){
printf " \n $RED Melih isbilen $RESET 2021 $BLUE https://github.com/melihi $RESET"
printf "\n $inf 1-) $GREEN Install BlackArch strap.sh (requirement for security tools) tools $NORMAL"
printf "\n $inf 2-) $GREEN Install Security tools $NORMAL"
printf "\n $inf 3-) $GREEN Install Programming tools $NORMAL"
printf "\n $inf 4-) $GREEN Install Text editors $NORMAL"
printf "\n $inf 5-) $GREEN Install VmWare tools $NORMAL"
printf "\n $inf 6-) $GREEN Install VirtualBox tools $NORMAL"
printf "\n $inf 7-) $GREEN Install Xfce lightdm desktop enviroment $NORMAL"
printf "\n $inf 8-) $GREEN Install Lxdm lxde desktop enviroment $NORMAL"
printf "\n $inf 9-) $GREEN Install Extra tools $NORMAL"
printf "\n $inf 10-) $GREEN Create User and Home directory $NORMAL"
printf "\n $inf 11-) $GREEN Install Lxqt desktop enviroment $NORMAL"
printf "\n $inf 12-) $GREEN Create directories for labs(tryhackme , hackthebox , vulnhub) $NORMAL"
printf "\n $inf 13-) $GREEN Remove unnecessary manjaro apps installed default $NORMAL"
selection
}
trap ctrl_c 2
ctrl_c(){
printf "\033c"
printf "\n $RESET Keyboard Interrupt detected, leaving...\n https://github.com/melihi"
exit "$FAILURE"
}
green_text(){
printf "$BLUE $1 $RESET"
}
yellow_text(){
printf "$YELLOW $1 $RESET"
}
red_text(){
printf "$RED $1 $RESET"
}
selection(){
read -p "What do you want ? :> " selection
case $selection in
1)
printf "\033c"
printf "$inf $CYAN BlackArch strap.sh :\n $RESET"
printf "Do you want to install ? y/n :"
read -p "" selection1
if [ "$selection1" = "$yes" ]; then
strap
else
printf "\033c"
start
fi
;;
2)
printf "\033c"
printf "$inf $CYAN Security tools :"
printf """
1-)Nmap
2-)Masscan
3-)Nikto
4-)Amass
5-)Subfinder
6-)Sublist3r
7-)Wireshark
8-)Gospider
9-)Dirb
10-)Ffuf
11-)Gospider
12-)Burp Suite
13-)Zaproxy
14-)Gobuster
15-)Metasploit
16-)Sqlmap
17-)Wpscan
18-)Binwalk
19-)Exiftool
20-)John the ripper
21-)Hydra $RESET \n """
printf "Do you want to install ? y/n :"
read -p "" selection2
if [ "$selection2" = "$yes" ]; then
security_tools
else
printf "\033c"
start
fi
;;
3)
printf "\033c"
printf "$inf $CYAN Programming tools :"
printf """
1-)Netbeans
2-)Python3
3-)Java JRE
4-)Spyder python ide $RESET \n """
printf "Do you want to install ? y/n :"
read -p "" selection3
if [ "$selection3" = "$yes" ]; then
programming_tools
else
printf "\033c"
start
fi
;;
4)
printf "\033c"
printf "$inf $CYAN Text editors :"
printf """
1-)gedit
2-)geany
3-)nano
4-)vim
5-)vi $RESET \n """
printf "Do you want to install ? y/n :"
read -p "" selection4
if [ "$selection4" = "$yes" ]; then
editor_tools
else
printf "\033c"
start
fi
;;
5)
printf "\033c"
printf "$inf $CYAN VmWare tools installing :\n $RESET"
printf "Do you want to install ? y/n :"
read -p "" selection5
if [ "$selection5" = "$yes" ]; then
pacman -S open-vm-tools
systemctl enable vmware-vmblock-fuse.service
systemctl enable vmtoolsd.service
start
else
printf "\033c"
start
fi
;;
6)
printf "\033c"
printf "$inf $CYAN VirtualBox tools installing :\n $RESET"
printf "Do you want to install ? y/n :"
read -p "" selection6
if [ "$selection6" = "$yes" ]; then
pacman -S virtualbox-guest-utils
systemctl enable vboxservice
start
else
printf "\033c"
start
fi
;;
7)
printf "\033c"
printf """$inf $CYAN Desktop enviroment :
1-) Xfce
2-) lightdm
3-) xorg :\n $RESET"""
printf "Do you want to install ? y/n :"
read -p "" selection7
if [ "$selection7" = "$yes" ]; then
desktop_enviroment
else
printf "\033c"
start
fi
;;
8)
printf "\033c"
printf """$inf $CYAN Desktop enviroment :
1-) Lxde
2-) Lxdm :\n $RESET"""
printf "Do you want to install ? y/n :"
read -p "" selection8
if [ "$selection8" = "$yes" ]; then
desktop_enviroment_lxde
else
printf "\033c"
start
fi
;;
9)
printf "\033c"
printf """$inf $CYAN Extra tools :
1-)gdb
2-)gcc
3-)netcat
4-)net-tools
5-)net-snmp
6-)whois bind
7-)openvpn
8-)arp-scan
9-)seclists
10-)neofetch
11-)python-pip
12-)torctl
13-)obfs4proxy
14-)openssh
15-)terminator
16-)htop
17-)oh-my-zsh
18-)firefox
19-)ghex
20-)zsh $RESET \n """
printf "Do you want to install ? y/n :"
read -p "" selection9
if [ "$selection9" = "$yes" ]; then
extra_tools
else
printf "\033c"
start
fi
;;
10)
printf "\033c"
printf """$inf $CYAN Creating user and Home directory :
1-) User
2-) Home directory
3-) Sudo group : $RESET \n """
printf "Username :"
read username
printf "Password :"
read password
sudo useradd -d /home/$username -m $username -p $password
#echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
printf "\033c"
start
;;
11)
printf "\033c"
printf """$inf $CYAN Desktop enviroment :
1-) Lxqt $RESET \n """
printf "Do you want to install ? y/n :"
read -p "" selection11
if [ "$selection11" = "$yes" ]; then
desktop_enviroment_lxqt
else
printf "\033c"
start
fi
;;
12)
printf "\033c"
printf "$inf $CYAN Create ~/CTFs/HackThebox . . . etc. :\n $RESET"
printf "Do you want to install ? y/n :"
read -p "" selection12
if [ "$selection12" = "$yes" ]; then
mkdir ~/CTFs/
mkdir ~/CTFs/HackTheBox
mkdir ~/CTFs/TryHackMe
mkdir ~/CTFs/VulnHub
mkdir ~/CTFs/PriviaHub
mkdir ~/CTFs/Tools
else
printf "\033c"
start
fi
;;
13)
printf "\033c"
printf """$inf $CYAN Uninstall
1-)Blueman
2-)hplip
3-)otter-browser
4-)smtube
5-)trojita
6-)micro
7-)smplayer $RESET \n """
printf "Do you want to remove ? y/n :"
read -p "" selection12
if [ "$selection12" = "$yes" ]; then
sudo pacman -Rsn blueman hplip
sudo pacman -Rsn otter-browser smtube trojita mpv micro smplayer smplayer-skins smplayer-themes
start
else
printf "\033c"
start
fi
;;
*)
printf "\n $warn INVALID \n"
printf "\033c"
start
;;
esac
}
strap(){
yellow_text "$inf \n Strap.sh installation started . . .\n"
# Run https://blackarch.org/strap.sh as root and follow the instructions.
curl -O https://blackarch.org/strap.sh
# Set execute bit
chmod +x strap.sh
# Run strap.sh
sudo ./strap.sh
# Enable multilib following https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib and run:
sudo pacman -Syu
green_text "$succ Strap.sh installation finished . . . \n"
start
}
security_tools(){
yellow_text "$inf SECURITY tools installation started . . . \n"
pacman -S nmap masscan nikto amass subfinder sublist3r wireshark-qt gospider dirb ffuf gospider burpsuite zaproxy gobuster metasploit sqlmap wpscan binwalk perl-image-exiftool john hydra
green_text "$succ SECURITY tools installation finished . . . \n"
start
}
programming_tools(){
yellow_text "$inf Programming tools installation started . . . \n"
pacman -S jre-openjdk netbeans spyder
green_text "$succ Programming tools installation finished . . . \n"
start
}
editor_tools(){
yellow_text "$inf Text editor installation started . . . \n"
pacman -S gedit nano geany vim vi
green_text "$succ Text editor installation finished . . . \n"
start
}
extra_tools(){
yellow_text "$inf Extra tools installation started . . . \n"
sudo pacman -S gdb gcc netcat net-tools net-snmp whois bind openvpn arp-scan seclists neofetch python-pip torctl obfs4proxy openssh tor-browser-en firefox ghex zsh terminator
echo 'sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" copy paste this command for oh-my-zsh installation .'
green_text "$succ Extra tools installation finished . . . \n"
start
}
desktop_enviroment(){
yellow_text "$inf Xfce4 installation started . . . \n"
pacman -S xorg xfce4 xfce4-goodies lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings
systemctl enable lightdm
green_text "$succ Xfce4 installation finished . . . \n"
start
}
desktop_enviroment_lxde(){
yellow_text "$inf Lxde installation started . . . \n"
pacman -S lxde lxdm
systemctl enable lxdm
green_text "$succ Lxde installation finished . . . \n"
start
}
desktop_enviroment_lxqt(){
yellow_text "$inf Lxqt installation started . . . \n"
sudo pacman -S lxqt lxqt-config lxqt-panel lxqt-policykit lxqt-qtplugin lxqt-session pcmanfm-qt lxqt-about lxqt-admin lxqt-globalkeys lxqt-notificationd lxqt-openssh-askpass lxqt-powermanagement lxqt-runner
green_text "$succ Lxqt installation finished . . . \n"
start
}
sysinfo
start