diff --git a/scripts/ipidseq.nse b/scripts/ipidseq.nse index 0db1427b9..9badb4f12 100644 --- a/scripts/ipidseq.nse +++ b/scripts/ipidseq.nse @@ -186,14 +186,14 @@ local setreg = function(host, port) end hostrule = function(host) - if not nmap.is_privileged() then - nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}; - if not nmap.registry[SCRIPT_NAME].rootfail then - stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME); - end - nmap.registry[SCRIPT_NAME].rootfail = true; - return nil; - end + if not nmap.is_privileged() then + nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {} + if not nmap.registry[SCRIPT_NAME].rootfail then + stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME) + end + nmap.registry[SCRIPT_NAME].rootfail = true + return nil + end if nmap.address_family() ~= 'inet' then stdnse.print_debug("%s is IPv4 compatible only.", SCRIPT_NAME) diff --git a/scripts/path-mtu.nse b/scripts/path-mtu.nse index 4e0b791c1..04c99a760 100644 --- a/scripts/path-mtu.nse +++ b/scripts/path-mtu.nse @@ -267,14 +267,14 @@ local setreg = function(host, proto, port) end hostrule = function(host) - if not nmap.is_privileged() then - nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}; - if not nmap.registry[SCRIPT_NAME].rootfail then - stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME); - end - nmap.registry[SCRIPT_NAME].rootfail = true; - return nil; - end + if not nmap.is_privileged() then + nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {} + if not nmap.registry[SCRIPT_NAME].rootfail then + stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME) + end + nmap.registry[SCRIPT_NAME].rootfail = true + return nil + end if nmap.address_family() ~= 'inet' then stdnse.print_debug("%s is IPv4 compatible only.", SCRIPT_NAME) diff --git a/scripts/qscan.nse b/scripts/qscan.nse index 4753bbb58..804c8237c 100644 --- a/scripts/qscan.nse +++ b/scripts/qscan.nse @@ -364,14 +364,14 @@ local setreg = function(host, ports) end hostrule = function(host) - if not nmap.is_privileged() then - nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}; - if not nmap.registry[SCRIPT_NAME].rootfail then - stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME); - end - nmap.registry[SCRIPT_NAME].rootfail = true; - return nil; - end + if not nmap.is_privileged() then + nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {} + if not nmap.registry[SCRIPT_NAME].rootfail then + stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME) + end + nmap.registry[SCRIPT_NAME].rootfail = true + return nil + end local numopen, numclosed = NUMOPEN, NUMCLOSED