-
Notifications
You must be signed in to change notification settings - Fork 8
/
install-nethunter.sh
executable file
·599 lines (523 loc) · 22.4 KB
/
install-nethunter.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
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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
#!/data/data/com.termux/files/usr/bin/bash
# Install Kali NetHunter (official version) on proot-distro.
# The proot-distro-nethunter is a powerful Bash script designed to effortlessly integrate Kali NetHunter into proot-distro.
# This enables users to deploy multiple NetHunter instances with customized toolsets, akin to managing multiple containers in Docker.
# Whether you're a cybersecurity professional or an enthusiast, this installer streamlines the setup process, saving time and effort.
## Features
# 1. Automated Integration : Seamlessly integrates Kali NetHunter into proot-distro, eliminating manual configurations.
# 2. Customization : Install multiple NetHunters with tailored toolsets, optimized for various tasks.
# 3. Enhanced UX : Automatically sets up VNC server for XFCE desktop, enhancing graphical user experience.
# 4. Efficiency : Swift installation process reduces manual intervention, making deployment hassle-free.
# Author: Sagar Biswas
# GitHub Repository: https://github.com/sagar040/proot-distro-nethunter
# License : https://github.com/raw/sagar040/proot-distro-nethunter/main/LICENSE
# proot-distro-nethunter Copyright (C) 2024 Sagar Biswas
SCRIPT_VERSION="1.7"
current_datetime=$(date +"%d.%m.%Y-%H:%M")
device_avilable_storage=$(df -h | grep '/storage/emulated' | awk '{print $4}' | tr -d '[:alpha:]')
device_total_ram=$(free -b | awk 'NR==2 {print $2}')
device_total_ram_gb=$(echo "scale=2; $device_total_ram / (1024 * 1024 * 1024)" | bc)
print_error() {
local error_val=$1
echo -e "\033[31;1mError:\033[0m $error_val\n"
}
print_task_V1_7() {
local task=$1
local arrows="\033[38;5;11;1m>\033[38;5;226;1m>\033[38;5;227;1m>\033[38;5;228;1m>\033[38;5;229;1m>\033[38;5;230;1m>\033[38;5;231;1m>\033[0m"
echo -e "$arrows \033[38;5;39m$task\033[0m $arrows"
}
print_done () {
local msg=$1
echo -e "[\033[32;1m\u2714\ufe0e\033[0m] $msg\n"
}
###################################################################
# NEW BANNER ANIMATION #
###################################################################
clear_console() {
printf "\033c"
}
banner_lines=(
""
" ............ "
" ....::::. "
" .......... ..:--- "
" ..:::::.....= ' . "
" .::::. +%**++=-:... "
" .. =#-. .:=+*+-. "
" =# .++: "
" == .:-. "
" :+: "
" :+=: "
" .:+:-+-====-::. "
" .:--::: "
" .=. :. "
" : . "
" : "
)
animate_banner() {
normal_color='\e[38;5;255;1m'
bright_blue='\e[38;5;33;1m'
bright_white='\e[38;5;231;1m'
reset='\e[0m'
clear
tput civis
for line in "${banner_lines[@]}"; do
echo -e "${normal_color}${line}${reset}"
done
sleep 1.5
for ((i=${#banner_lines[@]}-1; i>=0; i--)); do
clear
for ((j=0; j<${#banner_lines[@]}; j++)); do
if [ $i -eq $j ]; then
if [ $i -eq 0 ]; then
echo -e "${bright_white}${banner_lines[$j]}${reset}"
else
echo -e "${bright_blue}${banner_lines[$j]}${reset}"
fi
else
echo -e "${normal_color}${banner_lines[$j]}${reset}"
fi
done
sleep 0.1
done
}
# Banner for version 1.7
print_banner_with_color() {
echo -e "CiAgICAgIBtbMzg7NTsxNjZtLi4uG1szODs1OzIwOG0uLi4uLhtbMzg7NTsyMDltLi4uLiAgICAg
ICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgG1szODs1OzIwOG0uLhtbMzg7NTsy
MTBtLi46OjobWzM4OzU7MjE3bTouICAgICAgICAgICAgICAgICAgICAgCiAgG1szODs1OzE2Nm0u
Li4uLhtbMzg7NTsyMDhtLi4uLi4gICAgIBtbMzg7NTsyMTBtLi46G1szODs1OzIxN20tLS0gICAg
ICAgICAgICAgICAgICAgICAKICAgICAgICAgICAbWzM4OzU7MjA4bS4uOjobWzM4OzU7MjA5bTo6
Oi4uLhtbMzg7NTsyMTBtLi49ICAgICAgIBtbMzg7NTswMzNtJyAuICAgICAgICAgIAogICAgICAb
WzM4OzU7MTY2bS46Ojo6LiAgICAgICAgICAgG1szODs1OzE5N20rJSoqKys9LTouLi4gICAgICAg
ICAKICAgIBtbMzg7NTsxNjZtLi4gICAgICAgICAgICAgICAbWzM4OzU7MjAzbT0jG1szODs1OzE2
Mm0tLiAgICAuOj0rKistG1szODs1OzAzM20uICAgICAgIAogICAgICAgICAgICAgICAgICAgIBtb
Mzg7NTsxNjJtPSMgICAgICAgICAgICAuKys6ICAgICAgCiAgICAgICAgICAgICAgICAgICAgPRtb
Mzg7NTsxNjNtPSAgICAgICAgICAgICAgG1szODs1OzA5MW0uG1szODs1OzA5Mm06LRtbMzg7NTsw
MzNtLiAgICAKICAgICAgICAgICAgICAgICAgICAbWzM4OzU7MTYzbTorOiAgICAgICAgICAgICAg
ICAgICAgIAogICAgICAgICAgICAgICAgICAgICA6G1szODs1OzEyN20rPTogICAgICAgICAgICAg
ICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgLjorG1szODs1OzA5MW06LSstG1szODs1OzA5
Mm09PT09LRtbMzg7NTswNjJtOjouICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAuOi0tOhtbMzg7NTswMzNtOjogICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIC49LiA6LiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAg
LiAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogICAKICAgIAo=" | base64 -d
sa1=$(printf '%*s' 15 '')
sa2=$(printf '%*s' 5 '')
echo -e "$sa1\e[38;5;231;1mPRoo\e[38;5;253;1mt D\e[38;5;251;1mis\e[38;5;248;1mtro \e[38;5;196;1mNet\e[38;5;160;1mhun\e[38;5;124;1mter\e[0m\n"
}
info() {
echo -e "\e[38;5;250mInstall Kali Nethunter (official version) on proot-distro. you can create multiple Nethunters from the same image with custom tools.\033[0m\n"
echo -e "\e[38;5;155;1mVersion: $SCRIPT_VERSION\033[0m"
echo -e "\e[38;5;45mKali Rolling release :\033[0m 2024.1"
echo -e "\e[38;5;45mGithub Repo:\033[0m \e[38;5;253mhttps://github.com/sagar040/proot-distro-nethunter\033[0m"
echo ""
echo -e "\e[38;5;45mUsage:\033[0m $0 --install"
echo -e ""
}
# Run the animations
animate_banner
clear_console
print_banner_with_color
tput cnorm
###################################################################
# MAIN PROGRAMS #
###################################################################
# List of valid IDs
valid_ids=(
"KBDEXKMT10"
"KBDEXKMTD"
"KBDEXKMTL"
"KBDEXKMTE"
"KBCTDEX"
"KBCIGDEX"
"KBCWGDEX"
"KBCCSGDEX"
"KBCPGDEX"
"KBCFOGDEX"
"KBCFUGDEX"
"KBCREGDEX"
"KBCSSGDEX"
"KBCEGDEX"
)
get_build_ID() {
# Prompt user for ID
printf "[\033[32;1m*\033[0m] Get build ID from here : \033[38;5;252mhttps://github.com/sagar040/proot-distro-nethunter/blob/main/README.md#list-of-kali-nethunter-builds"
echo -e "\033[0m\n"
printf "[\033[34;1m?\033[0m] Enter the build ID : \033[38;5;222m"; read BUILD_ID
printf "\033[0m"
# Check if the entered ID is valid
valid=false
for id in "${valid_ids[@]}"; do
if [ "$BUILD_ID" = "$id" ]; then
valid=true
break
fi
done
# verify ID
if $valid; then
print_done "Build ID is verified"
else
print_error "Invalid build ID"
exit 1
fi
nh_rootfs="$PREFIX/var/lib/proot-distro/installed-rootfs/BackTrack-$BUILD_ID"
}
# Check if already installed-rootfs
is_distro_already_installed() {
print_task_V1_7 "Finding installed nethunter"
local DISTRO_PREFIX="BackTrack-"
local distro=$DISTRO_PREFIX$1
proot-distro login $distro -- whoami > /dev/null 2>&1
not_installed=$?
}
get_device_status() {
print_task_V1_7 "Fetching device info"
# Define color codes
local RED='\033[1;31m'
local YELLOW='\033[1;33m'
local GREEN='\033[1;32m'
local NC='\033[0m' # No Color
echo -e "Device RAM: $device_total_ram_gb GB"
echo -e "Device Storage: $device_avilable_storage GB"
echo -e ""
if [[ $(echo "$device_total_ram_gb < 3" | bc -l) = 1 ]]; then
echo -e "[${RED}!${NC}] ${YELLOW}WARNING:${NC} Device RAM is very low. Nethunter may not run smoothly on this device. It is recommended not to run heavy software inside Nethunter.\n"
fi
if [[ $(echo "$device_avilable_storage < 8" | bc -l) = 1 ]]; then
echo -e "[${RED}!${NC}] ${YELLOW}WARNING:${NC} Device storage is very low. Please free up storage before installing Nethunter.\n"
fi
}
# Check Device
get_device_architecture() {
print_task_V1_7 "Checking device architecture"
supported_arch=("arm64-v8a" "armeabi" "armeabi-v7a")
device_arch=$(getprop ro.product.cpu.abi)
if [[ " ${supported_arch[@]} " =~ " $device_arch " ]]; then
case $device_arch in
"arm64-v8a")
SYS_ARCH="arm64"
;;
"armeabi" | "armeabi-v7a")
SYS_ARCH="armhf"
;;
esac
print_done "Device architecture: $SYS_ARCH"
else
print_error "Unsupported Architecture"
exit 1
fi
}
# Update termux
upgrade_termux() {
print_task_V1_7 "Updating termux"
printf "[\033[34;1m?\033[0m] Did you already have changed the termux repo ? (y/n) : \033[38;5;222m"; read ch_repo
printf "\033[0m"
case $ch_repo in
y)
# Do nothing
;;
n)
print_task_V1_7 "Changing termux repo"
sleep 2
termux-change-repo
;;
*)
print_error "Faild to change termux repo: Invalid choise: type y or n"
exit 1
;;
esac
print_task_V1_7 "Installing required packages"
apt update && apt full-upgrade -y
apt install -y proot-distro curl
}
# Retrieve SHA256 checksum for the selected Nethunter image
get_sha256_checksum() {
print_task_V1_7 "Retrieving SHA256 checksum"
base_url="https://kali.download/nethunter-images/current/rootfs"
sha256_url="$base_url/SHA256SUMS"
rootfs="kalifs-$SYS_ARCH-minimal.tar.xz"
SHA256=$(curl -s "$sha256_url" | grep "$rootfs" | awk '{print $1}')
if [[ -z "$SHA256" ]]; then
print_error "Failed to retrieve SHA256 checksum. Exiting."
exit 1
fi
print_done "SHA256SUM: $SHA256"
}
# Generate and save the proot-distro configuration file
generate_config_file() {
print_task_V1_7 "Generating config file"
distro_file="# Kali nethunter $SYS_ARCH
DISTRO_NAME=\"kali Nethunter $BUILD_ID ($SYS_ARCH)\"
DISTRO_COMMENT=\"Kali nethunter $SYS_ARCH (ID: $BUILD_ID)\"
TARBALL_URL['aarch64']=\"$base_url/$rootfs\"
TARBALL_SHA256['aarch64']=\"$SHA256\""
printf "$distro_file" > "$PREFIX/etc/proot-distro/BackTrack-$BUILD_ID.sh"
if [ $? -eq 0 ]; then
print_done "Successfully generated config file"
fi
}
# Install nethunter
install_nethunter() {
get_device_architecture
upgrade_termux
get_sha256_checksum
generate_config_file
proot-distro install BackTrack-$BUILD_ID
}
# Login Shortcut
login_shortcut() {
print_task_V1_7 "Creating login shortcut"
cp ./login $PREFIX/bin/nethunter
chmod +x $PREFIX/bin/nethunter
if [ $? -eq 0 ]; then
print_done "Shortcut created as 'nethunter'"
fi
}
# Setup Nethunter
setup_nethunter(){
print_task_V1_7 "Setting up nethunter"
# hide Kali developers message
touch $nh_rootfs/root/.hushlogin
touch $nh_rootfs/home/kali/.hushlogin
# Fixed apt upgrade stuck by 'mv /usr/sbin/telinit /usr/sbin/telinit.bak2 && ln -s /usr/bin/true /usr/sbin/telinit' before upgrade the nethunter
# discussions by tj64 : https://github.com/microsoft/WSL/discussions/11097#discussioncomment-8356353
proot-distro login BackTrack-$BUILD_ID -- bash -c 'apt update
mv /usr/sbin/telinit /usr/sbin/telinit.bak2
ln -s /usr/bin/true /usr/sbin/telinit
apt full-upgrade -y
apt autoremove -y
apt install -y apt-utils
echo "kali ALL=(ALL:ALL) ALL" > /etc/sudoers.d/kali'
if [ $? -eq 0 ]; then
print_done "NetHunter has been updated"
fi
}
# Update default password
update_passwd(){
print_task_V1_7 "Updating password (root)"
proot-distro login BackTrack-$BUILD_ID -- passwd
if [ $? -eq 0 ]; then
print_done "Updated password for user root"
fi
print_task_V1_7 "Updating password (kali)"
proot-distro login BackTrack-$BUILD_ID -- passwd kali
if [ $? -eq 0 ]; then
print_done "Updated password for user kali"
fi
}
# Setup zsh prompt (ohmyzsh)
setup_zsh(){
printf "[\033[34;1m?\033[0m] Apply nethunter theme to Termux? (y/n) : \033[38;5;222m"; read snt
printf "\033[0m"
case "$snt" in
y|Y)
if [ -f "$HOME/.termux/colors.properties" ]; then
print_task_V1_7 "Backing up termux color properties"
mv "$HOME/.termux/colors.properties" "$HOME/.termux/colors.properties-$current_datetime.bak"
print_done "Backup done"
fi
print_task_V1_7 "Changing the color and font of Termux"
cp "./themes/termux/colors.properties" "$HOME/.termux"
cp "./themes/termux/font.ttf" "$HOME/.termux"
print_done "Color update of termux is done"
;;
*)
# Do nothing
;;
esac
proot-distro login BackTrack-$BUILD_ID -- bash -c 'apt install -y zsh-syntax-highlighting zsh-autosuggestions command-not-found'
proot-distro login BackTrack-$BUILD_ID -- bash -c 'apt update'
if [ $? -eq 0 ]; then
print_done "zsh setup is complete"
fi
}
# Set up Nethunter GUI Xfce
gui_setup() {
print_task_V1_7 "Setting up Nethunter GUI"
# Add xstartup file
cp "./VNC/xstartup" "$nh_rootfs/root/.vnc/"
cp "./VNC/xstartup" "$nh_rootfs/home/kali/.vnc"
# kgui executable
cp "./VNC/kgui" "$nh_rootfs/usr/bin/"
# Fix ㉿ symbol encoding issue on terminal
cp "./themes/nethunter/NishikiTeki-font.ttf" "$nh_rootfs/usr/share/fonts/"
proot-distro login BackTrack-$BUILD_ID -- bash -c 'chmod +x ~/.vnc/xstartup
chmod +x /usr/bin/kgui'
proot-distro login BackTrack-$BUILD_ID --user kali -- bash -c 'chmod +x ~/.vnc/xstartup'
if [ $? -eq 0 ]; then
print_done "GUI setup is complete"
fi
}
change_default_shell() {
print_task_V1_7 "Changing default shell to zsh"
proot-distro login BackTrack-$BUILD_ID -- bash -c 'usermod -s /usr/bin/zsh root
usermod -s /usr/bin/zsh kali'
if [ $? -eq 0 ]; then
print_done "Successfully changed default shell to zsh"
else
print_error "Faild to thange default shell"
fi
}
# Function to Build nethunter based on the build ID
BUILD_NEW_NH() {
case $BUILD_ID in
KBDEXKMT10)
# xfce top10
local tools='Top 10'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-top10
;;
KBDEXKMTD)
# xfce default
local tools='Default'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-linux-default
;;
KBDEXKMTL)
# xfce large
local tools='Large'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-linux-large
;;
KBDEXKMTE)
# xfce everything
local tools='Everything'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-linux-everything
;;
KBCTDEX)
#Custom Tools Build
local tools='Custom build'
print_task_V1_7 "Building kali with custom tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 tigervnc-standalone-server kali-defaults kali-themes kali-menu firefox-esr steghide sqlmap autopsy wireshark yara wfuzz enum4linux nmap ncat cewl john wordlists hydra ghidra jd-gui burpsuite nikto dirb wpscan python3 python3-pip socat gobuster villain
;;
KBCIGDEX)
#Information gathering
local tools='Information gathering'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-information-gathering
;;
KBCWGDEX)
# kali web
local tools='Web'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-web
;;
KBCCSGDEX)
#Crypto and Stego
local tools='Crypto & Stego'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-crypto-stego
;;
KBCPGDEX)
#Passwords
local tools='Password enumeration'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-passwords
;;
KBCFOGDEX)
#Forensics
local tools='Forensics'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-forensics
;;
KBCFUGDEX)
#Fuzzing
local tools='Fuzzing'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-fuzzing
;;
KBCREGDEX)
#Reverse engineering
local tools='Reverse engineering'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-reverse-engineering
;;
KBCSSGDEX)
#Sniffing and Spoofing
local tools='Sniffing & Spoofing'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-sniffing-spoofing
;;
KBCEGDEX)
# Exploit
local tools='Exploitation'
print_task_V1_7 "Building kali $tools"
proot-distro login BackTrack-$BUILD_ID -- apt install -y kali-linux-core xfce4 xfce4-goodies xfce4-terminal kali-desktop-xfce xfce4-whiskermenu-plugin dbus-x11 kali-defaults kali-themes kali-menu firefox-esr tigervnc-standalone-server kali-tools-exploitation
;;
*)
print_error "Invalid build ID"
exit 1
;;
esac
if [ $? -eq 0 ]; then
print_done "kali NetHunter $tools is ready"
else
print_error "The building process is completed with some errors"
fi
}
###################################################################
# RUNTIME #
###################################################################
RUN () {
get_device_status
get_build_ID
is_distro_already_installed $BUILD_ID
if [[ $not_installed == 0 ]]; then
# continue as already installed
echo -e "[\033[31;1m!\033[0m]\033[33m This version of nethunter is already installed\033[0m\n"
printf "[\033[34;1m?\033[0m] Do you want to upgrade it ? (y/n) : \033[38;5;222m"; read upv
printf "\033[0m"
case $upv in
y)
set -e
upgrade_termux
login_shortcut
setup_nethunter
update_passwd
printf "[\033[34;1m?\033[0m] Do you want to reinstall these softwares ? (y/n) : \033[38;5;222m"; read isa
printf "\033[0m"
case "$isa" in
y|Y)
BUILD_NEW_NH
;;
*)
# Do nothing
;;
esac
setup_zsh
gui_setup
change_default_shell
;;
*)
print_done "Exiting.."
exit 0
esac
elif [[ $not_installed == 1 ]]; then
# install new one
print_done "There is no previous version of nethunter on this device"
set -e
install_nethunter
login_shortcut
setup_nethunter
update_passwd
BUILD_NEW_NH
setup_zsh
gui_setup
change_default_shell
else
print_error "value of the variable 'not_installed' should be 0 or 1"
exit 1
fi
}
if [[ $1 == "--install" ]]; then
RUN
if [ $? -eq 0 ]; then
print_done "Installation Successfull"
echo -e "Login with : \033[32mnethunter\033[0m [ BUILD ID ] [ USER ]"
echo -e "Default user is \033[34mkali\033[0m\n"
fi
else
info
exit 0
fi