This repository has been archived by the owner on Oct 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astra.sh
220 lines (156 loc) · 6.68 KB
/
astra.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
#!/bin/bash
# Function to install required packages if missing
install_required_packages() {
local required_packages=("wget" "unzip" "figlet")
local missing_packages=()
for package in "${required_packages[@]}"; do
if ! command -v "$package" &>/dev/null; then
missing_packages+=("$package")
fi
done
if [ ${#missing_packages[@]} -gt 0 ]; then
echo "Installing required packages: ${missing_packages[*]}"
if command -v apt-get &>/dev/null; then
sudo apt-get update
sudo apt-get install -qq -y "${missing_packages[@]}" >/dev/null
elif command -v yum &>/dev/null; then
sudo yum install -y "${missing_packages[@]}"
else
echo "Error: Package manager not found. Please install '${missing_packages[*]}' manually and run the script again."
exit 1
fi
fi
}
install_naabu(){
echo "-------------------------------------------------------"
echo "Installing naabu..."
# Step 4: Download the naabu release
naabu_version="2.1.6"
naabu_download_url="https://github.com/projectdiscovery/naabu/releases/download/v${naabu_version}/naabu_${naabu_version}_linux_amd64.zip"
# Download naabu zip file with progress bar
echo "Downloading naabu..."
wget --quiet "$naabu_download_url" -O "naabu_${naabu_version}_linux_amd64.zip" 2>&1
# Step 5: Unzip the downloaded file with progress bar
echo "Extracting naabu..."
unzip "naabu_${naabu_version}_linux_amd64.zip"
# Step 6: Move the binary file to "/usr/local/bin" using sudo
echo "Moving naabu binary to /usr/local/bin..."
sudo mv naabu /usr/local/bin/
# Step 7: Run the binary and check the version
echo "Checking naabu version..."
naabu --version
# Clean up: Remove the downloaded zip file
rm "naabu_${naabu_version}_linux_amd64.zip"
echo "naabu has been installed and is ready for use."
rm -rf *
echo "-------------------------------------------------------"
}
install_nuclei() {
echo "-------------------------------------------------------"
echo "Installing nuclei..."
local nuclei_version="2.9.10"
local nuclei_download_url="https://github.com/projectdiscovery/nuclei/releases/download/v${nuclei_version}/nuclei_${nuclei_version}_linux_amd64.zip"
echo "Downloading nuclei..."
wget --quiet "$nuclei_download_url" -O "nuclei_${nuclei_version}_linux_amd64.zip" 2>&1
echo "Extracting nuclei..."
unzip "nuclei_${nuclei_version}_linux_amd64.zip"
echo "Moving nuclei binary to /usr/local/bin..."
sudo mv nuclei /usr/local/bin/
echo "Checking nuclei version..."
nuclei --version
rm "nuclei_${nuclei_version}_linux_amd64.zip"
echo "nuclei has been installed and is ready for use."
rm -rf *
echo "-------------------------------------------------------"
}
install_httpx() {
echo "-------------------------------------------------------"
echo "Installing httpx..."
local httpx_version="1.3.4"
local httpx_download_url="https://github.com/projectdiscovery/httpx/releases/download/v${httpx_version}/httpx_${httpx_version}_linux_amd64.zip"
echo "Downloading httpx..."
wget --quiet "$httpx_download_url" -O "httpx_${httpx_version}_linux_amd64.zip" 2>&1
echo "Extracting httpx..."
unzip "httpx_${httpx_version}_linux_amd64.zip"
echo "Moving httpx binary to /usr/local/bin..."
sudo mv httpx /usr/local/bin/
echo "Checking httpx version..."
httpx version
rm "httpx_${httpx_version}_linux_amd64.zip"
echo "httpx has been installed and is ready for use."
rm -rf *
echo "-------------------------------------------------------"
}
install_subfinder() {
echo "-------------------------------------------------------"
echo "Installing subfinder..."
local subfinder_version="2.6.1"
local subfinder_download_url="https://github.com/projectdiscovery/subfinder/releases/download/v${subfinder_version}/subfinder_${subfinder_version}_linux_amd64.zip"
echo "Downloading subfinder..."
wget --quiet "$subfinder_download_url" -O "subfinder_${subfinder_version}_linux_amd64.zip" 2>&1
echo "Extracting subfinder..."
unzip "subfinder_${subfinder_version}_linux_amd64.zip"
echo "Moving subfinder binary to /usr/local/bin..."
sudo mv subfinder /usr/local/bin/
echo "Checking subfinder version..."
subfinder version
rm "subfinder_${subfinder_version}_linux_amd64.zip"
echo "subfinder has been installed and is ready for use."
rm -rf *
echo "-------------------------------------------------------"
}
install_katana() {
echo "-------------------------------------------------------"
echo "Installing katana..."
local katana_version="1.0.2"
local katana_download_url="https://github.com/projectdiscovery/katana/releases/download/v${katana_version}/katana_${katana_version}_linux_amd64.zip"
echo "Downloading katana..."
wget --quiet "$katana_download_url" -O "katana_${katana_version}_linux_amd64.zip" 2>&1
echo "Extracting katana..."
unzip "katana_${katana_version}_linux_amd64.zip"
echo "Moving katana binary to /usr/local/bin..."
sudo mv katana /usr/local/bin/
echo "Checking katana version..."
katana version
rm "katana_${katana_version}_linux_amd64.zip"
echo "katana has been installed and is ready for use."
rm -rf *
echo "-------------------------------------------------------"
}
install_uncover() {
echo "-------------------------------------------------------"
echo "Installing uncover..."
local uncover_version="1.0.5"
local uncover_download_url="https://github.com/projectdiscovery/uncover/releases/download/v${uncover_version}/uncover_${uncover_version}_linux_amd64.zip"
echo "Downloading uncover..."
wget --quiet "$uncover_download_url" -O "uncover_${uncover_version}_linux_amd64.zip" 2>&1
echo "Extracting uncover..."
unzip "uncover_${uncover_version}_linux_amd64.zip"
echo "Moving uncover binary to /usr/local/bin..."
sudo mv uncover /usr/local/bin/
echo "Checking uncover version..."
uncover version
rm "uncover_${uncover_version}_linux_amd64.zip"
echo "uncover has been installed and is ready for use."
rm -rf *
echo "-------------------------------------------------------"
}
# Step 1: Install required packages
install_required_packages
figlet -f slant "ASTRA"
# Step 2: Create a directory named 'all_tools'
mkdir -p all_tools
# Step 3: Change directory to 'all_tools'
cd all_tools || exit
# installing naabu
install_naabu
# installing nuclei
install_nuclei
# installing Subfinder
install_subfinder
# installing katana
install_katana
# installing httpx
install_httpx
# installing uncover
install_uncover