Coder Social home page Coder Social logo

sslcheck's Introduction

sslcheck

A simple php script to check the expiry of SSL certificates.

Requirements

  • PHP (Including CLI support).
  • OpenSSL

This script has been tested only on Ubuntu 16.04+ using PHP7.

Usage

  1. Clone this repo or simply download the sslcheck file.
  2. Ensure the sslcheck file is executable (chmod a+x sslcheck).
  3. Execute the script ./sslcheck www.example.com.

If you can't execute the script directly you may need to envoke the script via php (php sslcheck www.example.com);

You can check multiple domains by listing them all out when running the script:

sslcheck www.google.com www.example.com www.github.com

If a domain is found to have multiple A or AAAA records then each will be checked individually and the IP will be shown alongside the domain in the output.

Usage via Email

The file email-example.sh is a simple script showing how this can be used via email. Simply read the comments at the top of the script and change the configuration variables to set it up. If the mail command is not available on your system you may need to install it (ubuntu: sudo apt-get install mailutils). A good idea would be to set this up as a cron job to send a weekly report.

sslcheck's People

Contributors

ssddanbrown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sslcheck's Issues

FAILED TO GET CERTIFICATE INFORMATION

I receive the below error when attempting to run this for my customer. Any ideas?


Errors:

mail.customer.com.au:ipaddress :: FAILED TO GET CERTIFICATE INFORMATION

Incredibly useful but a timezone issue

Hi ssddanbrown,

I found this incredibly useful and adapted it run directly from the browser.

One small issue I found was that the certificates are operating in UTC whereas the $now date is in local time.
I made a change to show hours remaining when less than one day and this highlighted the issue.

The fix was simple: $now = new DateTime(UTC);

Regards
Richard Dobie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.