1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 01:49:03 +00:00

Move date/time functions from stdnse to datetime. See #517

This commit is contained in:
dmiller
2018-08-27 22:00:10 +00:00
parent 9c3e676871
commit 46eca7f35f
35 changed files with 282 additions and 255 deletions

View File

@@ -1,3 +1,4 @@
local datetime = require "datetime"
local msrpc = require "msrpc"
local smb = require "smb"
local stdnse = require "stdnse"
@@ -306,14 +307,14 @@ action = function(host)
if(time == 0) then
time = "[just logged in, it's probably you]"
else
time = stdnse.format_time(time)
time = datetime.format_time(time)
end
local idle_time = sessions[i]['idle_time']
if(idle_time == 0) then
idle_time = "[not idle]"
else
idle_time = stdnse.format_time(idle_time)
idle_time = datetime.format_time(idle_time)
end
table.insert(sessions_output, string.format("%s is connected from %s for %s, idle for %s", sessions[i]['user'], sessions[i]['client'], time, idle_time))