1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 01:49:03 +00:00

Added ssl-google-cert-catalog.nse by Vasiliy Kulikov

This commit is contained in:
henri
2011-09-22 18:37:48 +00:00
parent 6dc4a8820d
commit 9dbef5ab6e
3 changed files with 85 additions and 0 deletions

View File

@@ -200,6 +200,8 @@ action = function(host, port)
lines[#lines + 1] = cert.pem
end
add_cert(host, port.number, cert)
return stdnse.strjoin("\n", lines)
end
@@ -255,3 +257,15 @@ function date_to_string(date)
return os.date("%Y-%m-%d %H:%M:%S", os.time(date))
end
end
function add_cert(host, port, cert)
if not nmap.registry[host.ip] then
nmap.registry[host.ip] = {}
end
if not nmap.registry[host.ip][port] then
nmap.registry[host.ip][port] = {}
end
nmap.registry[host.ip][port]["ssl-cert"] = cert
end