Skip to content

Instantly share code, notes, and snippets.

@fabriziosalmi
Created October 27, 2019 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabriziosalmi/b5a1d3d327c1fc7999abbc3d4f16d677 to your computer and use it in GitHub Desktop.
Save fabriziosalmi/b5a1d3d327c1fc7999abbc3d4f16d677 to your computer and use it in GitHub Desktop.
SSL check from list
#!/bin/bash
output="/path/to/log.file"
input="/path/to/websites.list"
while IFS= read -r website
do
echo "$website" >> $output
openssl s_client -servername $website -connect $website:443 2>/dev/null | openssl x509 -noout -dates | grep After | cut -d"=" -f2 >> $output
done < "$input"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment