Skip to content

SSL/TLS Certificate Checker - A Python script to validate SSL/TLS certificates for common misconfigurations and output the results in JSON format.

License

Notifications You must be signed in to change notification settings

h4r5h1t/CertCheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python tool to check and validate SSL/TLS certificates for common misconfigurations and output the results in JSON format.

FeaturesInstallationUsage

This Python tool checks the expiration date and other information of a website's SSL/TLS certificate. It uses asyncio and SSLContext to make secure connections to websites and obtain SSL certificate information. The tool validates the SSL/TLS certificate for common misconfigurations like Expired Certificates, Self-signed Certificates, Mismatched Certificates, Revoked Certificates, and outputs the SSL/TLS certificate information in a formatted JSON object.

Features

  • Checks the expiration date and other information of a website's SSL/TLS certificate
  • Uses asyncio and SSLContext to make secure connections to websites and obtain SSL certificate information
  • Validates SSL/TLS certificate for common misconfigurations like:
    • Expired Certificates,
    • Self-signed Certificates,
    • Mismatched Certificates, and
    • Revoked Certificates
  • Outputs the SSL/TLS certificate information in a formatted JSON object including:
    • A boolean indicating if the certificate is valid or not
    • An error message if the certificate is not valid
    • The date the certificate was issued
    • The date the certificate expires
    • The number of days until the certificate expires
    • The subject of the certificate
    • The issuer of the certificate
    • The subject alternative names of the certificate
    • The serial number of the certificate
    • The version of the certificate
    • The signature algorithm of the certificate

Installation

git clone https://github.com/h4r5h1t/CertCheck.git
cd CertCheck
pip install .

Usage

To run the program, use the following command:

certcheck --help

This will display the following output:

usage: certcheck [-h] -u URL [URL ...] [-o OUTPUT] [--debug]

A simple python script to check and validate the SSL/TLS certificate information of a website.

options:
  -h, --help            show this help message and exit
  -u URL [URL ...], --url URL [URL ...]
                        Provide URL or list of URLs to check
  -o OUTPUT, --output OUTPUT
                        In addition to STDOUT also write results to file.
  --debug               Enable debug mode

Example: certcheck -u https://example.com [-o output.txt] [--debug]

To check the SSL/TLS Certificate information of a single URL, use the '-u' flag and provide the URL as an argument:

certcheck -u https://example.com

To check the SSL/TLS Certificate information of multiple URLs, provide a list of URLs separated by spaces:

certcheck -u https://example.com https://google.com https://apple.com

To save the results to a file, use the '-o' flag and provide the file path as an argument:

certcheck -u https://example.com -o output.txt

To enable debug mode, use the '--debug' flag:

certcheck -u https://example.com --debug
Warning: Developers assume no liability and are not responsible for any misuse or damage cause by this tool. So, please se with caution because you are responsible for your own actions.

About

SSL/TLS Certificate Checker - A Python script to validate SSL/TLS certificates for common misconfigurations and output the results in JSON format.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages