1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00

Let http-server-header handle an empty Server header

Patch by nnposter. Fixes #37
This commit is contained in:
dmiller
2015-01-15 05:36:23 +00:00
parent 7b0c3432e6
commit 87fa397492

View File

@@ -101,7 +101,7 @@ action = function(host, port)
if string.match(result, "^HTTP/1.[01] %d%d%d") then
port.version.service = "http"
local http_server = string.match(result, "\n[Ss][Ee][Rr][Vv][Ee][Rr]:%s*(.-)\r?\n")
local http_server = string.match(result, "\n[Ss][Ee][Rr][Vv][Ee][Rr]:[ \t]*(.-)\r?\n")
-- Avoid setting version info if -sV scan already got a match
if port.version.product == nil and (port.version.name_confidence or 0) <= 3 then