Change explicit X==true to X
Some checks are pending
nmap multiplatform autobuilds / build (arm64, gcc, ubuntu-latest-gcc-arm64, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, freebsd-15-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-15-clang, macos-15) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, macos-26-clang, macos-26) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, netbsd-10-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, openbsd-7-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, solaris-11-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (clang, ubuntu-latest-clang, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (egcc, openbsd-7-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, freebsd-15-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, netbsd-10-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, solaris-11-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (gcc, ubuntu-latest-gcc, ubuntu-latest) (push) Waiting to run
nmap multiplatform autobuilds / build (msvc, windows-latest-msvc, windows-latest) (push) Waiting to run

This commit is contained in:
dmiller 2026-07-08 00:42:18 +00:00
parent ce2b1e6d39
commit b47e7f07ef
23 changed files with 60 additions and 59 deletions

View file

@ -261,7 +261,7 @@ local ospfReplyDBDesc = function(interface, mac_dst, db_desc_in)
local db_desc_out = ospf.OSPF.DBDescription:new()
db_desc_out = ospfSetHeader(db_desc_in, db_desc_out)
if db_desc_in.init == true then
if db_desc_in.init then
db_desc_out.init = false
db_desc_out.more = db_desc_in.more
db_desc_out.master = false

View file

@ -170,7 +170,7 @@ action = function()
local results = { ["name"] = ("Available authentication methods with identity=\"%s\" on interface %s"):format(identity.name, iface.device) }
for i,v in pairs(identity.auth) do
if v== true then
if v then
table.insert(results, 1, ("%-8s %s"):format(tostring(v), eap.eap_str[i] or "unassigned" ))
else
table.insert(results, ("%-8s %s"):format(tostring(v), eap.eap_str[i] or "unassigned" ))

View file

@ -76,7 +76,7 @@ local callback_url = function(host, port, target, callback_variable)
local status, func
status, func = checkjson(response.body)
if status == true then
if status then
if func == value then
report = "Completely controllable from URL"
else
@ -102,7 +102,7 @@ local callback_bruteforce = function(host, port, target)
local status, func
status, func = checkjson(response.body)
if status == true then
if status then
report = callback_url(host, port, target, p)
if report ~= nil then
report = string.format("%s\t%s", target, report)
@ -152,7 +152,7 @@ action = function(host, port)
local status, func, report
status, func = checkjson(r.response.body)
if status == true then
if status then
--We have found JSONP endpoint
--Put it inside a returnable table.
output_str = string.format("%s\n%s", output_str, target)

View file

@ -612,7 +612,7 @@ action = function(host)
status, reason = conficker_check(host.ip, port, "tcp")
checks = checks + 1
if(status == true) then
if status then
table.insert(response, string.format("Check %d (port %d/%s): INFECTED (%s)", checks, port, "tcp", reason))
count = count + 1
else
@ -627,7 +627,7 @@ action = function(host)
status, reason = conficker_check(host.ip, port, "udp")
checks = checks + 1
if(status == true) then
if status then
table.insert(response, string.format("Check %d (port %d/%s): INFECTED (%s)", checks, port, "udp", reason))
count = count + 1
else

View file

@ -315,7 +315,7 @@ local function check_login(hostinfo, username, password, logintype)
status, err = smb.start_session(smbstate, smb.get_overrides(username, domain, password, nil, logintype), false)
end
if(status == true) then
if status then
if(smbstate['is_guest'] == 1) then
result = results.GUEST_ACCESS
else

View file

@ -147,7 +147,7 @@ local function winreg_enum_rids(host)
repeat
local status, enumkey_result = msrpc.winreg_enumkey(smbstate, openhku_result['handle'], i, "")
if(status == true) then
if status then
local status, openkey_result
local element = {}

View file

@ -191,7 +191,7 @@ action = function(host)
local response = {}
if(result['status-os'] == true) then
if result['status-os'] then
local osdetails = {}
osdetails['name'] = "OS Details"
table.insert(osdetails, string.format("%s %s (%s %s build %s)", result['productname'], result['csdversion'], result['producttype'], result['currentversion'], result['currentbuildnumber']))
@ -228,7 +228,7 @@ action = function(host)
table.insert(response, browsers)
return stdnse.format_output(true, response)
elseif(result['status-productname'] == true) then
elseif result['status-productname'] then
local osdetails = {}
osdetails['name'] = 'OS Details'

View file

@ -122,7 +122,7 @@ function check_conficker(host)
-- Try checking a valid string to find Conficker.D
local netpathcanonicalize_result, error_result
status, netpathcanonicalize_result, error_result = msrpc.srvsvc_netpathcanonicalize(smbstate, host.ip, "\\")
if(status == true and netpathcanonicalize_result['can_path'] == 0x5c45005c) then
if status and netpathcanonicalize_result['can_path'] == 0x5c45005c then
msrpc.stop_smb(smbstate)
return true, INFECTED2
end

View file

@ -27,7 +27,7 @@ hostrule = function(host)
stdnse.debug1("is IPv4 compatible only.")
return false
end
if host.directly_connected == true and
if host.directly_connected and
host.mac_addr ~= nil and
host.mac_addr_src ~= nil and
host.interface ~= nil then
@ -70,7 +70,7 @@ do_test = function(dnet, pcap, host, test)
while status and test ~= check(layer2) do
status, length, layer2, layer3 = pcap:pcap_receive()
end
if status == true then
if status then
-- the basic idea, was to inform user about time, when we got packet
-- so that 1 would mean (0-10ms), 2=(10-40ms) and 3=(40ms-90ms)
-- but when we're running this tests on macs, first test is always 2.

View file

@ -120,7 +120,7 @@ action = function()
stdnse.debug1("Got IP addresses %s", table.concat(addresses, " "))
for _, addr in ipairs(addresses) do
if check_if_valid(addr) == true then
if check_if_valid(addr) then
if not unique_addresses[addr] then
unique_addresses[addr] = true
table.insert(all_addresses, addr)
@ -137,7 +137,7 @@ action = function()
sock:pcap_close()
end
if target.ALLOW_NEW_TARGETS == true then
if target.ALLOW_NEW_TARGETS then
if nmap.address_family() == 'inet6' then
for _,v in pairs(all_addresses) do
if v:match(':') then

View file

@ -104,7 +104,7 @@ local generate_filenames = function(host)
::next_filename::
end
if cisco == true then
if cisco then
local cisco_address_confg_filenames = generate_cisco_address_confg(host.ip)
return array_concat(default_filenames, cisco_address_confg_filenames)
end

View file

@ -146,7 +146,7 @@ function get_results(what, vers, type)
status, vulns = json.parse(response.body)
if status == true then
if status then
if vulns.result == "OK" then
return make_links(vulns)
end