diff --git a/scripts/http-server-header.nse b/scripts/http-server-header.nse index e60982335..f109dc4c7 100644 --- a/scripts/http-server-header.nse +++ b/scripts/http-server-header.nse @@ -117,11 +117,14 @@ action = function(host, port) end local out = {} + local out_s = {} for s, _ in pairs(headers) do out[#out+1] = s + out_s[#out_s+1] = s == "" and "" or s end if next(out) then - table.sort(out) - return {Server=out} + table.sort(out_s) + table.insert(out_s, 1, "\nServer:") + return {Server=out}, table.concat(out_s, "\n ") end end