mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
Let http-server-header handle an empty Server header
Patch by nnposter. Fixes #37
This commit is contained in:
@@ -101,7 +101,7 @@ action = function(host, port)
|
|||||||
if string.match(result, "^HTTP/1.[01] %d%d%d") then
|
if string.match(result, "^HTTP/1.[01] %d%d%d") then
|
||||||
port.version.service = "http"
|
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
|
-- 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
|
if port.version.product == nil and (port.version.name_confidence or 0) <= 3 then
|
||||||
|
|||||||
Reference in New Issue
Block a user