mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 18:39:03 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user