Lua 5.3 adds several awesome features of particular interest to nmap including
bitwise operators and integers, a utf8 library, and standard binary pack/unpack
functions.
In addition to adding Lua 5.3, this branch changes:
o Complete removal of the NSE bit library (in C), It has been replaced with
a new Lua library wrapping Lua 5.3's bit-wise operators.
o Complete removal of the NSE bin library (in C). It has been replaced with a
new Lua library wrapping Lua 5.3's string.pack|unpack functions.
o The bin.pack "B" format specifier (which has never worked correctly) is
unimplemented. All scripts/libraries which use it have been updated. Most
usage of this option was to allow string based bit-wise operations which are no
longer necessary now that Lua 5.3 provides integers and bit-wise operators.
o The base32/base64 libraries have been reimplemented using Lua 5.3's new
bitwise operators. (This library was the main user of the bin.pack "B" format
specifier.)
o A new "bits" library has been added for common bit hacks. Currently only has
a reverse function.
Thanks to David Fifield, Daniel Miller, Jacek Wielemborek, and Paulino
Calderon for testing this branch.
This function will format a MAC address as colon-separated hex bytes.
It's really very simple: stdnse.tohex(mac, {separator=":"})
This commit updates all the instances I could find of the varying
convoluted attempts at performing this conversion.
commit 7c26e4de2ab365a30fe6e91f3a531eb38c8dfdba
Author: Daniel Miller <bonsaiviking@gmail.com>
Date: Tue Aug 7 16:36:54 2012 -0500
Fix indentation on netbios.lua (no code change)
commit 47dc3e32e6b47bd80620cfbc54e7590193dd0c1a
Author: Daniel Miller <bonsaiviking@gmail.com>
Date: Tue Jul 31 16:42:27 2012 -0500
Make smbauth.lua use host, not nmap, registry
commit 3738f8e6d551a1260463609d8cda86918843a372
Author: Daniel Miller <bonsaiviking@gmail.com>
Date: Tue Jul 31 16:35:45 2012 -0500
Make netbios.lua use host registry. Functions now can take host table or IP
commit 031cadb9d407ab7fd43aaddffda1a89c24cbdd45
Author: Daniel Miller <bonsaiviking@gmail.com>
Date: Tue Jul 31 15:54:12 2012 -0500
Remove mac-geolocation info from snmp-interfaces
commit 2218dbaf8ffd4a33de2bc028def9be7301dfb3a2
Author: Daniel Miller <bonsaiviking@gmail.com>
Date: Tue Jul 31 15:52:36 2012 -0500
Make path-mtu.nse use host, not nmap, registry
commit 5a3d006bdb9cd3e981a8e753c92b5ade5059a29b
Author: Daniel Miller <bonsaiviking@gmail.com>
Date: Tue Jul 31 15:51:53 2012 -0500
Make cvs-* scripts use host, not nmap, registry
Scripts no longer need to implement caching of datafiles tables in the
registry, since the datafiles.lua library keeps its own cache in the
registry. A side-effect is that scripts should not change the tables
returned by datafiles.parse_{protocols,rpc,services,mac_prefixes}(), as
doing so will affect all other scripts that use those functions.
snmp-interfaces.host into the prerule and out of the action. Otherwise,
being default, this is the only script that runs during the prescan by
default.
socket:connect(host.ip, port.number)
socket:connect(host.ip, port.number, port.protocol)
to this:
socket:connect(host, port)
connect can take host and port tables now, and the default protocol is
taken from the port table if possible.