Skip to content

Instantly share code, notes, and snippets.

@elecnix
Forked from anonymous/gist:8917a1c8da1616e8c48e
Last active August 29, 2015 14:17
Show Gist options
  • Save elecnix/9e85959bf1b920bf519b to your computer and use it in GitHub Desktop.
Save elecnix/9e85959bf1b920bf519b to your computer and use it in GitHub Desktop.
cat top-1m.csv | sed -e 's_.*,\(.*\)_echo | openssl s\_client -connect \1:443 > certs/\1.pem\&_' > certs.sh
bash certs.sh
ls certs | xargs -L1 -I DOMAIN echo 'openssl x509 -in certs/DOMAIN -text -noout > checks/DOMAIN.check' > checks.sh
bash checks.sh
cat top-1m.csv | sed -e 's#.*,\(.*\)#\1#'| xargs -n1 -P20 -I DOM grep -H 'Not After' checks/DOM.pem.check 2>/dev/null | cut -d ':' -f 1,3-|sed -e 's_checks/\(.*\).pem.check: \(.*\)_\1,\2_' > top-1m-expiry.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment