mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 06:51:33 +00:00
recommitting my r6499: "fix robots.nse output: remove robots.txt comments on disallowed entry lines"
This commit is contained in:
@@ -62,9 +62,10 @@ action = function(host, port)
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- parse all disallowed entries
|
-- parse all disallowed entries and remove comments
|
||||||
local output = strbuf.new()
|
local output = strbuf.new()
|
||||||
for w in string.gmatch(strbuf.dump(response, '\n'), "Disallow:%s*([^\n]*)\n") do
|
for w in string.gmatch(strbuf.dump(response, '\n'), "Disallow:%s*([^\n]*)\n") do
|
||||||
|
w = w:gsub("%s*#.*", "")
|
||||||
buildOutput(output, w)
|
buildOutput(output, w)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user