mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
Allow http-server-header to set http service even without Server header
This commit is contained in:
@@ -35,12 +35,15 @@ action = function(host, port)
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local http_server = string.match(result, "\nServer:%s*(.-)\r?\n")
|
port.version = port.version or {}
|
||||||
if http_server == nil then
|
|
||||||
|
if string.match(result, "^HTTP/1.[01] %d%d%d") then
|
||||||
|
port.version.service = "http"
|
||||||
|
else
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
port.version = port.version or {}
|
local http_server = string.match(result, "\nServer:%s*(.-)\r?\n")
|
||||||
|
|
||||||
if port.version.product == nil then
|
if port.version.product == nil then
|
||||||
port.version.product = http_server
|
port.version.product = http_server
|
||||||
|
|||||||
Reference in New Issue
Block a user