Nmap Development mailing list archives
Re: Completed Lua 5.3 upgrade!
From: Daniel Miller <bonsaiviking () gmail com>
Date: Sun, 26 Jun 2016 07:16:58 -0500
A couple more... 1. nmap-lua53/nselib/bin.lua:91: attempt to index a number value (field '?') stack traceback: /home/miller/nmap/nmap-lua53/nselib/bin.lua:91: in function </home/miller/nmap/nmap-lua53/nselib/bin.lua:78> [C]: in function 'string.gsub' /home/miller/nmap/nmap-lua53/nselib/bin.lua:135: in function 'bin.pack' /home/miller/nmap/nmap-lua53/nselib/pgsql.lua:525: in field 'sendStartup' /home/miller/nmap/nmap-lua53/nselib/pgsql.lua:610: in function 'pgsql.detectVersion' /home/miller/nmap/nmap-lua53/scripts/pgsql-brute.nse:89: in function </home/miller/nmap/nmap-lua53/scripts/pgsql-brute.nse:72> (...tail calls...) The line is: data = bin.pack(">IzzzzH", proto_ver, "user", user, "database", database, 0) So we could probably change the "H" specifier to "x", but there's still a bug somewhere. 2. nmap-lua53/nselib/stdnse.lua:87: bad argument #2 to 'format' (number has no integer representation) stack traceback: [C]: in function 'string.format' /home/miller/nmap/nmap-lua53/nselib/stdnse.lua:87: in function 'stdnse.debug' (...tail calls...) .../miller/nmap/nmap-lua53/scripts/http-slowloris-check.nse:153: in function <.../miller/nmap/nmap-lua53/scripts/http-slowloris-check.nse:67> (...tail calls...) Line is: local diff = TimeWith - TimeWithout stdnse.debug1("Time difference is: %d",diff) Not sure what's wrong here, since both values come from nmap.clock(), which should be a Unix timestamp. The difference should be easy to represent as an integer. This might be a bug in the script and not really a problem with Lua 5.3 integration; please let me know. Patrick, I just spotted a couple more. 1. The bin.pack function is choking on this line in wdb-version: return packet .. bin.pack(">S2", 0xffff, sum) .. wdbwrapper .. data giving this error: nmap-lua53/nselib/bin.lua:136: bad argument #2 to 'pack' (unsigned overflow) stack traceback: [C]: in function 'string.pack' /home/miller/nmap/nmap-lua53/nselib/bin.lua:136: in function 'bin.pack' /home/miller/nmap/nmap-lua53/scripts/wdb-version.nse:88: in upvalue 'request' /home/miller/nmap/nmap-lua53/scripts/wdb-version.nse:172: in function </home/miller/nmap/nmap-lua53/scripts/wdb-version.nse:163> (...tail calls...) Now, I would do this differently if I were writing the script today, but I really don't see why using the "S" template to pack a literal 0xffff is resulting in an overflow. If it were a signed template, I would understand. 2. Not sure what's wrong with this one: NSE: dns-nsid against 72.14.177.12:53.0 threw an error! /home/miller/nmap/nmap-lua53/nselib/bin.lua:112: attempt to get length of a nil value (field '?') stack traceback: /home/miller/nmap/nmap-lua53/nselib/bin.lua:112: in function </home/miller/nmap/nmap-lua53/nselib/bin.lua:78> [C]: in function 'string.gsub' /home/miller/nmap/nmap-lua53/nselib/bin.lua:135: in function 'bin.pack' /home/miller/nmap/nmap-lua53/nselib/dns.lua:857: in upvalue 'encodeAdditional' /home/miller/nmap/nmap-lua53/nselib/dns.lua:897: in function 'dns.encode' /home/miller/nmap/nmap-lua53/nselib/dns.lua:374: in function 'dns.query' /home/miller/nmap/nmap-lua53/scripts/dns-nsid.nse:79: in function </home/miller/nmap/nmap-lua53/scripts/dns-nsid.nse:76> (...tail calls...) 3. base64.dec is less tolerant of trailing whitespace (a \r\n sequence in this case, I think): /home/miller/nmap/nmap-lua53/nselib/base64.lua:118: invalid encoding: input is not divisible by 4 stack traceback: [C]: in function 'error' /home/miller/nmap/nmap-lua53/nselib/base64.lua:118: in function 'base64.dec' /home/miller/nmap/nmap-lua53/scripts/smtp-ntlm-info.nse:137: in function </home/miller/nmap/nmap-lua53/scripts/smtp-ntlm-info.nse:85> (...tail calls...) 4. Port numbers in the THREAD_AGAINST are being output as floats with a trailing ".0". We should output them as integers instead. Dan On Sat, Jun 25, 2016 at 12:25 PM, Patrick Donnelly <batrick () batbytes com> wrote:
On Fri, Jun 17, 2016 at 8:43 PM, Patrick Donnelly <batrick () batbytes com> wrote:On Wed, Jun 8, 2016 at 9:31 PM, Patrick Donnelly <batrick () batbytes com>wrote:Without further ado, here's the branch: https://github.com/batrick/nmap/tree/nse-lua53If there are no questions/comments/complaints/objections, I'd like to merge the branch sometime around next Friday. All feedback is still welcome!I've incorporated Daniel's suggestions. The branch is now in svn: https://svn.nmap.org/nmap-exp/patrick/nse-lua53 Last call for comments. I plan to merge into /nmap tomorrow. -- Patrick Donnelly _______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
_______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: Completed Lua 5.3 upgrade!, (continued)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 18)
- Re: Completed Lua 5.3 upgrade! Daniel Miller (Jun 18)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 18)
- Re: Completed Lua 5.3 upgrade! Daniel Miller (Jun 18)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 18)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 18)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 25)
- Re: Completed Lua 5.3 upgrade! Jacek Wielemborek (Jun 25)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 26)
- Re: Completed Lua 5.3 upgrade! Daniel Miller (Jun 25)
- Re: Completed Lua 5.3 upgrade! Daniel Miller (Jun 26)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 26)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 26)
- Re: Completed Lua 5.3 upgrade! Paulino Calderon (Jun 25)
- Re: Completed Lua 5.3 upgrade! Patrick Donnelly (Jun 26)