1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-26 16:19:03 +00:00
This commit is contained in:
dmiller
2018-11-29 17:42:09 +00:00
parent 350bbe0597
commit b642dc129c

View File

@@ -161,12 +161,10 @@ local function get_host_field(host, port, scheme)
if host_header then return host_header end
-- If there's no host, we can't invent a name.
if not host then return nil end
local number
if type(port) == "number" then
number = port
port = {number=number, protocol="tcp"}
port = {number=port, protocol="tcp"}
end
stdnse.debug1("get_host_field: host=%s, port=%s, number=%s", host, port, number)
local number = port.number
if scheme then
-- Caller provided scheme. If it's default, return just the hostname.
if number == get_default_port(scheme) then