Skip to content

Bash scripting to check SSL certificates from desired list of web pages

Notifications You must be signed in to change notification settings

linuxshark/sauron-eye

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sauron-eye

Description

A script to check SSL certificate expiration date of a list of sites.

The script can be launched in two modes:

  • Terminal: Output is displayed in your terminal
  • HTML: the script generates an HTML file (called certs_check.html by default) that can be opened with your browser.

Optionally, you can also embed the HTML and send it to an email (you will need to install mutt if you use this option)

Usage

For example, we have the following file called sitelist that contains a list of domains with the HTTPS port, one domain per line:

linux.com:443
kernel.org:443
gnu.org:443
debian.org:443
ubuntu.com:443
github.com:443
google.es:443
redhat.com:443
superuser.com:443
youtube.com:443
stackoverflow.com:443
stackexchange.com:443
wikipedia.org:443
python.org:443
codecademy.com:443
packtpub.com:443
reddit.com:443
mysql.com:443

In the following cases I modified the variables warning_days and alert_days for sample purposes.

To launch the script in terminal mode:

./sauron-eye.sh -f sitelist -o terminal

We get the following output in our terminal:

screenshot from 2018-02-11 20-33-06

In HTML mode:

./sauron-eye.sh -f sitelist -o html

We get the following output:

screenshot from 2018-02-11 20-29-44

In HTML mode and sending the result to an email:

./sauron-eye.sh -f sitelist -o html -m [email protected]

Checking our email we will see:

screenshot from 2018-02-11 20-30-11

In Dockerized lauch as the following, mapping a volume with the sitelist file:

docker pull linuxshark/sauron-eye:1.0
docker run -v /PATH_TO_YOUR/SITELIST_FILE/:/app/ sauron-eye:1.0 bash /app/sauron-eye.sh -f sitelist -o terminal

If you want to get the html report with de Dockerized image, you can run the same:

docker run -v /PATH_TO_YOUR/SITELIST_FILE/:/app/ sauron-eye:1.0 bash /app/sauron-eye.sh -f sitelist -o html

About

Bash scripting to check SSL certificates from desired list of web pages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published