Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Ensure the script is run as root
- if [ "$(id -u)" -ne 0 ]; then
- echo "This script must be run as root."
- exit 1
- fi
- # Add Kali Linux repositories
- echo "Adding Kali Linux repositories..."
- cat <<EOF >/etc/apt/sources.list.d/kali.list
- deb http://http.kali.org/kali kali-rolling main non-free contrib
- EOF
- # Import the Kali Linux GPG key
- echo "Importing Kali Linux GPG key..."
- wget -q -O - https://archive.kali.org/archive-key.asc | tee /etc/apt/trusted.gpg.d/kali-archive-key.asc
- # Update the package list
- echo "Updating package list..."
- apt update
- # Prevent potential issues with package priorities
- echo "Setting package preferences..."
- cat <<EOF >/etc/apt/preferences.d/kali.pref
- Package: *
- Pin: release o=Kali
- Pin-Priority: 100
- EOF
- # Install Kali Linux meta-package for all tools
- echo "Installing kali-linux-everything meta-package..."
- apt update
- apt install -y kali-linux-everything
- # Cleanup
- echo "Cleaning up..."
- apt clean
- echo "Installation of all Kali Linux tools is complete."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement