-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
292 lines (205 loc) · 10.4 KB
/
install.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
#!/bin/bash
# by Osaroprime
# GENERAL CONSULTING ABC 123 BY OSAROPRIME
#NATION BUILDER PRO ™
# MAGNETRON TECHNOLOGY ™ RESEARCH INSTALLATION SCRIPT.
# Function to install Homebrew if not installed
install_homebrew() {
echo "Homebrew is not installed. Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [ $? -ne 0 ]; then
echo "Homebrew installation failed!"
exit 1
fi
echo "Homebrew installed successfully!"
}
# Request sudo password once
if sudo -v; then
# Keep sudo alive for the duration of the script
while true; do sudo -n true; sleep 60; done 2>/dev/null &
else
echo "Sudo access is required. Exiting..."
exit 1
fi
# Adjust permissions on the configuration files (if necessary)
chmod +rwx ./resources/configuration_files/openssl.sh
./resources/configuration_files/openssl.sh
# Ensure Homebrew is installed
if ! command -v brew &> /dev/null; then
install_homebrew
else
echo "Homebrew is already installed."
fi
# Update Homebrew
echo "Updating Homebrew..."
brew update
# Path to the requirements.txt file in the same directory as this script
REQUIREMENTS_FILE="./requirements.txt"
# Check if requirements.txt exists
if [[ ! -f "$REQUIREMENTS_FILE" ]]; then
echo "Error: requirements.txt not found!"
exit 1
fi
# Loop through each line in requirements.txt
while IFS= read -r package; do
if [[ ! -z "$package" && ! "$package" =~ ^# ]]; then
# Echo message before installing/upgrading each package
echo "Installing or upgrading $package..."
# Check if the package is already installed
if ! brew list --formula | grep -q "^$package\$"; then
# If not installed, install the package
brew install "$package"
else
# If already installed, upgrade it to the latest version
brew upgrade "$package"
fi
fi
done < "$REQUIREMENTS_FILE"
echo "All specified packages installed or upgraded."
# Function to install Python dependencies
install_python_dependencies() {
echo "Installing Python dependencies..."
while IFS= read -r package; do
pip3 show "$package" &>/dev/null || pip3 install "$package"
done < "pip_requirements.txt"
}
install_python_dependencies
# START CONFIGURATION
# Adjust permissions on the configuration files (if necessary)
sudo chmod +rwx ./resources/configuration_files/tor_config.sh
sudo chmod +rwx ./resources/configuration_files/proxychains_config.sh
# Source the configuration files without sudo
sudo ./resources/configuration_files/tor_config.sh
sudo ./resources/configuration_files/proxychains_config.sh
#VERIFY CONFIGURATION FILE
tor -f /usr/local/etc/tor/torrc --verify-config
echo "Configuration of Nation Builder Pro ™ is complete!"
# Continue with the rest of the install.sh script
echo "Continuing Nation Builder Pro ™ Installation..."
sudo chmod +rwx ./resources/SatIntel/main.go
#Define CIDR path and IP path
nmap_share_path=./resources/countries/cidr
nmap_share_path2=./resources/countries/ip
# Print the constructed path (or use it as needed in your script)
echo "Target Directory: $nmap_share_path"
# Check if the directory exists
if [[ -d "$nmap_share_path" ]]; then
echo "Directory exists."
else
echo "Directory does not exist."
fi
# Create the target directory and subdirectories if they don't exist
echo "Creating target directories..."
sudo mkdir -p "$nmap_share_path/ipv4"
sudo mkdir -p "$nmap_share_path/ipv6"
sudo mkdir -p "$nmap_share_path2/ipv4"
sudo mkdir -p "$nmap_share_path2/ipv6"
# Define the base URL for the raw files in the GitHub repository
base_url="https://raw.githubusercontent.com/herrbischoff/country-ip-blocks/master"
echo "Installing libraries..."
# Download ipv4 files
echo "Downloading ipv4 files..."
ipv4_files=$(curl -s https://api.github.com/repos/herrbischoff/country-ip-blocks/contents/ipv4 | jq -r '.[].name' | grep '\.cidr')
for file in $ipv4_files; do
echo "Downloading ipv4 file: $file"
sudo curl -L -o "$nmap_share_path/ipv4/$file" "$base_url/ipv4/$file"
done
# Download ipv6 files
echo "Downloading ipv6 files..."
ipv6_files=$(curl -s https://api.github.com/repos/herrbischoff/country-ip-blocks/contents/ipv6 | jq -r '.[].name' | grep '\.cidr')
for file in $ipv6_files; do
echo "Downloading ipv6 file: $file"
sudo curl -L -o "$nmap_share_path/ipv6/$file" "$base_url/ipv6/$file"
done
# Optional: Rename .cidr files to .txt
echo "Renaming files in $nmap_share_path/ipv4 from .cidr to .txt..."
for file in "$nmap_share_path/ipv4"/*.cidr; do
sudo mv "$file" "${file%.cidr}.txt"
done
echo "Renaming files in $nmap_share_path/ipv6 from .cidr to .txt..."
for file in "$nmap_share_path/ipv6"/*.cidr; do
sudo mv "$file" "${file%.cidr}.txt"
done
echo "Download and renaming CIDR complete."
echo "Installation complete."
echo "Download & setup of Nation Builder Pro ™ is complete!"
# ASCII Banner with Bold Red Color
cat << "EOF"
.do-"""""'-o..
.o"" ""..
,,'' ``b.
d' ``b
d`d: `b.
,,dP `Y.
d`88 `8.
ooooooooooooooooood888`88' `88888888888bo,
d""" `""""""""""""Y:d8P 8, `b
8 P,88b ,`8 8
8 ::d888, ,8:8. 8
: dY88888 `' :: 8
: 8:8888 `b 8
: Pd88P',... ,d888o.8 8
: :88'dd888888o. d8888`88: 8
: ,:Y:d8888888888b ,d88888:88: 8
: :::b88d888888888b. ,d888888bY8b 8
b:P8;888888888888. ,88888888888P 8
8:b88888888888888: 888888888888' 8
8:8.8888888888888: Y8888888888P 8
, YP88d8888888888P' ""888888"Y 8
: :bY8888P"""""'' : 8
: 8'8888' d 8
: :bY888, ,P 8
: Y,8888 d. ,- ,8' 8
: `8)888: ' ,P' 8
: `88888. ,... ,P 8
: `Y8888, ,888888o ,P 8
: Y888b ,88888888 ,P' 8
: `888b ,888888888 ,,' 8
: `Y88b dPY888888OP :' 8
: :88.,'. `' `8P-"b. 8
:. )8P, ,b ' - ``b 8
:: :': d,'d`b, . - ,db 8
:: `b. dP' d8': d88' 8
:: '8P" d8P' 8 - d88P' 8
:: d,' ,d8' '' dd88' 8
:: d' 8P' d' dd88'8 8
: ,: `' d:ddO8P' `b. 8
: ,dooood88: , ,d8888"" ```b. 8
: .o8"'""""""Y8.b 8 `"'' .o' `"""ob. 8
: dP' `8: K dP'' "`Yo. 8
: dP 88 8b. ,d' ``b 8
: 8. 8P 8""' `" :. 8
: :8: :8' ,: :: 8
: :8: d: d' :: 8
: :8: dP ,,' :: 8
: `8: :b dP ,, :: 8
: ,8b :8 dP ,, d 8
: :8P :8dP d' d 8 8
: :8: d8P d' d88 :P 8
: d8' ,88' ,P ,d888 d' 8
: 88 dP' ,P d8888b 8 8
' ,8: ,dP' 8. d8''88' :8 8
:8 d8P' d88b d"' 88 :8 8
d: ,d8P' ,8P""". 88 :P 8
8 ,88P' d' 88 :: 8
,8 d8P 8 88 :: 8
d: 8P ,: -hrr- :88 :: 8
8',8:,d d' :8: :: 8
,8,8P'8' ,8 :8' :: 8
:8`' d' d' :8 :: 8
`8 ,P :8 :8: :: 8
8, ` d8. :8: 8: 8
:8 d88: d8: 8 8
, `8, d8888 88b 8 8
: 88 ,d::888 888 Y: 8
: YK,oo8P :888 888. `b 8
: `8888P :888: ,888: Y, 8
: ``'" `888b :888: `b 8
: 8888 888: :: 8
: 8888: 888b Y. 8,
: 8888b :888 `b 8:
: 88888. `888, Y 8:
``ob...............--"""""'----------------------`""""""""'"""`'"""""
EOF
echo -e "\033[1;31mInstallation of "Nation Builder Pro v 1.0™" was successful! 👽 Enjoy!\033[0m"
cmatrix -bs