mirror of
https://github.com/nmap/nmap.git
synced 2025-12-11 02:09:03 +00:00
o Fix a number of NSE scripts which used print_debug()
incorrectly. See http://seclists.org/nmap-dev/2008/q3/0470.html. [Sven Klemm].
This commit is contained in:
@@ -80,7 +80,7 @@ action = function(host, port)
|
||||
resultEHLO = try(socket:receive_lines(1))
|
||||
|
||||
if not (string.match(resultEHLO, "^250")) then
|
||||
-- stdnse.print_debug("1",resultEHLO)
|
||||
-- stdnse.print_debug("1","%s",resultEHLO)
|
||||
-- stdnse.print_debug("1","EHLO with errors or timeout. Enable --script-trace to see what is happening.")
|
||||
resultEHLO = ""
|
||||
end
|
||||
@@ -100,7 +100,7 @@ action = function(host, port)
|
||||
resultHELP = try(socket:receive_lines(1))
|
||||
|
||||
if not (string.match(resultHELP, "^214")) then
|
||||
-- stdnse.print_debug("1",resultHELP)
|
||||
-- stdnse.print_debug("1","%s",resultHELP)
|
||||
-- stdnse.print_debug("1","HELP with errors or timeout. Enable --script-trace to see what is happening.")
|
||||
resultHELP = ""
|
||||
end
|
||||
|
||||
@@ -240,8 +240,7 @@ action = function(host, port)
|
||||
end
|
||||
|
||||
if #injectable > 0 then
|
||||
stdnse.print_debug(1, id .. ": Testing " .. #injectable ..
|
||||
" suspicious URLs")
|
||||
stdnse.print_debug(1, "%s: Testing %d suspicious URLs", id, #injectable )
|
||||
end
|
||||
|
||||
-- test all potentially vulnerable queries
|
||||
|
||||
@@ -65,8 +65,7 @@ local new_auth_iter = function()
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
stdnse.print_debug(3, id .. " " ..
|
||||
userpass[i-1][1] .. ":" .. escape_cred(userpass[i-1][2]))
|
||||
stdnse.print_debug(3, "%s %s:%s", id, userpass[i-1][1], escape_cred(userpass[i-1][2]))
|
||||
return userpass[i-1][1], userpass[i-1][2]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -37,7 +37,7 @@ action = function(host, port)
|
||||
if data.status == 301 or data.status == 302 then
|
||||
local url = url.parse( data.header.location )
|
||||
if url.host == host.targetname or url.host == ( host.name ~= '' and host.name ) or url.host == host.ip then
|
||||
stdnse.print_debug("showHTMLTitle.nse: Default page is located at " .. url.scheme.. "://" .. url.authority .. url.path)
|
||||
stdnse.print_debug("showHTMLTitle.nse: Default page is located at %s://%s%s", url.scheme, url.authority, url.path)
|
||||
data = http.get( host, port, url.path )
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user