Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This simple tool helps you extract domains from certs using Subject Alternative Names (SANs)

Notifications You must be signed in to change notification settings

girorme/sslsans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ SSL Certificate SANs Extractor

This simple tool helps you extract domains from certs using Subject Alternative Names (SANs)

πŸ™Œ Inspiration

This script was inspired by the awesome work done in cero by glebarez and was created in Python just for fun! The simplicity and focus of cero motivated me to build a tool specifically for extracting SANs from SSL certificates. Check it out for more great SSL certificate insights!

πŸ”§ Requirements

  • Python 3.x

πŸ› οΈ Installation

Clone the repo and navigate to the project directory:

git clone https://github.com/girorme/sslsans.git
cd sslsans

⚑ Usage

Basic Example

To fetch the SANs for a given host (e.g., example.com), run:

python3 sslsans.py --hostname https://example.com

Specifying a Port

By default, it connects over port 443, but you can specify a different port if needed:

python3 sslsans.py --hostname https://example.com --port 8443

Output Formats

You can specify the output format as either text or json.

Text Output (default):

python3 sslsans.py --hostname https://example.com --output text

JSON Output:

python3 sslsans.py --hostname https://example.com --output json

Example Output

Text:

example.com
www.example.com
api.example.com

JSON:

["example.com", "www.example.com", "api.example.com"]

LICENSE

MIT

About

This simple tool helps you extract domains from certs using Subject Alternative Names (SANs)

Topics

Resources

Stars

Watchers

Forks

Languages