1

lets say i have the following url:

www.domain.com:4567/blabla/index.html

I'm trying to get its' ssl expiration date.

There's this:

nmap --script=ssl-cert.nse -p 9194 www.domain.com

but it doesnt quite work. I'm unable to find the right argument in nmap.

Edit: I could go for Openssl but I need a Windows based solution.

JustAGuy
  • 659

2 Answers2

1

The URL you showed is for port 4567. Therefore, you need to use that port in your Nmap scan: nmap -p4567 --script ssl-cert www.domain.com

Also, if the port you're scanning is not one of the typically-expected ports for SSL/TLS, then the script might not run. You can force it to run by adding + to the script name (not recommended for scans of multiple ports): nmap -p4567 --script +ssl-cert www.domain.com. Newer versions of Nmap will usually not need this because they will just try a probe to check if they can open a SSL connection anyway.

bonsaiviking
  • 4,490
0

The right way to us is:

nmap -sV -p 443 --script ssl-cert example.com

You need to include -sV option for service discovery.

Gerald Schneider
  • 26,582
  • 8
  • 65
  • 97