Code Monkey home page Code Monkey logo

bash-ssl-checker-tool's Introduction

bash-ssl-checker-tool

Very simple bash script which you could use to gain general information for the SSL certificate of a certain domain name.

It is based on the functionality of the popular https://sslshopper.com website, but it's a command line tool.

The script has been tested on CentOS, Ubuntu, Mint and Debian.

The script provides you with the following information:

  • The domain name that the SSL certificate has been issued for
  • The number of days the SSL certificate expires in:
  • The dates when the certificate was issued on and expires on
  • The certificate has been issued by:
  • Supported TLS versions
  • Certificate Fingerprint

Usage:

In order to use the script just download the ssl file, make it executable and run it:

wget https://raw.githubusercontent.com/bobbyiliev/bash-ssl-checker-tool/master/ssl
chmod +x ssl
./ssl yourdomain.com

Output:

The output that you would get will look like this:

The bobbyiliev.com domain name seems valid

# The SSL certificate has been issued for:
Domain: CN = bobbyiliev.com
----

# The SSL certificate expires in:
90 days
----

# Dates:
Issued On: Jun  4 09:05:19 2020 GMT
Expires On: Sep  2 09:05:19 2020 GMT
----

# The certificate has been issued by:
Issuer: C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
----

# TLS supported:
|   TLSv1.0:
|   TLSv1.1:
|   TLSv1.2:
----

# Fingerprint:
SHA1 Fingerprint=C1:E1:6C:46:8A:74:94:14:00:94:88:B9:4B:2B:C5:90:79:DE:72:64
----

Note: You need to have 'openssl' installed.

Blog post: https://bobbyiliev.com/blog/ssl-checker-terminal-tool

bash-ssl-checker-tool's People

Contributors

bobbyiliev avatar codebymikey avatar elvischang-lll avatar godzillante 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

Watchers

 avatar  avatar  avatar  avatar  avatar

bash-ssl-checker-tool's Issues

Won't loop?

Hi Bobby - this is a great tool - I've also been using a tool called 'aha' to output it to a html page for our teams here to look at

One thing I found though is that it appears impossible to use 'ssl' in a Bash loop?

I was planning on having a list of sites a script would run through... for example a ssl.list file with contents like...

www.microsoft.com
www.google.com

I've tried many loops and tests, but the loop seems to give up after the first invocation of the ssl command

Here are the contents of my /sslchecker folder

ls -la /sslchecker
total 24
drwxr-xr-x  2 root root 4096 Nov 24 13:10 .
drwxr-xr-x 25 root root 4096 Nov 24 13:10 ..
-rwxr-xr--  1 root root 4874 Nov 24 13:10 ssl
-rw-r--r--  1 root root   61 Nov 24 13:10 ssl.list
-rwxr-xr--  1 root root  505 Nov 24 13:10 ssl_checker.sh

The ssl.list file

www.microsoft.com
www.google.com

The ssl_checker.sh script

#! /bin/bash
cat /sslchecker/ssl.list | while read websiteurl
do
        echo loop start for $websiteurl
        /sslchecker/ssl $websiteurl
        echo loop end for $websiteurl
done

This will only do the first websitrurl - being www.microsoft.com and then the loop ends

Commenting out the ssl command - .e.g.

#! /bin/bash
cat /sslchecker/ssl.list | while read websiteurl
do
        echo loop start for $websiteurl
        #/sslchecker/ssl $websiteurl
        echo loop end for $websiteurl
done

...reads...

loop start for www.microsoft.com
loop end for www.microsoft.com
loop start for www.google.com
loop end for www.google.com

Thanks

Neil

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.