-
Notifications
You must be signed in to change notification settings - Fork 56
/
installation.sh
executable file
·284 lines (257 loc) · 8.52 KB
/
installation.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
#!/usr/bin/env bash
VERSION="$(curl -s https://golang.org/dl/ | grep 'toggleVisible' | cut -d '<' -f2- | cut -d '>' -f1 | awk '{print $3}' | cut -d '=' -f2- | tr -d '"' | head -n 1 | cut -d 'o' -f2-)"
ARCH="amd64"
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
bannerInstall() {
tool=$1
echo -e "\n\033[1;32m====== Installing $tool ======\033[m"
}
os() {
echo -e "What is your operating system?"
echo -e "Type\n\033[1;32m1\033[m for Arch or BlackArch\n\033[1;32m2\033[m for Kali\n\033[1;32m3\033[m for Ubuntu or another Debian based\n\033[1;32m4\033[m for Parrot"
echo -e -n "> "
read os
if [ "$os" == "1" ]; then
os="arch"
elif [ "$os" == "2" ]; then
os="kali"
elif [ "$os" == "3" ]; then
os="debian"
elif [ "$os" == "4" ]; then
os="parrot"
else
echo "Error."
exit
fi
}
update() {
echo -e "\033[1;32m====== Updating your system ======\033[m"
if [ "$os" == "arch" ]; then
sudo pacman -Syyuu
else
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get autoremove -y
sudo apt clean
fi
}
installGo() {
if command -v go version >/dev/null ; then
echo -e "\033[1;32m[+] Go is already installed!\033[m"
else
bannerInstall Go
if [ "$os" == "arch" ]; then
sudo pacman -S go
elif [ "$os" == "kali" ]; then
sudo apt install golang -y
else
sudo apt install golang-go -y
fi
fi
if ! command -v go version >/dev/null;then
wget "https://golang.org/dl/go${VERSION}.linux-{$ARCH}.tar.gz" -o $SCRIPTPATH/go${VERSION}.linux-${ARCH}.tar.gz
tar -C $HOME -xf "go${VERSION}.linux-${ARCH}.tar.gz"
rm -f $SCRIPTPATH/go${VERSION}.linux-${ARCH}.tar.gz
fi
if command -v go version >/dev/null;then
echo -e "\033[1;32m[+] Go installed!\033[m"
else
echo -e "\033[1;31m[-] An error occurred when trying to install Golang :(\033[m"
exit
fi
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
}
installGoTools() {
bannerInstall "Go tools"
bannerInstall "Assetfinder"
go install github.com/tomnomnom/assetfinder@latest
bannerInstall "Subfinder"
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
bannerInstall "Httprobe"
go install github.com/tomnomnom/httprobe@latest
bannerInstall "Httpx"
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
bannerInstall "Nuclei"
go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest
nuclei -update-templates
bannerInstall "Hakrawler"
go install github.com/hakluke/hakrawler@latest
bannerInstall "Waybackurls"
go install github.com/tomnomnom/waybackurls@latest
bannerInstall "Ffuf"
go install github.com/ffuf/ffuf@latest
bannerInstall "Dalfox"
go install github.com/hahwul/dalfox/v2@latest
bannerInstall "Anti-burl"
go install github.com/tomnomnom/hacks/anti-burl@latest
bannerInstall "Anew"
go install -v github.com/tomnomnom/anew@latest
bannerInstall "Qsreplace"
go install github.com/tomnomnom/qsreplace@latest
bannerInstall "Gf"
go install github.com/tomnomnom/gf@latest
bannerInstall "Gospider"
go install github.com/jaeles-project/gospider@latest
bannerInstall "Subjack"
go install github.com/haccer/subjack@latest
bannerInstall "Dnsx"
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
bannerInstall "Gxss"
go install github.com/KathanP19/Gxss@latest
bannerInstall "Metabigor"
go install github.com/j3ssie/metabigor@latest
bannerInstall "Cf-check"
$ go install github.com/dwisiswant0/cf-check@latest
bannerInstall "Naabu"
if [ "$os" == "kali" ] || [ "$os" == "debian" ] || [ "$os" == "parrot" ]; then
sudo apt install -y libpcap-dev
fi
go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest
bannerInstall "Filter-Resolved"
go install github.com/tomnomnom/hacks/filter-resolved@latest
if [ -e /usr/local/go/bin ]; then
sudo mv $HOME/go/bin/* /usr/local/go/bin
else
sudo mv $HOME/go/bin/* /usr/local/bin
fi
}
installGit() {
if command -v git >/dev/null ; then
echo -e "\033[1;32m[+] Git is already installed!\033[m"
else
bannerInstall "Git"
if [ "$os" == "arch" ]; then
sudo pacman -S git
else
sudo apt install git -y
fi
if ! command -v git >/dev/null ; then
echo -e "\033[1;31m[-] An error occurred when trying to install Git :(\033[m"
exit
else
echo -e "\033[1;32m[+] Git installed!\033[m"
fi
fi
}
installGitCloneTools() {
[[ ! -d $SCRIPTPATH/tools ]] && mkdir $SCRIPTPATH/tools 2>/dev/null
cd $SCRIPTPATH/tools
bannerInstall "EyeWitness"
git clone https://github.com/FortyNorthSecurity/EyeWitness.git
pip3 install python-Levenshtein
bannerInstall "FavFreak"
git clone https://github.com/devanshbatham/FavFreak.git
pip3 install -r $SCRIPTPATH/tools/FavFreak/requirements.txt
bannerInstall "GitHub Search"
git clone https://github.com/gwen001/github-search.git
pip3 install -r $SCRIPTPATH/tools/github-search/requirements2.txt
bannerInstall "ParamSpider"
git clone https://github.com/devanshbatham/ParamSpider.git
pip3 install -r $SCRIPTPATH/tools/ParamSpider/requirements.txt
bannerInstall "XSStrike"
git clone https://github.com/s0md3v/XSStrike.git
pip3 install -r $SCRIPTPATH/tools/XSStrike/requirements.txt
bannerInstall "SubDomainizer"
if [ "$os" == "arch" ]; then
sudo pacman -S wget --needed
fi
wget https://raw.githubusercontent.com/nsonaniya2010/SubDomainizer/master/SubDomainizer.py
wget https://raw.githubusercontent.com/nsonaniya2010/SubDomainizer/master/requirements.txt
pip3 install -r $SCRIPTPATH/tools/requirements.txt
rm $SCRIPTPATH/tools/requirements.txt 2>/dev/null
cd $SCRIPTPATH
}
installPip() {
if command -v pip3 >/dev/null ; then
echo -e "\033[1;32m[+] Pip is already installed!\033[m"
else
bannerInstall "Pip"
if [ "$os" == "arch" ]; then
sudo pacman -S python-pip
else
sudo apt install python3-pip -y
fi
if command -v pip3 >/dev/null ; then
echo -e "\033[1;32m[+] Pip installed!\033[m"
else
echo -e "\033[1;31m[-] An error occurred when trying to install Pip :(\033[m"
exit
fi
fi
}
installFindomain() {
bannerInstall "Findomain"
wget https://github.com/findomain/findomain/releases/latest/download/findomain-linux
chmod +x $SCRIPTPATH/findomain-linux
sudo mv $SCRIPTPATH/findomain-linux /usr/local/bin/findomain
}
installKnockpy() {
bannerInstall "Knockpy"
git clone https://github.com/guelfoweb/knock.git
cd $SCRIPTPATH/knock
sudo python3 setup.py install
sudo rm -rf $SCRIPTPATH/knock
[[ -d $SCRIPTPATH/knockpy.egg-info ]] && sudo rm -rf $SCRIPTPATH/knockpy.egg-info
cd $SCRIPTPATH
}
installTools() {
echo -e "\033[1;32m=== Installing tools ===\033[m"
if [ "$os" == "arch" ]; then
echo -e -n "Is your operating system BlackArch? If not, I will add his repositories to facilitate the installation[Y/n]"
read res
if [ "$res" == "" ]; then
resp="Y"
else
if [ "$res" == "n" ]; then
bannerInstall "BlackArch repositories"
curl -O https://blackarch.org/strap.sh -o $SCRIPTPATH/strap.sh
echo 95b485d400f5f289f7613fe576f4a3996aabed62 strap.sh | sha1sum -c
chmod +x $SCRIPTPATH/strap.sh
sudo $SCRIPTPATH/strap.sh
sudo pacman -Syu
rm -f $SCRIPTPAATH/strap.sh
fi
fi
sudo pacman -S --needed python3 python-pip go amass sublist3r findomain dnsenum masscan nmap wafw00f dnsrecon assetfinder subfinder httprobe httpx nuclei hakrawler waybackurls dalfox metabigor dnsx ffuf subjack gospider python-shodan figlet lolcat
installKnockpy
elif [ "$os" == "kali" ]; then
sudo apt install sublist3r figlet lolcat -y
installFindomain
installKnockpy
else
installFindomain
sudo apt install masscan nmap wafw00f dnsrecon figlet lolcat -y
if [ "$os" == "debian" ]; then
sudo apt install snap -y
snap install amass
else
sudo apt install amass -y
fi
sudo apt install python3-shodan -y
installKnockpy
bannerInstall "Sublist3r"
git clone https://github.com/aboul3la/Sublist3r.git
cd $SCRIPTPATH/Sublist3r
sudo python3 setup.py install
sudo rm -rf $SCRIPTPATH/Sublist3r
fi
}
installWordlists() {
bannerInstall "Wordlists"
[[ ! -d $SCRIPTPATH/wordlists ]] && mkdir $SCRIPTPATH/wordlists
wget https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt -O $SCRIPTPATH/wordlists/all.txt
wget https://raw.githubusercontent.com/v0re/dirb/master/wordlists/common.txt -O $SCRIPTPATH/wordlists/common.txt
wget https://raw.githubusercontent.com/v0re/dirb/master/wordlists/big.txt -O $SCRIPTPATH/wordlists/big.txt
wget https://raw.githubusercontent.com/v0re/dirb/master/wordlists/small.txt -O $SCRIPTPATH/wordlists/small.txt
}
os
update
installPip
installGit
installGo
installGoTools
installGitCloneTools
installTools
installWordlists
echo -e "\033[1;32m[+] Done\033[m"