-
Notifications
You must be signed in to change notification settings - Fork 1
/
autoArch.sh
464 lines (342 loc) · 15.3 KB
/
autoArch.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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
#!/bin/bash
# Colores
greenColour="\e[0;32m\033[1m"
endColour="\033[0m\e[0m"
redColour="\e[0;31m\033[1m"
blueColour="\e[0;34m\033[1m"
yellowColour="\e[0;33m\033[1m"
purpleColour="\e[0;35m\033[1m"
turquoiseColour="\e[0;36m\033[1m"
grayColour="\e[0;37m\033[1m"
# Define color variables para ASCII
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
cat << 'EOF'
%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %%%%%%%%%%%%%%%%%%%%%%%%
#####%%%%%%%%%%%%%%%%%%%%%%%%%%% * % %%%%%%%%%%%%%%%%%########
###%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % %%%%%%%%%%%%%############
####%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #% *% %%%%######%%%%%%#########
####%%###%%%%%%#####%#%%%%%%%%%%* #%%%% *### #%%% %%%%%###########+#%%%#####
#################%%%%%%######%%#% +#%%%%%%%%%%##%%%% %%%%%###+###########%%%###
#############%%%%#############%#%* +**#%%%%%%%%%%%%%% %%%#############*#######%%%
###########%%####################% **#%+++*%%%# #%%####%##*##*##############
########%%#######################%% ***%%++%#%*%# ##%#####%##**##-#############
######%%##################**#****#%# +* :%%=+++++*%%%#* ##%##*#####****=*#############
####%#########***-*##**#**********#%* =+*##** %%%#-+%**#%%% %% *###*****+=*+***=+***###########
##%##############**********#***+++###*= +*%%%%%%#+-=*#% * #%%%% +###***********#**#*+*#####
%#### *##********+***+++++*##* %--%=+*=++#%%% ###%%%%%###***********+*#**-**####
## ***+******#+++++++++*** ####%#*%%%%%%%%%%%%%#%%%%++++*****+*+***=+**####
+=+**-***+=+++++===+*#*##..:+##=##%%%%%%%##%%%%+++++++++++:=+*==*### % %%%%
+*+**+**++++=-::-:::**=+*#%*%+****#%%%%%%%%%###%%#*+++++=-=#=:.#### %#
++++=***+++++===-:.**%##%%##%%%%%%%%%%%%%%%%%%%%%%%+++++=#==#=####
+=-+=-#*+++++++-=+*+%%%%%%%%%%%%%%%%%%%%%%%%%%%========#*+###*###
**-*:++*+++++++= =#%##%%%%%%%%%#######=+%%%##%=*##*%%%%%**##%#
*###**######=:###%##+#%%%%%%%##%####--=*#%%%#%###%%%#***#*%%
#%%%%###%%%%%#*+=#%%%%%%%#%####:::-= #%%%%%%%% #%%
#%%%%%## +#%%%%%%%%%%%% %%%%%% %
* ## *%%%%%%%%%%#% # %
+ ++#%%%%%%%%#%%% %%%
%% *##%%%%%%%%%%#%#%%%%
*###***###***+ #%##%%#%%%%%%%%%%%%%%%%
###*# ######*#### ###%%%%%%%%%%%%%%%%%%%%#
####**## * ####%%%%%%%%%%%%%%%%%%%%
###**** +*#%%%%%%%%%%%%%%%%%%%%%%%%
#%%%%% ***+** --##%#%%%%%%%%%%%%%%%%%%%%%%%%
.o. o8o ooooooooooooo oooo ooooo ooo o8o oooo .
.888. `"' 8' 888 `8 `888 `888b. `8' `"' `888 .o8
.8"888. oooo d8b .ooooo. oooo .oooo. 888 888 .oo. .ooooo. 8 `88b. 8 oooo .oooooooo 888 .oo. .o888oo
.8' `888. `888""8P d88' `88b `888 `P )88b 888 888P"Y88b d88' `88b 8 `88b. 8 `888 888' `88b 888P"Y88b 888
.88ooo8888. 888 888ooo888 888 .oP"888 888 888 888 888ooo888 8 `88b.8 888 888 888 888 888 888
.8' `888. 888 888 .o 888 d8( 888 888 888 888 888 .o 8 `888 888 `88bod8P' 888 888 888 .
o88o o8888o d888b `Y8bod8P' o888o `Y888""8o o888o o888o o888o `Y8bod8P' o8o `8 o888o `8oooooo. o888o o888o "888"
d" YD
"Y88888P'
EOF
#Ctrl C función para salir
function ctrl_c(){
echo -e "\n[!] Saliendo...\n"
tput cnorm
exit 1
}
# Capturar Ctrl+C
trap ctrl_c SIGINT
# Actualización del sistema
echo -e "${redColour}\n\n[!]Updating system, please wait... This will taka a while so why not go for a snack or pet your pets?"
sudo pacman -Syu --noconfirm > /dev/null 2>&1
# Instalación de yay
if ! command -v yay > /dev/null 2>&1; then
echo -e "${greenColour}Installing yay${endColour}"
sudo pacman -S --noconfirm yay > /dev/null 2>&1
fi
back=$(pwd)
echo -e "${greenColour}What do you want to install first?${endColour}"
echo -e "\n\t1) Aesthetics"
echo -e "\n\t2) Tools"
read replay
function aesthetics (){
cat << "EOF"
╔═╗┌─┐┌─┐┌┬┐┬ ┬┌─┐┌┬┐┬┌─┐┌─┐
╠═╣├┤ └─┐ │ ├─┤├┤ │ ││ └─┐
╩ ╩└─┘└─┘ ┴ ┴ ┴└─┘ ┴ ┴└─┘└─┘
EOF
cd polybar
cd chmod +x launch.sh
cd ..
cd bin
chmod +x aphrodite.sh ethernet_status.sh htb_status.sh htb_target.sh
cd ..
# Selección de Window Manager
echo -e "${purpleColour}\n\n[!]Choose your window manager!${endColour}\n\n\t${greenColour}1) Awesome${endColour}\n\t${blueColour}2) Bspwm${endColour}"
read replay
if ! command -v ifconfig >/dev/null 2>&1; then
yay -S --noconfirm net-tools
fi
# Casos para la selección del Window Manager
case $replay in
1)
awesomneInstaller
;;
2)
bspwmInstaller
;;
*)
echo -e "${redColour}\nNon an option, sorry! Exiting!${endColour}"
exit 1
;;
esac
npah=$(pwd)
if [ "$npah" != "$back" ]; then
cd "$back"
fi
# Instalación de eww
yay -S gtk3 gtk-layer-shell pango gdk-pixbuf2 libdbusmenu-gtk3 cairo glib2 gcc-libs glibc
echo -e "${greenColour}\n\n[!]Installing eww${endColour}"
sleep 3
yay -S --noconfirm rust cargo
git clone https://github.com/elkowar/eww > /dev/null 2>&1
cd eww
echo -e "${purpleColour}\n\nAre you using Wayland? (y/n)${endColour}"
read replay
case $replay in
y)
waylandEww
;;
n)
normalEww
;;
*)
echo -e "${redColour}\nNon an option, sorry! Exiting!${endColour}"
exit 1
;;
esac
npah=$(pwd)
if [ "$npah" != "$back" ]; then
cd "$back"
fi
# Instalación de Kitty
if [ -z "$(command -v kitty)" ]; then
echo -e "${greenColour}Installing a kitten!${endColour}"
sleep 3
yay -S --noconfirm kitty >/dev/null 2>&1
fi
#Installing picom
echo -e "${purpleColour}\n\nInstalling picom!${endColour}"
yay -S --noconfirm picom >/dev/null 2>&1
git clone https://github.com/Arian8j2/picom-jonaburg-fix.git
cd picom-jonaburg-fix
meson --buildtype=release . build >/dev/null 2>&1
ninja -C --noconfirm build >/dev/null 2>&1
LDFLAGS="-L/path/to/libraries" CPPFLAGS="-I/path/to/headers" meson --buildtype=release . build >/dev/null 2>&1
# To install the binaries in /usr/local/bin (optional)
sudo ninja -C --noconfirm build install >/dev/null 2>&1
mkdir -p $HOME/.config/picom
cd $back
cp picom.conf ~/.config/picom
if [ "$npah" != "$back" ]; then
cd "$back"
fi
# Instalación de herramientas adicionales
packs=("feh" "polybar" "fastfetch" "ghostwriter" "flameshot" "rofi" "ranger")
LOG_FILE="errorAesthetics.data"
for pack in "${packs[@]}"; do
echo -e "Installing $pack..."
yay -S --noconfirm "$pack" >/dev/null 2>&1
if [ -z "$(command -v $pack)" ]; then
echo -e "${greenColour}[!] Something went wrong, $pack is not installed. Try again manually ${endColour}" >> errorAesthetics.data
fi
echo -e "${greenColour}$pack is installed${endColour}"
done
# Instalación de Powerlevel10k
sudo git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
sudo echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
chsh -s $(which zsh)
yay -S zsh-syntax-highlighting zsh-autosuggestions
cp .p10k.zsh ~/
cat .p10k.zsh >> ~/..p10k.zsh
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
echo "source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
# Root Powerlevel10k
sudo git clone --depth=1 https://github.com/romkatv/powerlevel10k.git /root
sudo echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
chsh -s $(which zsh)
sudo echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
sudo echo "source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
#Fonts installing
fonts=("ttf-space-mono-nerd" "ttf-monofur-nerd" "ttf-anonymouspro-nerd" "ttf-nerd-fonts-symbols-mono")
for font in "${fonts[@]}"; do
yay -S --noconfirm $font >/dev/null 2>&1
echo "Instalando $font"
done
cd polybar
chmod +x launch.sh
npah=$(pwd)
if [ "$npah" != "$back" ]; then
cd "$back"
fi
cp -r backgrounds ${HOME}
mkdir -p $HOME/.config/fastfetch
cp -r polybar bin kitty fastfetch ~/.config
cp -r backgrounds ~/
cd backgrounds
cp picture.png ~/.config/fastfetch
cd $back
}
function toolsHack () {
cat << "EOF"
@@@ @@@ @@@@@@ @@@@@@@ @@@ @@@ @@@ @@@ @@@ @@@@@@@@
@@@ @@@ @@@@@@@@ @@@@@@@@ @@@ @@@ @@@ @@@@ @@@ @@@@@@@@@
@@! @@@ @@! @@@ !@@ @@! !@@ @@! @@!@!@@@ !@@
!@! @!@ !@! @!@ !@! !@! @!! !@! !@!!@!@! !@!
@!@!@!@! @!@!@!@! !@! @!@@!@! !!@ @!@ !!@! !@! @!@!@
!!!@!!!! !!!@!!!! !!! !!@!!! !!! !@! !!! !!! !!@!!
!!: !!! !!: !!! :!! !!: :!! !!: !!: !!! :!! !!:
:!: !:! :!: !:! :!: :!: !:! :!: :!: !:! :!: !::
:: ::: :: ::: ::: ::: :: ::: :: :: :: ::: ::::
: : : : : : :: :: : : ::: : :: : :: :: :
EOF
mkdir -p hackTools
cd hackTools
# Instalación de Black Arch y herramientas
echo -e "\n\n${grayColour}Installing black arch over current distro${endColour}"
curl -O https://blackarch.org/strap.sh >/dev/null 2>&1
echo 26849980b35a42e6e192c6d9ed8c46f0d6d06047 strap.sh | sha1sum -c >/dev/null 2>&1
chmod +x strap.sh
sudo ./strap.sh >/dev/null 2>&1
tools=("nmap" "whatweb" "nikto" "go" "gobuster" "feroxbuster" "librewolf" "zen-browser" "burpsuite" "autorecon" "fuff" "netdiscover" "anubis" "arp-scan" "anti-xss" "enum4linux" "exploit-db" "crawley-bin" "wfuzz" "seclists")
LOG_FILE="error.data"
for tool in "${tools[@]}"; do
echo "Installing $tool..."
# Intenta instalar la herramienta
yay -S --noconfirm "$tool" >/dev/null 2>&1
# Verifica si la herramienta fue instalada correctamente
if command -v "$tool" >/dev/null 2>&1; then
echo -e "${turquoiseColour} $tool is installed${endColour}"
else
echo -e "${redColour} $tool is not installed${endColour}" | tee -a "$LOG_FILE"
fi
done
# Instalación de herramientas externas
sudo git clone https://github.com/drwetter/testssl.sh.git >/dev/null 2>&1
echo -e "\nInstallng TestSSL\n"
sudo git clone https://github.com/hatRiot/clusterd >/dev/null 2>&1
echo -e "Installing Clustered\n"
go install github.com/projectdiscovery/katana/cmd/katana@latest > /dev/null 2>&1
echo -e "Installing Katana\n"
sudo git clone https://github.com/21y4d/nmapAutomator >/dev/null 2>&1
echo -e "Installing nmapAutomator\n"
# Instalando seclists y más diccionarios
echo -e "Do you want to install wordlists? (y/n)"
read wrds
if [ "$wrds" == "y" ]; then
sudo mkdir -p /usr/share/wordlists
cd /usr/share/wordlists || exit
sudo git clone https://github.com/danielmiessler/SecLists.git
sudo git clone https://github.com/berzerk0/Probable-Wordlists.git
fi
cd $back
}
function awesomneInstaller (){
cat << "EOF"
_______ _ _ _______ __ __
| _ || | _ | || || |_| |
| |_| || || || || _____|| |
| || || |_____ | |
| || ||_____ || |
| _ || _ | _____| || ||_|| |
|__| |__||__| |__||_______||_| |_|
EOF
echo -e "${blueColour}\n\nInstalling AwesomeWM for you!${endColour}"
echo -e "${redColour}\n\nWARNING!${endColour}"
echo -e "${redColour}\n\nThis is only the base version, no configurations included!!${endColour}"
sleep 3
yay -S --noconfirm awesome vicious xcompmgr feh lxappearance xorg-setxkbmap >/dev/null 2>&1
mkdir ~/.config/awesome && cp /etc/xdg/awesome/rc.lua ~/.config/awesome/
}
function bspwmInstaller (){
cat << "EOF"
██████╗ ███████╗██████╗ ██╗ ██╗███╗ ███╗
██╔══██╗██╔════╝██╔══██╗██║ ██║████╗ ████║
██████╔╝███████╗██████╔╝██║ █╗ ██║██╔████╔██║
██╔══██╗╚════██║██╔═══╝ ██║███╗██║██║╚██╔╝██║
██████╔╝███████║██║ ╚███╔███╔╝██║ ╚═╝ ██║
╚═════╝ ╚══════╝╚═╝ ╚══╝╚══╝ ╚═╝ ╚═╝
EOF
echo -e "${blueColour}\n\nInstalling BSPWM for you!${endColour}"
yay -S --noconfirm bspwm sxhkd calcurse todotxt \
jq dunst betterlockscreen brightnessctl playerctl maim \
xclip imagemagick >/dev/null 2>&1
echo -e "${blueColour}Installing...${endColour}"
mkdir -p $HOME/.config/bspwm
mkdir -p $HOME/.config/sxhkd
mkdir -p $HOME/.config/bspwm/scripts
echo -e "${blueColour}\nAlmost there!${endColour}"
chmod +x bspwmrc
chmod +x sxhkdrc
chmod +x bspwm_resize
cp bspwmrc ~/.config/bspwm/
cp sxhkdrc ~/.config/sxhkd/
cp bspwm_resize ~/.config/bspwm/scripts
echo -e "${blueColour}\nJust a little longer!${endColour}"
cd ~/.config/bspwm
sed -i -e 's/\r$//' bspwmrc
echo -e "${blueColour}Done!${endColour}"
cd $back
}
function waylandEww(){
echo -e "${blueColour}\n\nBuilding eww! This will take sometime tho, want to go and walk a bit?${endColour}"
cargo build --release --no-default-features --features=wayland >/dev/null 2>&1
cd target/release
chmod +x eww
echo -e "${greenColour}\n\nDone installing Eww!${endColour}"
sleep 3
cd $back
}
function normalEww(){
echo -e "${blueColour}\n\nBuilding eww! This will take sometime tho, want to go and walk a bit?${endColour}"
cargo build --release --no-default-features --features x11 >/dev/null 2>&1
cd target/release
chmod +x eww
echo -e "${greenColour}\n\nDone installing Eww!${endColour}"
sleep 3
cd $back
}
case $replay in
1)
aesthetics
toolsHack
;;
2)
toolsHack
aesthetics
;;
*)
echo -e "${redColour}\nNon an option, sorry! Exiting!${endColour}"
exit 1
;;
esac
echo -e "${greenColour}Done!${endColour}"