Skip to content

Python CLI that dumps TLS certificate chain in base64 (pem) format

License

Notifications You must be signed in to change notification settings

SCGIS-Wales/dumptls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

release

dumptls

A tool to download TLS certificates including intermediate and root CA certs.

Installation

You can install the package using pip:

Usage

To use the tool, simply run:

dumptls www.google.com

You can also specify a port and a resolve IP address:

dumptls example.com --port 8443 --resolve-ip-address 192.168.1.1

Example output:

  1. output file in base64 (pem) format (see example below)
-----BEGIN CERTIFICATE-----
***
-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----
***
-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----
***
-----END CERTIFICATE-----
  1. stdout with following example output (common names for all TLS certificates and their serial numbers)
Certificates have been saved to cert_chain.pem
Common Name: www.google.com, Serial Number: 276676235549746405282904896944097780989
Common Name: GTS CA 1C3, Serial Number: 159612451717983579589660725350
Common Name: GTS Root R1, Serial Number: 159159747900478145820483398898491642637

Building and Installing the Package

Navigate to the directory containing setup.py and run the following command to build the package:

python setup.py sdist bdist_wheel

To install the package locally:

pip install .