fygrave/honeyntp

some problems due to code modifications

marvelliu opened this issue · 0 comments

243 print "packet: %s" % (base64.b64encode(data)) | -----------------------------------------------------------------------------------------------
244 if data == '\x16\x02\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00': # not very smart but work| -----------------------------------------------------------------------------------------------
245 raise NTPException("Version scan") | -----------------------------------------------------------------------------------------------
246 ###returun

if I do not comment 246, I will have the following error:

@node2:$ sudo ntpdate 20.0.0.14
6 Sep 17:23:29 ntpdate[28772]: no server suitable for synchronization found
nsfocus@node2:
$ sudo ntpdate -o 3 20.0.0.14
6 Sep 17:23:43 ntpdate[29942]: no server suitable for synchronization found
nsfocus@node2:~$ sudo ntpdate -o 3 -d 20.0.0.14
6 Sep 17:24:16 ntpdate[653]: ntpdate 4.2.6p5@1.2349-o Thu Feb 11 18:30:41 UTC 2016 (1)
Looking for host 20.0.0.14 and service ntp
host found : node4.expr-zone
transmit(20.0.0.14)
receive(20.0.0.14)
receive: pkt.org and peer.xmt differ
transmit(20.0.0.14)
receive(20.0.0.14)
receive: pkt.org and peer.xmt differ
transmit(20.0.0.14)
receive(20.0.0.14)
receive: pkt.org and peer.xmt differ
transmit(20.0.0.14)
receive(20.0.0.14)
receive: pkt.org and peer.xmt differ

333 ###sendPacket.tx_timestamp = system_to_ntp_time(0) | -----------------------------------------------------------------------------------------------
334 sendPacket.tx_timestamp = system_to_ntp_time(time.time())

If I do not change this, I will get:
6 Sep 17:50:04 ntpdate[27133]: ntpdate 4.2.6p5@1.2349-o Thu Feb 11 18:30:41 UTC 2016 (1)
Looking for host 20.0.0.14 and service ntp
host found : node4.expr-zone
transmit(20.0.0.14)
receive(20.0.0.14)
transmit(20.0.0.14)
receive(20.0.0.14)
transmit(20.0.0.14)
receive(20.0.0.14)
transmit(20.0.0.14)
receive(20.0.0.14)
transmit(20.0.0.14)
20.0.0.14: Server dropped: no data
server 20.0.0.14, port 123
stratum 2, precision 0, leap 00, trust 000
refid [20.0.0.14], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time: db790fcd.dba49000 Tue, Sep 6 2016 17:50:05.857
originate timestamp: 83aa7e80.00000000 Thu, Jan 1 1970 8:00:00.000
transmit timestamp: db790fd2.e24d4701 Tue, Sep 6 2016 17:50:10.883
filter delay: 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

6 Sep 17:50:12 ntpdate[27133]: no server suitable for synchronization found