Skip to content

Instantly share code, notes, and snippets.

@ninp0
Created July 7, 2023 15:37
Show Gist options
  • Save ninp0/34385ca440aee57d775e6a32394f437f to your computer and use it in GitHub Desktop.
Save ninp0/34385ca440aee57d775e6a32394f437f to your computer and use it in GitHub Desktop.
#!/bin/bash --login
usage() {
echo "USAGE: ${0} <burp_CA DER File Path>"
exit 1
}
if (( $# == 1 )); then
burp_CA_der_path="${1}"
burp_CA_der_dir=$(dirname ${burp_CA_der_path})
burp_CA_crt="${burp_CA_der_dir}/burp_CA.crt"
burp_CA_pem="${burp_CA_der_dir}/burp_CA.pem"
openssl x509 -inform DER -in "${burp_CA_der_path}" -out "${burp_CA_crt}"
openssl x509 -in "${burp_CA_crt}" -out "${burp_CA_pem}"
echo "Burp CA pem file saved at: ${burp_CA_pem}"
else
usage
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment