Created
December 31, 2023 23:49
-
-
Save M507/159fb90525cd06740af7b0f036d0e640 to your computer and use it in GitHub Desktop.
Add burp cert to OS certificates file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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