mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Compatibility changes for ntp-info
http://seclists.org/nmap-dev/2014/q3/222
This commit is contained in:
parent
2bd4134b30
commit
f8917a59a3
1 changed files with 3 additions and 6 deletions
|
|
@ -75,8 +75,8 @@ action = function(host, port)
|
|||
local buftres, bufrlres
|
||||
local output = stdnse.output_table()
|
||||
|
||||
-- This is a ntp v4 mode3 (client) date/time request.
|
||||
local treq = string.char(0xe3, 0x00, 0x04, 0xfa, 0x00, 0x01, 0x00, 0x00,
|
||||
-- This is a ntp v2 mode3 (client) date/time request.
|
||||
local treq = string.char(0xd3, 0x00, 0x04, 0xfa, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
@ -89,10 +89,7 @@ action = function(host, port)
|
|||
0x00, 0x00, 0x00, 0x00)
|
||||
|
||||
status, buftres = comm.exchange(host, port, treq, {proto=port.protocol, timeout=TIMEOUT})
|
||||
if not status then
|
||||
-- Don't try the second probe if this one didn't work.
|
||||
return nil
|
||||
else
|
||||
if status then
|
||||
local _, sec, frac, tstamp
|
||||
|
||||
_, sec, frac = bin.unpack(">II", buftres, 33)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue