mirror of
https://github.com/nmap/nmap.git
synced 2026-10-08 06:12:23 +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:
parent
f4b970f889
commit
85deff9ede
16 changed files with 21 additions and 127 deletions
|
|
@ -60,15 +60,7 @@ require 'smb'
|
|||
|
||||
-- Check whether or not this script should be run.
|
||||
hostrule = function(host)
|
||||
|
||||
local port = smb.get_port(host)
|
||||
|
||||
if(port == nil) then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
|
||||
return smb.get_port(host) ~= nil
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue