Nmap Development mailing list archives

Re: [NSE] Script for TIME protocol


From: "Philip Pickering" <pgpickering () gmail com>
Date: Mon, 21 Jul 2008 15:04:54 +0200

Hi,

regarding the binlib: it hasn't been added to the trunk, yet.
It is still in code review, but will be added soon, hopefully.

There exists, however, a patch against nmap 4.68, which I
posted at [1]. If you want to try it out, just download nmap 4.68,
apply the patch, build it and the promised functions will be
available.

cheers,
Philip

[1] http://seclists.org/nmap-dev/2008/q3/0031.html



2008/7/19 Dirk Loss <lists () dirk-loss de>:
Hi,

the attached NSE script gets the current date and time from a server
that implements the TIME protocol (UDP port 37, RFC 868):

# nmap -p 37 -sU --script time-rfc868.nse time-a.nist.gov

Starting Nmap 4.68 ( http://nmap.org ) at 2008-07-19 18:30 CEST
Interesting ports on time-a.nist.gov (129.6.15.28):
PORT   STATE SERVICE
37/udp open  time
|_ TIME: Sat Jul 19 18:30:37 2008

Nmap done: 1 IP address (1 host up) scanned in 2.964 seconds

I wrote the script just to introduce myself to Lua and NSE programming
so if you have any comments or suggestions for improvement, please let
me know.

From the manual [1] it seemed bin.unpack() could be used to parse the
response, but I haven't been able to find the Binlib library in my Nmap
installation (SVN trunk). What would be right way to install and use it?

Regards
Dirk

[1] http://nmap.org/book/nse-library.html#nse-binlib


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: