genkiroid / cert

Cert is the Go tool to get TLS certificate information.
MIT License
245 stars 37 forks source link

Trim scheme and path ( and username:password ) from args for supporting cert checks straight from the URL #23

Closed k1LoW closed 1 year ago

k1LoW commented 1 year ago

Hi @genkiroid.

I want to check certs straight from the URL. So trim scheme and path ( and username:password ) from args.

$ go run ./cmd/cert/main.go example.com
DomainName: example.com
IP:         2606:2800:220:1:248:1893:25c8:1946
Issuer:     DigiCert TLS RSA SHA256 2020 CA1
NotBefore:  2022-03-14 09:00:00 +0900 JST
NotAfter:   2023-03-15 08:59:59 +0900 JST
CommonName: www.example.org
SANs:       [www.example.org example.net example.edu example.com example.org www.example.com www.example.edu www.example.net]
Error:

$ go run ./cmd/cert/main.go https://example.com
u.Host: example.com
DomainName: example.com
IP:         93.184.216.34
Issuer:     DigiCert TLS RSA SHA256 2020 CA1
NotBefore:  2022-03-14 09:00:00 +0900 JST
NotAfter:   2023-03-15 08:59:59 +0900 JST
CommonName: www.example.org
SANs:       [www.example.org example.net example.edu example.com example.org www.example.com www.example.edu www.example.net]
Error:

$
genkiroid commented 1 year ago

@k1LoW Thanks!