mirror of
https://github.com/nmap/nmap.git
synced 2026-02-01 19:19:09 +00:00
Use a more straightforward return style in script rules. Instead of
if cond then return true else return false end just do return cond
This commit is contained in:
@@ -51,18 +51,12 @@ hostrule = function(host)
|
||||
local port_u137 = nmap.get_port_state(host,
|
||||
{number=137, protocol="udp"})
|
||||
|
||||
if (
|
||||
(port_t135 ~= nil and port_t135.state == "open") or
|
||||
return (port_t135 ~= nil and port_t135.state == "open") or
|
||||
(port_t139 ~= nil and port_t139.state == "open") or
|
||||
(port_t445 ~= nil and port_t445.state == "open") or
|
||||
(port_u137 ~= nil and
|
||||
(port_u137.state == "open" or
|
||||
port_u137.state == "open|filtered")))
|
||||
then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
port_u137.state == "open|filtered"))
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user