mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Fix the formatting of the uptime in snmp-ssydescr.nse so it looks like
"0:03:02.72 (18272 timeticks)", not "0:3:2.72 (18272 timeticks)" (note padding zeroes).
This commit is contained in:
parent
e47bff465c
commit
dde083e900
1 changed files with 3 additions and 4 deletions
|
|
@ -100,13 +100,12 @@ action = function(host, port)
|
|||
local dayLabel
|
||||
|
||||
if days == 1 then
|
||||
dayLabel = " day, "
|
||||
dayLabel = "day"
|
||||
else
|
||||
dayLabel = " days, "
|
||||
dayLabel = "days"
|
||||
end
|
||||
|
||||
result = result .. "\n System uptime: " .. days .. dayLabel .. hours .. ":" .. minutes .. ":" .. seconds
|
||||
result = result .. " (" .. tostring(uptime) .. " timeticks)"
|
||||
result = result .. "\n" .. string.format(" System uptime: %d %s, %d:%02d:%05.2f (%s timeticks)", days, dayLabel, hours, minutes, seconds, tostring(uptime))
|
||||
|
||||
return result
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue