1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00

Remove many ERROR outputs from non-debug NSE output

This commit is contained in:
dmiller
2015-08-27 20:43:55 +00:00
parent fb5c947453
commit 7852fa3c18
137 changed files with 334 additions and 380 deletions

View File

@@ -40,6 +40,8 @@ categories = {"safe", "discovery"}
portrule = shortport.port_or_service(3389, "ms-wbt-server")
local function fail (err) return stdnse.format_output(false, err) end
local function enum_protocols(host, port)
local PROTOCOLS = {
["Native RDP"] = 0,
@@ -60,7 +62,7 @@ local function enum_protocols(host, port)
for k, v in pairs(PROTOCOLS) do
local comm = rdp.Comm:new(host, port)
if ( not(comm:connect()) ) then
return false, "ERROR: Failed to connect to server"
return false, fail("Failed to connect to server")
end
local cr = rdp.Request.ConnectionRequest:new(v)
local status, response = comm:exch(cr)
@@ -118,7 +120,7 @@ local function enum_ciphers(host, port)
for k, v in get_ordered_ciphers() do
local comm = rdp.Comm:new(host, port)
if ( not(comm:connect()) ) then
return false, "ERROR: Failed to connect to server"
return false, fail("Failed to connect to server")
end
local cr = rdp.Request.ConnectionRequest:new()