Post History
nmap can do this: $ nmap -p 443 --script ssl-cert codidact.com Starting Nmap 7.95 ( https://nmap.org ) at 2024-08-12 10:06 EEST Nmap scan report for codidact.com (104.26.0.18) Host is up (0.00...
Answer
#1: Initial revision
[`nmap`](https://nmap.org/) can do this: ```commandline $ nmap -p 443 --script ssl-cert codidact.com Starting Nmap 7.95 ( https://nmap.org ) at 2024-08-12 10:06 EEST Nmap scan report for codidact.com (104.26.0.18) Host is up (0.0037s latency). Other addresses for codidact.com (not scanned): 172.67.69.183 104.26.1.18 2606:4700:20::ac43:45b7 2606:4700:20::681a:112 2606:4700:20::681a:12 PORT STATE SERVICE 443/tcp open https | ssl-cert: Subject: commonName=codidact.com | Subject Alternative Name: DNS:codidact.com, DNS:*.codidact.com | Issuer: commonName=WE1/organizationName=Google Trust Services/countryName=US | Public Key type: ec | Public Key bits: 256 | Signature Algorithm: ecdsa-with-SHA256 | Not valid before: 2024-07-19T22:57:44 | Not valid after: 2024-10-17T22:57:43 | MD5: 21a2:8844:43a9:2f68:6bbc:a49e:f3c0:d9a6 |_SHA-1: b42f:d65f:cd2d:5281:9d40:52bf:6578:6c74:95df:7c1a Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds ``` It uses the [`ssl-cert`](https://nmap.org/nsedoc/scripts/ssl-cert.html) [nmap script](https://nmap.org/book/man-nse.html) to gather and print out the information. `-p 443` just [selects the port to scan](https://nmap.org/book/man-port-specification.html), and `443` happens to be the usual `HTTPS` port.