1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Sets the boot date string to N/A when boot time isn't available

This commit is contained in:
paulino
2017-08-04 22:07:44 +00:00
parent cde6853481
commit 4c847ef4f1

View File

@@ -392,8 +392,14 @@ function negotiate_v2(smb, overrides)
-- Convert the time and timezone to human readable values (taken from smb.lua)
smb['time'] = (smb['time'] // 10000000) - 11644473600
smb['date'] = os.date("%Y-%m-%d %H:%M:%S", smb['time'])
smb['start_time'] = (smb['start_time'] // 10000000) - 11644473600
smb['start_date'] = os.date("%Y-%m-%d %H:%M:%S", smb['start_time'])
-- Samba does not report the boot time
if smb['start_time'] ~= 0 then
smb['start_time'] = (smb['start_time'] // 10000000) - 11644473600
smb['start_date'] = os.date("%Y-%m-%d %H:%M:%S", smb['start_time'])
else
smb['start_date'] = "N/A"
end
local security_buffer_offset, security_buffer_length, neg_context_offset
security_buffer_offset, security_buffer_length, neg_context_offset = string.unpack("<I2 I2 I4", data)