From 87fa3974928c863679855fcab701a74ef3cb830d Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 15 Jan 2015 05:36:23 +0000 Subject: [PATCH] Let http-server-header handle an empty Server header Patch by nnposter. Fixes #37 --- scripts/http-server-header.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/http-server-header.nse b/scripts/http-server-header.nse index 1f70c2dc3..e60982335 100644 --- a/scripts/http-server-header.nse +++ b/scripts/http-server-header.nse @@ -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