-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·220 lines (195 loc) · 4.59 KB
/
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
#!/bin/bash
clear
# color code
L=$(tput bold)
R=$(tput setaf 1)
G=$(tput setaf 2)
B=$(tput setaf 33)
N=$(tput sgr0)
######################## functions #########################
# function for branding
function call {
echo -ne "${L}${B}
-------------------------------------
| Arch2hack by Talha |
| |
| visit: github.com/talha1896 |
-------------------------------------
${N}"
}
# functions for color codes
# for red
function red {
echo "${L}${R}$1${N}"
}
# for blue
function blue {
echo "${L}${B}$1${N}"
}
# for green
function green {
echo "${L}${G}$1${N}"
}
#########################################################################
call
# check is distribution is arch based
file="/etc/os-release"
if grep -q "Arch\|Garuda\|Manjaro\|Endeavours" $file ; then
blue "[+] Arch Linux found"
else
red "you are not using Arch Linux.This script is only for arch based distributions"
exit 1
fi
# check for internet connection
ping -c 1 google.com &>/dev/null
if [ $? -eq 0 ];then
green "[+] Internet connected"
sleep 2s
clear
call
else
red "[-] Internet not connected"
exit 1
fi
# branding
blue "Arch to hack script by talha"
echo -e "This script is going to convert Arch linux into ${R}hacking os"
echo "[+] Starting process ......"
sleep 3s
################### magic start from here #######################
# update Arch repo
blue "[+] Updating Arch repo"
sudo pacman -Sy
# dependencies for black arch repo
green "[+] checking dependices"
sleep 2s
# check curl
if which curl &>/dev/null; then
blue "[+] curl found"
else
red "[-] curl not found"
green "[+] Installing"
sudo pacman -S curl --noconfirm
green "[+] Installed succesfully{N}"
fi
clear
call
# options
blue "[+] Started process 2/3 ...."
sleep 1s
green "what do you want to install?"
blue "[+] [1] Desktop + basic apps + hacking tools"
echo "It will install lxde desktop and hacking tools.Recommended for arch minimal installation"
green "[+] [2] Desktop + basic apps only"
red "[+] [3] hacking tools only"
read -p "Enter your choice 1/2/3:" choice
case $choice in
1)
echo "Choice is 1"
chmod +x hack_install
./hack_install
sleep 2s
clear
call
# install drivers
echo "[+] Installing Drivers"
sleep 2s
drivers_file="drivers.txt"
while read -r drivers
do
sudo pacman -S $drivers --noconfirm
echo "$drivers Installed"
done < $drivers_file
echo "[+] Installing Drivers completed"
sleep 2s
clear
# install desktop
echo "[+] Installing Desktop apps"
sleep 2s
pkgs_file="desktop_packages.txt"
while read -r pkgs
do
sudo pacman -S $pkgs --noconfirm
echo "$pkgs Installed"
done < $pkgs_file
# Enable services
sudo systemctl enable lxdm
sudo systemctl enable NetworkManager.service
echo "[+] Installing Desktop completed"
sleep 2s
clear
call
# install hacking tools
tools_file="hacking_tools"
while read -r tools
do
sudo pacman -S $tools --noconfirm
echo "$tools Installed"
done < $tools_file
# config apache2 webserver
echo "configuring apache2 webserver"
sudo sed -i '132c\LoadModule unique_id_module modules/mod_unique_id.so' /etc/httpd/conf/httpd.conf &>/dev/null
# start options for choice one
chmod +x options
./options
echo "All Done"
sleep 3s
;;
2)
echo "Choice is 2"
sleep 2s
clear
call
# install drivers
echo "[+] Installing Drivers"
sleep 2s
drivers_file="drivers.txt"
while read -r drivers
do
sudo pacman -S $drivers --noconfirm
echo "$drivers Installed"
done < $drivers_file
echo "[+] Installing Drivers completed"
sleep 2s
clear
call
# install desktop
echo "[+] Installing Desktop apps"
sleep 2s
pkgs_file="desktop_packages.txt"
while read -r pkgs
do
sudo pacman -S $pkgs --noconfirm
echo "$pkgs Installed"
done < $pkgs_file
# Enable services
sudo systemctl enable lxdm
sudo systemctl enable NetworkManager.service
# start options for choice one
chmod +x options
./options
echo "[+] Installing Desktop completed"
sleep 2s
clear
call
;;
3)
echo "you chosed option 3"
sleep
chmod +x hack_install
./hack_install
# install hacking tools
tools_file="hacking_tools"
while read -r tools
do
sudo pacman -S $tools --noconfirm
echo "$tools Installed"
done < $tools_file
# config apache2 webserver
echo "configuring apache2 webserver"
sudo sed -i '132c\LoadModule unique_id_module modules/mod_unique_id.so' /etc/httpd/conf/httpd.conf &>/dev/null
sleep 3s
;;
esac
echo "All Done"
echo "Thanks for using this script.you can reboot your pc"