1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00

Display empty server header as <empty> (#37)

This commit is contained in:
dmiller
2015-01-15 05:36:25 +00:00
parent 87fa397492
commit 9ffafe5334

View File

@@ -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 "<empty>" 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