mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Don't substitute nonprinting characters in http-git.
NSE already escapes output everywhere. More importantly, the call to gsub returns two values, which were being treated as structured output and unstructured output. The second return value is an integer count of substitutions, so what you would see in normal output was |_http-git: 0 while what used to be normal output was going to XML. Alex Weber noticed that the script was not working. http://seclists.org/nmap-dev/2012/q4/397
This commit is contained in:
parent
e78540e9a5
commit
8f3165f7a6
1 changed files with 1 additions and 1 deletions
|
|
@ -260,6 +260,6 @@ function action(host, port)
|
|||
end
|
||||
|
||||
-- Replace non-printing characters with asterisks
|
||||
if #out > 0 then return string.gsub(stdnse.format_output(true, out), "[^%w%p%s]", "*")
|
||||
if #out > 0 then return stdnse.format_output(true, out)
|
||||
else return nil end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue