mirror of
https://github.com/nmap/nmap.git
synced 2026-08-31 06:56:38 +00:00
Sets the boot date string to N/A when boot time isn't available
This commit is contained in:
parent
cde6853481
commit
4c847ef4f1
1 changed files with 8 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue