This simple tool helps you extract domains from certs using Subject Alternative Names (SANs)
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!
- Python 3.x
Clone the repo and navigate to the project directory:
git clone https://github.com/girorme/sslsans.git
cd sslsansTo fetch the SANs for a given host (e.g., example.com), run:
python3 sslsans.py --hostname https://example.comBy default, it connects over port 443, but you can specify a different port if needed:
python3 sslsans.py --hostname https://example.com --port 8443You can specify the output format as either text or json.
python3 sslsans.py --hostname https://example.com --output textpython3 sslsans.py --hostname https://example.com --output jsonexample.com
www.example.com
api.example.com
["example.com", "www.example.com", "api.example.com"]LICENSE
MIT