mirror of
https://github.com/nmap/nmap.git
synced 2026-02-06 05:26:34 +00:00
Remove many ERROR outputs from non-debug NSE output
This commit is contained in:
@@ -38,23 +38,25 @@ categories = {"discovery", "safe"}
|
||||
|
||||
portrule = shortport.port_or_service(8333, "bitcoin", "tcp" )
|
||||
|
||||
local function fail(err) return stdnse.format_output(false, err) end
|
||||
|
||||
action = function(host, port)
|
||||
|
||||
local bcoin = bitcoin.Helper:new(host, port, { timeout = 20000 })
|
||||
local status = bcoin:connect()
|
||||
|
||||
if ( not(status) ) then
|
||||
return "\n ERROR: Failed to connect to server"
|
||||
return fail("Failed to connect to server")
|
||||
end
|
||||
|
||||
local status, ver = bcoin:exchVersion()
|
||||
if ( not(status) ) then
|
||||
return "\n ERROR: Failed to extract version information"
|
||||
return fail("Failed to extract version information")
|
||||
end
|
||||
|
||||
local status, nodes = bcoin:getNodes()
|
||||
if ( not(status) ) then
|
||||
return "\n ERROR: Failed to extract address information"
|
||||
return fail("Failed to extract address information")
|
||||
end
|
||||
bcoin:close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user