Often two (or more) scripts using the same library would
overwrite the globals each was using. This would result
in (at best) an error or (at worst) a deadlock.
The patch changes the global accesses to local.
which makes the 'to' value in a for .. to loop of type 'nil' - causing:
nselib/dns.lua:54: 'for' limit must be a number
stack traceback:
nselib/dns.lua:54: in function 'sendPackets'
nselib/dns.lua:194: in function 'query'
otherwise there is an assertion failure trying to insert a nil into an output
table in tab.lua. Increase the maximum number of message compression pointers
we will follow in dns.lua from 3 to 10, because Brandon found a server that
used 4..
avoids an infinite recursion bug present in the old decoder. I raised the
number of compression pointers that dns.decStr will follow from 1 to 3 because
I found a server that sent 2.
license" to "Same as Nmap--See http://nmap.org/book/man-legal.html" like
scripts commonly use. I added the field to some modules I know to be under the
Nmap license: bin, datafiles, dns, nmap, unpwdb. I left alone bin, bit, pcre,
and url, which come from outside sources.
INFO processing file `nselib/datafiles.lua'
ERROR undefined handler for tag `type'
INFO processing file `nselib/dns.lua'
ERROR undefined handler for tag `result'
ERROR undefined handler for tag `result'
INFO processing file `nselib/netbios.lua'
ERROR undefined handler for tag `returns'
INFO processing file `nselib/snmp.lua'
ERROR undefined handler for tag `result'
INFO processing file `scripts/SSLv2-support.nse'
ERROR undefined handler for tag `ouput'
Removed a @see tag which refers to Lua's string.format rather than to NSE docs:
INFO generating file `docs/modules/stdnse.html'
ERROR unresolved reference to symbol `string.format'
http, ipOps, listop, and match. This is mainly merging the best documentation
from the module source and scripting.xml into the module, with the aim of
making the source code the canonical source for module documentation.
Attached corrects answerFetcher[types.TXT]() in dns.lua which inserts
v.data into answers only if v.domain is present - I believe the test
should be for v.data. This was preventing TXT answers from being
returned from dns.query() with the retAll option.