mirror of
https://github.com/nmap/nmap.git
synced 2025-12-11 10:19: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))
|
resultEHLO = try(socket:receive_lines(1))
|
||||||
|
|
||||||
if not (string.match(resultEHLO, "^250")) then
|
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.")
|
-- stdnse.print_debug("1","EHLO with errors or timeout. Enable --script-trace to see what is happening.")
|
||||||
resultEHLO = ""
|
resultEHLO = ""
|
||||||
end
|
end
|
||||||
@@ -100,7 +100,7 @@ action = function(host, port)
|
|||||||
resultHELP = try(socket:receive_lines(1))
|
resultHELP = try(socket:receive_lines(1))
|
||||||
|
|
||||||
if not (string.match(resultHELP, "^214")) then
|
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.")
|
-- stdnse.print_debug("1","HELP with errors or timeout. Enable --script-trace to see what is happening.")
|
||||||
resultHELP = ""
|
resultHELP = ""
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -240,8 +240,7 @@ action = function(host, port)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if #injectable > 0 then
|
if #injectable > 0 then
|
||||||
stdnse.print_debug(1, id .. ": Testing " .. #injectable ..
|
stdnse.print_debug(1, "%s: Testing %d suspicious URLs", id, #injectable )
|
||||||
" suspicious URLs")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- test all potentially vulnerable queries
|
-- test all potentially vulnerable queries
|
||||||
|
|||||||
@@ -65,8 +65,7 @@ local new_auth_iter = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
stdnse.print_debug(3, id .. " " ..
|
stdnse.print_debug(3, "%s %s:%s", id, userpass[i-1][1], escape_cred(userpass[i-1][2]))
|
||||||
userpass[i-1][1] .. ":" .. escape_cred(userpass[i-1][2]))
|
|
||||||
return userpass[i-1][1], userpass[i-1][2]
|
return userpass[i-1][1], userpass[i-1][2]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ action = function(host, port)
|
|||||||
if data.status == 301 or data.status == 302 then
|
if data.status == 301 or data.status == 302 then
|
||||||
local url = url.parse( data.header.location )
|
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
|
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 )
|
data = http.get( host, port, url.path )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user