diff --git a/scripts/http-server-header.nse b/scripts/http-server-header.nse index 3e8b6585b..653a925df 100644 --- a/scripts/http-server-header.nse +++ b/scripts/http-server-header.nse @@ -19,13 +19,12 @@ correctly. -- -- PORT STATE SERVICE VERSION -- 80/tcp open http Unidentified Server 1.0 --- | http-server-header: --- | Server: --- |_ Unidentified Server 1.0 +-- |_ http-server-header: Unidentified Server 1.0 -- --@xmloutput -- -- Unidentified Server 1.0 +-- SomeOther Server --
author = "Daniel Miller" @@ -95,8 +94,8 @@ action = function(host, port) out_s[#out_s+1] = s == "" and "" or s end if next(out) then + table.sort(out) table.sort(out_s) - table.insert(out_s, 1, "\nServer:") - return {Server=out}, table.concat(out_s, "\n ") + return out, ((#out > 1) and "\n " or "") .. table.concat(out_s, "\n ") end end