Skip to content

Instantly share code, notes, and snippets.

@M507
Created December 31, 2023 23:49
Show Gist options
  • Save M507/159fb90525cd06740af7b0f036d0e640 to your computer and use it in GitHub Desktop.
Save M507/159fb90525cd06740af7b0f036d0e640 to your computer and use it in GitHub Desktop.
Add burp cert to OS certificates file
#!/bin/bash
# Set the URL to the Burp Suite CA certificate
BURP_CERT_URL="http://burpserver:8080/cert"
# Set the path to the system's CA certificates file
CA_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"
# Download Burp Suite CA certificate
curl -sSL "$BURP_CERT_URL" -o /tmp/burp-ca-cert.pem
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Burp Suite CA certificate downloaded successfully."
# Append the Burp Suite CA certificate to the CA certificates file
cat /tmp/burp-ca-cert.pem | sudo tee -a "$CA_CERT_FILE" > /dev/null
# Update the CA certificates
sudo update-ca-certificates
echo "Burp Suite CA certificate added to system's CA certificates."
else
echo "Failed to download Burp Suite CA certificate."
fi
# Clean up temporary files
rm -f /tmp/burp-ca-cert.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment