diff --git a/CHANGELOG b/CHANGELOG index 417c99686..7defc43d3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,11 @@ #Nmap Changelog ($Id$); -*-text-*- +o Update the included libpcap to 1.9.0. [Daniel Miller] + +o [NSE][GH#1544] Fix a logic error that resulted in scripts not honoring the + smbdomain script-arg when the target provided a domain in the NTLM challenge. + [Daniel Miller] + o [Nsock][GH#1543] Avoid a crash (Protocol not supported) caused by trying to reconnect with SSLv2 when an error occurs during DTLS connect. [Daniel Miller] diff --git a/nselib/ajp.lua b/nselib/ajp.lua index cc4822123..ab1938296 100644 --- a/nselib/ajp.lua +++ b/nselib/ajp.lua @@ -414,7 +414,7 @@ Helper = { if ( status and result.status == 401 and result.headers['www-authenticate'] ) then local auth = self:getOption(options, "auth") - if ( not(auth) or not(auth.username) and not(auth.password) ) then + if not(auth and auth.username and auth.password) then stdnse.debug2("No authentication information") return status, result end diff --git a/nselib/brute.lua b/nselib/brute.lua index f50f19986..84077012e 100644 --- a/nselib/brute.lua +++ b/nselib/brute.lua @@ -1094,7 +1094,7 @@ Engine = { -- should we stop if thread_count <= 0 then - if self.initial_accounts_exhausted and #self.retry_accounts == 0 or self.terminate_all then + if (self.initial_accounts_exhausted and #self.retry_accounts == 0) or self.terminate_all then break else -- there are some accounts yet to be checked, so revive the engine diff --git a/nselib/data/http-devframework-fingerprints.lua b/nselib/data/http-devframework-fingerprints.lua index f0fc180bf..9effa7d69 100644 --- a/nselib/data/http-devframework-fingerprints.lua +++ b/nselib/data/http-devframework-fingerprints.lua @@ -300,8 +300,8 @@ tools = { Django = { rapidDetect = function(host, port) end, consumingDetect = function(page, path) - if page and string.find(page, "content=[\"']MediaWiki") or - string.find(page, "/mediawiki/") then + if page and (string.find(page, "content=[\"']MediaWiki") or + string.find(page, "/mediawiki/")) then return "MediaWiki detected. Found common traces on " .. page end end diff --git a/nselib/dns.lua b/nselib/dns.lua index 566176a57..ba00d0aec 100644 --- a/nselib/dns.lua +++ b/nselib/dns.lua @@ -1498,8 +1498,8 @@ function update(dname, options) flags.RD = false flags.OC1, flags.OC2, flags.OC3, flags.OC4 = false, true, false, true - -- If ttl is zero and updata is string and zero length or nil, assume delete record - if ( ttl == 0 and ( ( type(updata) == "string" and #updata == 0 ) or not(updata) ) ) then + -- If ttl is zero and updata is nil or a string of zero length, assume delete record + if ttl == 0 and (not updata or (type(updata) == "string" and #updata == 0)) then class = CLASS.ANY updata = "" if ( types.MX == dtype and not(options.zone) ) then zone=dname end diff --git a/nselib/url.lua b/nselib/url.lua index fd95ff0f8..ea982d298 100644 --- a/nselib/url.lua +++ b/nselib/url.lua @@ -96,7 +96,7 @@ local function absolute_path(base_path, relative_path) for s in fixdots(path):gmatch("[^/]*") do if s == "." then -- ignore elseif s == ".." then -- remove the previous segment - if #segs > 1 or #segs == 1 and segs[#segs] ~= "" then + if #segs > 1 or (#segs == 1 and segs[#segs] ~= "") then table.remove(segs) end else -- add a regular segment, possibly empty