From 324dc675417154ca6cf42c58388cd21c3db7ff82 Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 1 Jun 2015 22:37:53 +0000 Subject: [PATCH] Reduce vertical space from http-server-header --- scripts/http-server-header.nse | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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