Skip to content

A simple Python script that calls SSL Labs API to do SSL testings on servers and create a report in html.

License

Notifications You must be signed in to change notification settings

Gadotti/ssllabs-scan

 
 

Repository files navigation

Disclaimer

This is a forked project from https://github.com/kyhau/ssllabs-scan. This project has been forked with the aim of customizing outputs and making the project more minimalist, with some additional features.

Key Features modified from the Main Project

  • Added execution log generation.
  • Acceptance of a new argument to set the folder where log files will be saved.
  • Added Discord notification support.
  • Modified HTML output page formatting, condensing multiple pieces of information into columns to reduce the number of columns, but added header information for presentation.
  • Modified HTML output page formatting to display the time of the last * generation and the ability to download the generated JSON and CSV files.
  • Prioritized the recording of the JSON file regardless of the return status.
  • Defined quality gate logic for triggering alerts.
  • Removed support and documentation related to tests and Docker.

SSL Labs Scan

This tool calls the SSL Labs API v3 to do SSL testings on the given hosts, and generates csv and html reports.


Main projet built with


Input and outputs

Sample input: sample/SampleServerList.txt

  1. summary.html (sample output: sample/summary.html)
  2. summary.csv (sample output: sample/summary.csv)
  3. hostname.json (sample output: sample/google.com.json)

Sample html output: alt text

You can change the report template and styles in these files:

ℹ️ Please note that the SSL Labs Assessment API has access rate limits. You can find more details in the sections "Error Response Status Codes" and "Access Rate and Rate Limiting" in the official SSL Labs API Documentation. Some common status codes are:

  • 400 - invocation error (e.g., invalid parameters)
  • 429 - client request rate too high or too many new assessments too fast
  • 500 - internal error
  • 503 - the service is not available (e.g., down for maintenance)
  • 529 - the service is overloaded

Build and run

Linux

# Create and activate a new virtual env (optional)
virtualenv env
. env/bin/activate

# Install and run
pip install -e .
ssllabs-scan sample/SampleServerList.txt

Windows

# Create and activate a new virtual env (optional)
virtualenv env
env\Scripts\activate

# Install and run
pip install -e .
ssllabs-scan sample\SampleServerList.txt

Example console output

$ ssllabs-scan sample/SampleServerList.txt
Start analyzing duckduckgo.com...
Status: DNS, StatusMsg(Resolving domain names): waiting 30 secs until next check...
Status: IN_PROGRESS, StatusMsg(None): waiting 30 secs until next check...
Status: IN_PROGRESS, StatusMsg(None): waiting 30 secs until next check...
Start analyzing google.com...
Status: DNS, StatusMsg(Resolving domain names): waiting 30 secs until next check...
Status: IN_PROGRESS, StatusMsg(None): waiting 30 secs until next check...
Status: IN_PROGRESS, StatusMsg(None): waiting 30 secs until next check...
Status: IN_PROGRESS, StatusMsg(None): waiting 30 secs until next check...
Status: IN_PROGRESS, StatusMsg(None): waiting 30 secs until next check...
Status: IN_PROGRESS, StatusMsg(None): waiting 30 secs until next check...
Status: IN_PROGRESS, StatusMsg(None): waiting 30 secs until next check...
Creating summary.html ...

About

A simple Python script that calls SSL Labs API to do SSL testings on servers and create a report in html.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.3%
  • CSS 3.7%