mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
fix robots.nse output: remove robots.txt comments on disallowed entry lines
This commit is contained in:
parent
927dade010
commit
18867cf3b2
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue