Advertisement
Sweetening

kali on debian

May 27th, 2024
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Ensure the script is run as root
  4. if [ "$(id -u)" -ne 0 ]; then
  5. echo "This script must be run as root."
  6. exit 1
  7. fi
  8.  
  9. # Add Kali Linux repositories
  10. echo "Adding Kali Linux repositories..."
  11. cat <<EOF >/etc/apt/sources.list.d/kali.list
  12. deb http://http.kali.org/kali kali-rolling main non-free contrib
  13. EOF
  14.  
  15. # Import the Kali Linux GPG key
  16. echo "Importing Kali Linux GPG key..."
  17. wget -q -O - https://archive.kali.org/archive-key.asc | tee /etc/apt/trusted.gpg.d/kali-archive-key.asc
  18.  
  19. # Update the package list
  20. echo "Updating package list..."
  21. apt update
  22.  
  23. # Prevent potential issues with package priorities
  24. echo "Setting package preferences..."
  25. cat <<EOF >/etc/apt/preferences.d/kali.pref
  26. Package: *
  27. Pin: release o=Kali
  28. Pin-Priority: 100
  29. EOF
  30.  
  31. # Install Kali Linux meta-package for all tools
  32. echo "Installing kali-linux-everything meta-package..."
  33. apt update
  34. apt install -y kali-linux-everything
  35.  
  36. # Cleanup
  37. echo "Cleaning up..."
  38. apt clean
  39.  
  40. echo "Installation of all Kali Linux tools is complete."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement