mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
add nil checks to address bug discovered by Mike
http://seclists.org/nmap-dev/2014/q2/120
This commit is contained in:
parent
d2009ab250
commit
91e1d21cc1
2 changed files with 6 additions and 0 deletions
|
|
@ -179,6 +179,9 @@ action = function(host, port)
|
|||
|
||||
local result
|
||||
result = snmp.fetchFirst(response)
|
||||
if not result then
|
||||
return
|
||||
end
|
||||
|
||||
if result == 3 then
|
||||
result = ( infile and infile:getContent() )
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ action = function(host, port)
|
|||
try(socket:close())
|
||||
|
||||
local uptime = snmp.fetchFirst(response)
|
||||
if not uptime then
|
||||
return
|
||||
end
|
||||
|
||||
local days, hours, minutes, seconds, htime, mtime, stime
|
||||
days = math.floor(uptime / 8640000)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue