setup_kali.sh 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/usr/bin/zsh
  2. echo "[+] Enabling the SSH Service"
  3. sudo systemctl enable ssh
  4. sudo systemctl start ssh
  5. echo "[+] Enabled, push your SSH key via 'ssh-copy-id -i lkey.pub kali@<ip>'"
  6. echo "[+] SSH Config File"
  7. echo "Host kali"
  8. echo " HostName 192.168.122.XXX"
  9. echo " User kali"
  10. echo " IdentityFile $home/documents/keys/KEY"
  11. echo -n "[*] Do you want to install all packages via apt? [y/n] "
  12. read yesno
  13. if [[ "$yesno" == "y" ]]; then
  14. sudo apt install ripgrep neovim fzf hexyl vifm feh xclip xrdp python3-pip
  15. fi
  16. echo "[+] Enabling XRDP, get ready for Remmina ;)"
  17. sudo systemctl enable xrdp
  18. sudo systemctl start xrdp
  19. # .zpretzo
  20. echo -n "[*] Do you want to install zpretzo? [y/n] "
  21. read yesno
  22. if [[ "$yesno" == "y" ]]; then
  23. cd $HOME
  24. [ ! -d "$HOME/.zprezto" ] && git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
  25. setopt EXTENDED_GLOB
  26. for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  27. rm -rf "${ZDOTDIR:-$HOME}/.${rcfile:t}"
  28. echo "[*] Symlinking $rcfile -> ${ZDOTDIR:-$HOME}/.${rcfile:t}"
  29. ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
  30. done
  31. fi
  32. echo -n "[*] Copy (and overwrite) dotfiles? [y/n] "
  33. read yesno
  34. if [[ $yesno -eq "y" ]]; then
  35. backup_dir=/tmp/dotfiles-backup-$(date "+%H%M%S")
  36. rsync --backup --backup-dir $backup_dir --exclude .git/ --exclude install.sh -r . $HOME
  37. echo "[+] Dotfiles installed :) Backup available @ $backup_dir"
  38. fi
  39. # Creating vim folders
  40. mkdir -p $HOME/.config/nvim/backups
  41. mkdir -p $HOME/.config/nvim/undo
  42. # Creating other needed folders
  43. mkdir $HOME/documents
  44. mkdir $HOME/documents/tools
  45. mkdir $HOME/documents/bin
  46. # setup SSH Folders & default import rule
  47. mkdir $HOME/.ssh
  48. mkdir $HOME/.ssh/config.d/
  49. echo "Include config.d/*" > $HOME/.ssh/config
  50. # Cleaning default folders
  51. rm -rf $HOME/Documents
  52. rm -rf $HOME/Pictures
  53. rm -rf $HOME/Public
  54. rm -rf $HOME/Videos
  55. rm -rf $HOME/Templates
  56. rm -rf $HOME/Music
  57. rm -rf $HOME/Desktop
  58. echo "[+] Done :)"