mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Added missing error handling for connection timeouts
This commit is contained in:
parent
902b39517f
commit
c0d92223db
1 changed files with 3 additions and 0 deletions
|
|
@ -87,7 +87,10 @@ action = function(host, port)
|
|||
try(socket:connect(host, port))
|
||||
|
||||
status, tcp = snmp.snmpWalk( socket, tcp_oid )
|
||||
if ( not(status) ) then return end
|
||||
|
||||
status, udp = snmp.snmpWalk( socket, udp_oid )
|
||||
if ( not(status) ) then return end
|
||||
socket:close()
|
||||
|
||||
if ( tcp == nil ) or ( #tcp == 0 ) or ( udp==nil ) or ( #udp == 0 ) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue