forked from samyoyo/flux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arch-install
371 lines (325 loc) · 10.5 KB
/
arch-install
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
#!/bin/bash
########## DEBUG Mode ##########
## ##
if [ -z ${INSTALLER_DEBUG+x} ]; then INSTALLER_DEBUG=0
else INSTALLER_DEBUG=1
fi
## ##
################################
#Config
version=2
revision=6
#Colors
red='\e[1;31m'
blue='\e[1;34m'
yellow='\e[1;33m'
transparent="\e[0m"
#DUMP_PATH
rm -rf /tmp/Installer/
mkdir /tmp/Installer/
DUMP_PATH="/tmp/Installer/"
function conditional_clear() {
if [[ "$INSTALLER_output_device" != "/dev/stdout" ]]; then clear; fi
}
#Config_END
if [ $INSTALLER_DEBUG = 1 ]; then
## Developer Mode
export INSTALLER_output_device=/dev/stdout
HOLD="-hold"
else
## Normal Mode
export INSTALLER_output_device=/dev/null
HOLD=""
fi
#Check root
if [[ $EUID -ne 0 ]]; then
echo -e "\e[1;31mYou don't have admin privilegies, execute the script as root."$transparent
exit
fi
clear
#Check for X display
if [ -z "${DISPLAY:-}" ]; then
echo -e "\e[1;31mThe script should be executed inside a X (graphical) session."$transparent""
exit 1
fi
function mostrarheader(){
echo -e "$blue#########################################################"
echo -e "$blue# #"
echo -e "$blue# $red FLUXION $version" "${yellow} ${red} < F""${yellow}luxion" "${red}I""${yellow}s" "${red}T""${yellow}he ""${red}F""${yellow}uture > " ${blue}" #"
echo -e "$blue#"${yellow} by "${red}D""${yellow}eltax", "${red}"S""${yellow}"trasharo and "${red}A""${yellow}patheticEuphoria" " ${blue}#""
echo -e "$blue# #"
echo -e "$blue#########################################################""$transparent"
echo
echo
}
function setresolution {
function resA {
TOPLEFT="-geometry 90x13+0+0"
TOPRIGHT="-geometry 83x26-0+0"
BOTTOMLEFT="-geometry 90x24+0-0"
BOTTOMRIGHT="-geometry 75x12-0-0"
TOPLEFTBIG="-geometry 91x42+0+0"
TOPRIGHTBIG="-geometry 83x26-0+0"
}
function resB {
TOPLEFT="-geometry 92x14+0+0"
TOPRIGHT="-geometry 68x25-0+0"
BOTTOMLEFT="-geometry 92x36+0-0"
BOTTOMRIGHT="-geometry 74x20-0-0"
TOPLEFTBIG="-geometry 100x52+0+0"
TOPRIGHTBIG="-geometry 74x30-0+0"
}
function resC {
TOPLEFT="-geometry 100x20+0+0"
TOPRIGHT="-geometry 109x20-0+0"
BOTTOMLEFT="-geometry 100x30+0-0"
BOTTOMRIGHT="-geometry 109x20-0-0"
TOPLEFTBIG="-geometry 100x52+0+0"
TOPRIGHTBIG="-geometry 109x30-0+0"
}
function resD {
TOPLEFT="-geometry 110x35+0+0"
TOPRIGHT="-geometry 99x40-0+0"
BOTTOMLEFT="-geometry 110x35+0-0"
BOTTOMRIGHT="-geometry 99x30-0-0"
TOPLEFTBIG="-geometry 110x72+0+0"
TOPRIGHTBIG="-geometry 99x40-0+0"
}
function resE {
TOPLEFT="-geometry 130x43+0+0"
TOPRIGHT="-geometry 68x25-0+0"
BOTTOMLEFT="-geometry 130x40+0-0"
BOTTOMRIGHT="-geometry 132x35-0-0"
TOPLEFTBIG="-geometry 130x85+0+0"
TOPRIGHTBIG="-geometry 132x48-0+0"
}
function resF {
TOPLEFT="-geometry 100x17+0+0"
TOPRIGHT="-geometry 90x27-0+0"
BOTTOMLEFT="-geometry 100x30+0-0"
BOTTOMRIGHT="-geometry 90x20-0-0"
TOPLEFTBIG="-geometry 100x70+0+0"
TOPRIGHTBIG="-geometry 90x27-0+0"
}
detectedresolution=$(xdpyinfo | grep -A 3 "screen #0" | grep dimensions | tr -s " " | cut -d" " -f 3)
## A) 1024x600
## B) 1024x768
## C) 1280x768
## D) 1280x1024
## E) 1600x1200
case $detectedresolution in
"1024x600" ) resA ;;
"1024x768" ) resB ;;
"1280x768" ) resC ;;
"1366x768" ) resC ;;
"1280x1024" ) resD ;;
"1600x1200" ) resE ;;
"1366x768" ) resF ;;
* ) resA ;;
esac
}
#Install Main
conditional_clear
mostrarheader
echo "Updating system..."
sudo pacman -S xterm --yes
##############################
echo -ne "Aircrack-ng....."
if ! hash aircrack-ng 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent
xterm $HOLD -title "Installing Aircrack-ng" -e pacman -S aircrack-ng
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Aireplay-ng....."
if ! hash awk 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Awk" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S gawk
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Airodump-ng....."
if ! hash airodump-ng 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Airodump-ng" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S aircrack-ng
else
echo -e "\e[1;32mOK!"$transparent""
fi
##############################
echo -ne "Bully..........."
if ! hash bully 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
cd /tmp;sudo git clone https://aur.archlinux.org/bully.git 2>/dev/null; cd bully; sudo makepkg; sudo pacman -U *.pkg.tar.xz
xterm $HOLD -title "Installing Bully" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S bully
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
##############################
echo -ne "Curl............"
if ! hash curl 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Curl" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S curl
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Dhcpd..........."
if ! hash dhcpd 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing isc-dhcp-server" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S dhcp
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Hostapd........."
if ! hash hostapd 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Hostapd" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S hostapd
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Iwconfig........"
if ! hash iwconfig 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Iwconfig" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S iwconfig
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
##############################
echo -ne "Lighttpd........"
if ! hash lighttpd 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Lighttpd" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S lighttpd
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Macchanger......"
if ! hash macchanger 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Macchanger" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S macchanger
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Mdk3............"
if ! hash mdk3 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Macchanger" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S mdk3
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Nmap............"
if ! hash nmap 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Nmap" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S nmap
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Openssl........."
if ! hash openssl 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Openssl" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S openssl
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
##############################
echo -ne "Php-cgi........"
if ! hash php-cgi 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing php-cgi" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S php-cgi
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Pyrit..........."
if ! hash pyrit 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Pyrit" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S pyrit
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Python.........."
if ! hash python 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Python" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S python
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Reaver.........."
if ! hash reaver 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Reaver" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S reaver
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
##############################
echo -ne "rfkill.........."
if ! hash rfkill 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Rfkill" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S rfkill
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
##############################
echo -ne "Unzip..........."
if ! hash unzip 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing unzip" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S unzip
else
echo -e "\e[1;32mOK!"$transparent
fi
sleep 0.025
##############################
echo -ne "Zenity.........."
if ! hash zenity 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Zenity" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S zenity
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
##############################
echo -ne "strings.........."
if ! hash strings 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing binutils" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S binutils
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
#############################
echo -ne "fuser............"
if ! hash fuser 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing psmisc" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e pacman -S psmisc
else
echo -e "\e[1;32mOK!"$transparent""
fi
sleep 0.025
#############################
xterm $HOLD -title "Remove repositories" -e python remove.py