Skip to content

Instantly share code, notes, and snippets.

@brablc
Last active March 4, 2020 10:22
Show Gist options
  • Save brablc/225e403d269217806371f584f7f0ebdf to your computer and use it in GitHub Desktop.
Save brablc/225e403d269217806371f584f7f0ebdf to your computer and use it in GitHub Desktop.
Let's Encrypt Serial Check
wget https://d4twhgtvn0ff5.cloudfront.net/caa-rechecking-incident-affected-serials.txt.gz
zcat caa-rechecking-incident-affected-serials.txt.gz | awk '{print $2}' | sort > serials_only.txt
find /etc/letsencrypt/live -name 'cert.pem' -printf "%h\n" | cut -f5 -d/ | xargs -I% echo "echo \$(openssl x509 -text -noout </etc/letsencrypt/live/%/cert.pem | grep -A1 Serial\ Number | sed -e 1d -e's/://g' ) %" | sh > serials_hosted_with_domain.txt
cut -f1 -d\ serials_hosted_with_domain.txt | sort >serials_hosted.txt
comm -12 serials_only.txt serials_hosted.txt > affected_domains.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment