1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00

fix robots.nse output: remove robots.txt comments on disallowed entry lines

This commit is contained in:
kris
2007-12-11 16:04:00 +00:00
parent 927dade010
commit 18867cf3b2

View File

@@ -62,9 +62,10 @@ action = function(host, port)
return nil
end
-- parse all disallowed entries
-- parse all disallowed entries and remove comments
local output = strbuf.new()
for w in string.gmatch(strbuf.dump(response, '\n'), "Disallow:%s*([^\n]*)\n") do
w = w:gsub("%s*#.*", "")
buildOutput(output, w)
end