mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Applied patches from Dan Miller to fix bugs in http and sslcert libraries;
http://seclists.org/nmap-dev/2012/q2/696
This commit is contained in:
parent
2564f0bf03
commit
709fce67b1
2 changed files with 6 additions and 0 deletions
|
|
@ -1334,6 +1334,9 @@ local function parse_redirect(host, port, path, response)
|
|||
u.host, u.port = stdnse.get_hostname(host), port.number
|
||||
u.path = ((u.path:sub(1,1) == "/" and "" ) or "/" ) .. u.path -- ensuring leading slash
|
||||
end
|
||||
if ( not(u.path) ) then
|
||||
u.path = "/"
|
||||
end
|
||||
if ( u.query ) then
|
||||
u.path = ("%s?%s"):format( u.path, u.query )
|
||||
end
|
||||
|
|
|
|||
|
|
@ -200,6 +200,9 @@ function getCertificate(host, port)
|
|||
end
|
||||
end
|
||||
local cert = socket:get_ssl_certificate()
|
||||
if ( cert == nil ) then
|
||||
return false, "Unable to get cert"
|
||||
end
|
||||
|
||||
host.registry["ssl-cert"] = host.registry["ssl-cert"] or {}
|
||||
host.registry["ssl-cert"][port.number] = host.registry["ssl-cert"][port.number] or {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue