"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "nselib/ldap.lua" between
nmap-7.90.tgz and nmap-7.91.tgz

About: Nmap ("Network Mapper") is a utility for network exploration or security auditing (port scanner).

ldap.lua  (nmap-7.90.tgz):ldap.lua  (nmap-7.91.tgz)
skipping to change at line 25 skipping to change at line 25
-- Revised 10/29/2011 - v0.5 - Added support for performing wildcard searches vi a the substring filter. -- Revised 10/29/2011 - v0.5 - Added support for performing wildcard searches vi a the substring filter.
-- Revised 10/30/2011 - v0.6 - Added support for the ldap extensibleMatch filter type for searches -- Revised 10/30/2011 - v0.6 - Added support for the ldap extensibleMatch filter type for searches
-- Revised 04/04/2016 - v0.7 - Added support for searchRequest over upd ( udpSea rchRequest ) - Tom Sellers -- Revised 04/04/2016 - v0.7 - Added support for searchRequest over upd ( udpSea rchRequest ) - Tom Sellers
-- Revised 07/11/2017 - v0.8 - Added support for decoding the objectSID Active D irectory attribute - Tom Sellers -- Revised 07/11/2017 - v0.8 - Added support for decoding the objectSID Active D irectory attribute - Tom Sellers
-- --
local asn1 = require "asn1" local asn1 = require "asn1"
local datetime = require "datetime" local datetime = require "datetime"
local io = require "io" local io = require "io"
local nmap = require "nmap" local nmap = require "nmap"
local os = require "os"
local stdnse = require "stdnse" local stdnse = require "stdnse"
local string = require "string" local string = require "string"
local stringaux = require "stringaux" local stringaux = require "stringaux"
local table = require "table" local table = require "table"
local comm = require "comm" local comm = require "comm"
_ENV = stdnse.module("ldap", stdnse.seeall) _ENV = stdnse.module("ldap", stdnse.seeall)
local ldapMessageId = 1 local ldapMessageId = 1
ERROR_MSG = {} ERROR_MSG = {}
skipping to change at line 822 skipping to change at line 821
end end
--- Convert Microsoft Active Directory timestamp format to a human readable form --- Convert Microsoft Active Directory timestamp format to a human readable form
-- These values store time values in 100 nanoseconds segments from 01-Jan-1601 -- These values store time values in 100 nanoseconds segments from 01-Jan-1601
-- --
-- @param timestamp Microsoft Active Directory timestamp value -- @param timestamp Microsoft Active Directory timestamp value
-- @return string containing human readable form -- @return string containing human readable form
function convertADTimeStamp(timestamp) function convertADTimeStamp(timestamp)
local result = 0 local result = 0
local base_time = tonumber(os.time({year=1601, month=1, day=1, hour=0, minute= -- Windows cannot represent this time, so we pre-calculated it:
0, sec =0})) -- seconds since 1601/1/1 adjusted for local offset
local base_time = -11644473600 - datetime.utc_offset()
timestamp = tonumber(timestamp) timestamp = tonumber(timestamp)
if (timestamp and timestamp > 0) then if (timestamp and timestamp > 0) then
-- The result value was 3036 seconds off what Microsoft says it should be. -- The result value was 3036 seconds off what Microsoft says it should be.
-- I have been unable to find an explanation for this, and have resorted to -- I have been unable to find an explanation for this, and have resorted to
-- manually adjusting the formula. -- manually adjusting the formula.
result = ( timestamp // 10000000 ) - 3036 result = ( timestamp // 10000000 ) - 3036
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)