mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Add clarifying parentheses to complex boolean statements as needed.
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user