Skip to content

kubakl/ssl-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About:

This tool is created to check your domain's SSL certificates expiry date. It allows you configuring email alerting system, so you don't miss your certificate's expiry date. You can check domains one by one or provide a file with all of your domains so the app can check it automatically.

Installation:

With snap:

sudo snap install ssl-check --beta --devmode

Build from source:
This installation method works on Linux and MacOs. Having golang installed and added to the $PATH is required

git clone [email protected]:kubakl/ssl-checker.git
cd ssl-checker
sudo make install

Usage:

Flags:

This will display the expiration date of the certificate on www.foobar.com:

ssl-check -d www.foobar.com

Providing a file with domains instead of passing them one by one:

ssl-check -f myDomains.txt 

Displaying number of days left before the certificate will expire:

ssl-check -d www.foobar.com -l
ssl-check -f myDomains.txt -l

Providing a config file for email notifications:

ssl-check -f myDomains.txt -l -e config.json
ssl-check -d www.foobar.com -l -e config.json

Sample file with domains:

You have to pass domains line by line

www.foo.com
www.bar.com
www.foo.org
www.bar.org

Sample file with email config:

// config.json
{
	"sender_email": "[email protected]", // your email address
	"sender_password": "foobar", // your password for the email
	"smtp_host": "smtp.foobar.com", // smtp server from which you want to send the message
	"smtp_port": "587", // port on which the server is exposed
	"receivers": [ // list of addresses where you want to send the message
		"[email protected]", 
		"[email protected]"
	],
	"alert_before": 14 // will send an email 14 days before the expiration
} 

NOTE: If you are not using your local smtp server you have to make sure to allow the access for third party applications in your mail account.

Using xargs

If you have directories with your domains:

ls | xargs -n1 ssl-check -l -d
ls | xargs -I % ssl-check -d % -l

If you have several files with domain names inside:

ls | xargs -n1 ssl-check -l -f
ls | xargs -I % ssl-check -f % -l

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages