Nmap Development mailing list archives

[SCRIPT] NetBIOS name and MAC query script


From: Brandon Enright <bmenrigh () ucsd edu>
Date: Sat, 24 Mar 2007 09:07:41 +0000

Developers,

Attached is a NSE script to query Windows and Samba hosts for their NetBIOS
name and MAC address.  The script isn't Marek Majkowski quality or anything
but I've tried to make it pretty robust and well documented.

While coding this script I ran into a few issues:

* Lua documentation on the net is pretty awful.  The best resource seems to
be a World of Warcraft Lua wiki.  If you know of a better resource please
reply to this or email me personally.  I'm willing to buy a book if that's
what it takes to get 100% comprehensive Lua documentation.

* socket:receive_bytes(1) seems to consume all the bytes in the buffer; not
just one.  Since I can't find documentation on this added function (and I
haven't looked at the source) I'm not sure if this is a bug or a
misunderstanding on my part.

* The host collection (if that is the Lua term for it) doesn't seem to
expose the discovered MAC.  If it does I don't know how to access it.  It
would be nice to have the MAC exposed and changeable.  Something similar to
nmap.set_port_version(host, port, "hardmatched") for the host information
would be nice.  If this is already there then please point me towards the
docs.

* Scripts in the "discovery" category seem to have less functional or
different uses for the hostrule function.  This script has a hostrule that
I think is semi-reasonable but I've commented it out because the behavior
of hostrule seems to be different.  If there is documentation on this
please point me to it.

* Documentation on the net suggests there is a string.ascii() method but it
seems like that method is actually named string.byte().

Feedback/updates/input is more than welcome.

Brandon


-- 
Brandon Enright
Network Security Analyst
UCSD ACS/Network Operations
bmenrigh () ucsd edu


Attachment: nbstat.nse
Description:


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

Current thread: