mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 12:41:29 +00:00
Added missing error handling for connection timeouts
This commit is contained in:
@@ -87,7 +87,10 @@ action = function(host, port)
|
|||||||
try(socket:connect(host, port))
|
try(socket:connect(host, port))
|
||||||
|
|
||||||
status, tcp = snmp.snmpWalk( socket, tcp_oid )
|
status, tcp = snmp.snmpWalk( socket, tcp_oid )
|
||||||
|
if ( not(status) ) then return end
|
||||||
|
|
||||||
status, udp = snmp.snmpWalk( socket, udp_oid )
|
status, udp = snmp.snmpWalk( socket, udp_oid )
|
||||||
|
if ( not(status) ) then return end
|
||||||
socket:close()
|
socket:close()
|
||||||
|
|
||||||
if ( tcp == nil ) or ( #tcp == 0 ) or ( udp==nil ) or ( #udp == 0 ) then
|
if ( tcp == nil ) or ( #tcp == 0 ) or ( udp==nil ) or ( #udp == 0 ) then
|
||||||
|
|||||||
Reference in New Issue
Block a user