mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
stdnse.print_verbose -> stdnse.verbose1
$ sed -i 's/stdnse.print_verbose( *\([0-9]*\) *, *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.verbose\1("\2"/' *.nse
$ sed -i 's/stdnse.print_verbose( *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.verbose1("\1"/' *.nse
and some manual corrections.
This commit is contained in:
@@ -52,7 +52,7 @@ categories = {"broadcast", "safe"}
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ categories = {"broadcast", "safe"}
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -76,11 +76,11 @@ categories = {"discovery", "broadcast", "safe"}
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if nmap.address_family() ~= 'inet' then
|
if nmap.address_family() ~= 'inet' then
|
||||||
stdnse.print_verbose("%s is IPv4 only.", SCRIPT_NAME)
|
stdnse.verbose1("is IPv4 only.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ interfaces.
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if nmap.address_family() ~= 'inet' then
|
if nmap.address_family() ~= 'inet' then
|
||||||
stdnse.print_verbose("%s is IPv4 only.", SCRIPT_NAME)
|
stdnse.verbose1("is IPv4 only.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if ( not(nmap.is_privileged()) ) then
|
if ( not(nmap.is_privileged()) ) then
|
||||||
stdnse.print_verbose("%s not running due to lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running due to lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ categories = {"broadcast", "safe"}
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ categories = {"discovery", "safe", "broadcast"}
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if nmap.address_family() ~= 'inet' then
|
if nmap.address_family() ~= 'inet' then
|
||||||
stdnse.print_verbose("%s is IPv4 only.", SCRIPT_NAME)
|
stdnse.verbose1("is IPv4 only.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
@@ -135,12 +135,12 @@ local getInterface = function(destination)
|
|||||||
local sock = nmap.new_socket()
|
local sock = nmap.new_socket()
|
||||||
local status, err = sock:connect(destination, "12345", "udp")
|
local status, err = sock:connect(destination, "12345", "udp")
|
||||||
if not status then
|
if not status then
|
||||||
stdnse.print_verbose("%s: %s", SCRIPT_NAME, err)
|
stdnse.verbose1("%s", err)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local status, address, _, _, _ = sock:get_info()
|
local status, address, _, _, _ = sock:get_info()
|
||||||
if not status then
|
if not status then
|
||||||
stdnse.print_verbose("%s: %s", SCRIPT_NAME, err)
|
stdnse.verbose1("%s", err)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for _, interface in pairs(nmap.list_interfaces()) do
|
for _, interface in pairs(nmap.list_interfaces()) do
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ prerule = function()
|
|||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
||||||
if not nmap.registry[SCRIPT_NAME].rootfail then
|
if not nmap.registry[SCRIPT_NAME].rootfail then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
end
|
end
|
||||||
nmap.registry[SCRIPT_NAME].rootfail = true
|
nmap.registry[SCRIPT_NAME].rootfail = true
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ categories = {"broadcast", "safe"}
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ hostrule = function(host)
|
|||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
||||||
if not nmap.registry[SCRIPT_NAME].rootfail then
|
if not nmap.registry[SCRIPT_NAME].rootfail then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
end
|
end
|
||||||
nmap.registry[SCRIPT_NAME].rootfail = true
|
nmap.registry[SCRIPT_NAME].rootfail = true
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ hostrule = function(host)
|
|||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
||||||
if not nmap.registry[SCRIPT_NAME].rootfail then
|
if not nmap.registry[SCRIPT_NAME].rootfail then
|
||||||
stdnse.print_verbose("%s lacks privileges.", SCRIPT_NAME )
|
stdnse.verbose1("lacks privileges." )
|
||||||
nmap.registry[SCRIPT_NAME].rootfail = true
|
nmap.registry[SCRIPT_NAME].rootfail = true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ hostrule = function(host)
|
|||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
||||||
if not nmap.registry[SCRIPT_NAME].rootfail then
|
if not nmap.registry[SCRIPT_NAME].rootfail then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
end
|
end
|
||||||
nmap.registry[SCRIPT_NAME].rootfail = true
|
nmap.registry[SCRIPT_NAME].rootfail = true
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ end
|
|||||||
--- Broadcasting on the selected interface
|
--- Broadcasting on the selected interface
|
||||||
-- @param iface table containing interface information
|
-- @param iface table containing interface information
|
||||||
local function broadcast_on_interface(iface)
|
local function broadcast_on_interface(iface)
|
||||||
stdnse.print_verbose("Starting " .. SCRIPT_NAME .. " on interface " .. iface)
|
stdnse.print_verbose1("Starting on interface " .. iface)
|
||||||
|
|
||||||
-- packet counter
|
-- packet counter
|
||||||
local counter = 0
|
local counter = 0
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ action = function( host, port )
|
|||||||
-- Account Locked Out
|
-- Account Locked Out
|
||||||
if not status and response:match("AcceptSecurityContext error, data 775,") then
|
if not status and response:match("AcceptSecurityContext error, data 775,") then
|
||||||
table.insert( valid_accounts, string.format("%s => Valid credentials, account locked", fq_username ) )
|
table.insert( valid_accounts, string.format("%s => Valid credentials, account locked", fq_username ) )
|
||||||
stdnse.print_verbose(2, string.format(" ldap-brute: %s => Valid credentials, account locked", fq_username ))
|
stdnse.verbose2("%s => Valid credentials, account locked", fq_username)
|
||||||
credTable:add(fq_username,password, creds.State.LOCKED_VALID)
|
credTable:add(fq_username,password, creds.State.LOCKED_VALID)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -234,7 +234,7 @@ action = function( host, port )
|
|||||||
-- Login correct, account disabled
|
-- Login correct, account disabled
|
||||||
if not status and response:match("AcceptSecurityContext error, data 533,") then
|
if not status and response:match("AcceptSecurityContext error, data 533,") then
|
||||||
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, account disabled", fq_username, password:len()>0 and password or "<empty>" ) )
|
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, account disabled", fq_username, password:len()>0 and password or "<empty>" ) )
|
||||||
stdnse.print_verbose(2, string.format(" ldap-brute: %s:%s => Valid credentials, account disabled", fq_username, password:len()>0 and password or "<empty>" ))
|
stdnse.verbose2("%s:%s => Valid credentials, account disabled", fq_username, password:len()>0 and password or "<empty>" )
|
||||||
credTable:add(fq_username,password, creds.State.DISABLED_VALID)
|
credTable:add(fq_username,password, creds.State.DISABLED_VALID)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -242,7 +242,7 @@ action = function( host, port )
|
|||||||
-- Login correct, user must change password
|
-- Login correct, user must change password
|
||||||
if not status and response:match("AcceptSecurityContext error, data 773,") then
|
if not status and response:match("AcceptSecurityContext error, data 773,") then
|
||||||
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, password must be changed at next logon", fq_username, password:len()>0 and password or "<empty>" ) )
|
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, password must be changed at next logon", fq_username, password:len()>0 and password or "<empty>" ) )
|
||||||
stdnse.print_verbose(2, string.format(" ldap-brute: %s:%s => Valid credentials, password must be changed at next logon", fq_username, password:len()>0 and password or "<empty>" ))
|
stdnse.verbose2("%s:%s => Valid credentials, password must be changed at next logon", fq_username, password:len()>0 and password or "<empty>")
|
||||||
credTable:add(fq_username,password, creds.State.CHANGEPW)
|
credTable:add(fq_username,password, creds.State.CHANGEPW)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -250,7 +250,7 @@ action = function( host, port )
|
|||||||
-- Login correct, user account expired
|
-- Login correct, user account expired
|
||||||
if not status and response:match("AcceptSecurityContext error, data 701,") then
|
if not status and response:match("AcceptSecurityContext error, data 701,") then
|
||||||
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, account expired", fq_username, password:len()>0 and password or "<empty>" ) )
|
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, account expired", fq_username, password:len()>0 and password or "<empty>" ) )
|
||||||
stdnse.print_verbose(2, string.format(" ldap-brute: %s:%s => Valid credentials, account expired", fq_username, password:len()>0 and password or "<empty>" ))
|
stdnse.verbose2("%s:%s => Valid credentials, account expired", fq_username, password:len()>0 and password or "<empty>")
|
||||||
credTable:add(fq_username,password, creds.State.EXPIRED)
|
credTable:add(fq_username,password, creds.State.EXPIRED)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -258,7 +258,7 @@ action = function( host, port )
|
|||||||
-- Login correct, user account logon time restricted
|
-- Login correct, user account logon time restricted
|
||||||
if not status and response:match("AcceptSecurityContext error, data 530,") then
|
if not status and response:match("AcceptSecurityContext error, data 530,") then
|
||||||
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, account cannot log in at current time", fq_username, password:len()>0 and password or "<empty>" ) )
|
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, account cannot log in at current time", fq_username, password:len()>0 and password or "<empty>" ) )
|
||||||
stdnse.print_verbose(2, string.format(" ldap-brute: %s:%s => Valid credentials, account cannot log in at current time", fq_username, password:len()>0 and password or "<empty>" ))
|
stdnse.verbose2("%s:%s => Valid credentials, account cannot log in at current time", fq_username, password:len()>0 and password or "<empty>")
|
||||||
credTable:add(fq_username,password, creds.State.TIME_RESTRICTED)
|
credTable:add(fq_username,password, creds.State.TIME_RESTRICTED)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -266,7 +266,7 @@ action = function( host, port )
|
|||||||
-- Login correct, user account can only log in from certain workstations
|
-- Login correct, user account can only log in from certain workstations
|
||||||
if not status and response:match("AcceptSecurityContext error, data 531,") then
|
if not status and response:match("AcceptSecurityContext error, data 531,") then
|
||||||
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, account cannot log in from current host", fq_username, password:len()>0 and password or "<empty>" ) )
|
table.insert( valid_accounts, string.format("%s:%s => Valid credentials, account cannot log in from current host", fq_username, password:len()>0 and password or "<empty>" ) )
|
||||||
stdnse.print_verbose(2, string.format(" ldap-brute: %s:%s => Valid credentials, account cannot log in from current host", fq_username, password:len()>0 and password or "<empty>" ))
|
stdnse.verbose2("%s:%s => Valid credentials, account cannot log in from current host", fq_username, password:len()>0 and password or "<empty>")
|
||||||
credTable:add(fq_username,password, creds.State.HOST_RESTRICTED)
|
credTable:add(fq_username,password, creds.State.HOST_RESTRICTED)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -276,7 +276,7 @@ action = function( host, port )
|
|||||||
status = is_valid_credential( socket, context )
|
status = is_valid_credential( socket, context )
|
||||||
if status then
|
if status then
|
||||||
table.insert( valid_accounts, string.format("%s:%s => Valid credentials", fq_username, password:len()>0 and password or "<empty>" ) )
|
table.insert( valid_accounts, string.format("%s:%s => Valid credentials", fq_username, password:len()>0 and password or "<empty>" ) )
|
||||||
stdnse.print_verbose(2, string.format(" ldap-brute: %s:%s => Valid credentials", fq_username, password:len()>0 and password or "<empty>" ) )
|
stdnse.verbose2("%s:%s => Valid credentials", fq_username, password:len()>0 and password or "<empty>")
|
||||||
-- Add credentials for other ldap scripts to use
|
-- Add credentials for other ldap scripts to use
|
||||||
if nmap.registry.ldapaccounts == nil then
|
if nmap.registry.ldapaccounts == nil then
|
||||||
nmap.registry.ldapaccounts = {}
|
nmap.registry.ldapaccounts = {}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ For more information, see:
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running due to lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running due to lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
@@ -146,12 +146,12 @@ local getInterface = function(target)
|
|||||||
local sock = nmap.new_socket()
|
local sock = nmap.new_socket()
|
||||||
local status, err = sock:connect(target, "12345", "udp")
|
local status, err = sock:connect(target, "12345", "udp")
|
||||||
if not status then
|
if not status then
|
||||||
stdnse.print_verbose("%s: %s", SCRIPT_NAME, err)
|
stdnse.verbose1("%s", err)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local status, address, _, _, _ = sock:get_info()
|
local status, address, _, _, _ = sock:get_info()
|
||||||
if not status then
|
if not status then
|
||||||
stdnse.print_verbose("%s: %s", SCRIPT_NAME, err)
|
stdnse.verbose1("%s", err)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for _, interface in pairs(nmap.list_interfaces()) do
|
for _, interface in pairs(nmap.list_interfaces()) do
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ prerule = function()
|
|||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
||||||
if not nmap.registry[SCRIPT_NAME].rootfail then
|
if not nmap.registry[SCRIPT_NAME].rootfail then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
end
|
end
|
||||||
nmap.registry[SCRIPT_NAME].rootfail = true
|
nmap.registry[SCRIPT_NAME].rootfail = true
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -72,11 +72,11 @@ categories = {"discovery", "safe", "broadcast"}
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if nmap.address_family() ~= 'inet' then
|
if nmap.address_family() ~= 'inet' then
|
||||||
stdnse.print_verbose("%s is IPv4 only.", SCRIPT_NAME)
|
stdnse.verbose1("is IPv4 only.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
@@ -226,12 +226,12 @@ local getInterface = function(target)
|
|||||||
local sock = nmap.new_socket()
|
local sock = nmap.new_socket()
|
||||||
local status, err = sock:connect(target, "12345", "udp")
|
local status, err = sock:connect(target, "12345", "udp")
|
||||||
if not status then
|
if not status then
|
||||||
stdnse.print_verbose("%s: %s", SCRIPT_NAME, err)
|
stdnse.verbose1("%s", err)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local status, address, _, _, _ = sock:get_info()
|
local status, address, _, _, _ = sock:get_info()
|
||||||
if not status then
|
if not status then
|
||||||
stdnse.print_verbose("%s: %s", SCRIPT_NAME, err)
|
stdnse.verbose1("%s", err)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for _, interface in pairs(nmap.list_interfaces()) do
|
for _, interface in pairs(nmap.list_interfaces()) do
|
||||||
|
|||||||
@@ -102,11 +102,11 @@ FWD_CODE = {
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if nmap.address_family() ~= 'inet' then
|
if nmap.address_family() ~= 'inet' then
|
||||||
stdnse.print_verbose("%s is IPv4 only.", SCRIPT_NAME)
|
stdnse.verbose1("is IPv4 only.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
@@ -214,7 +214,7 @@ local traceParse = function(data)
|
|||||||
if index >= #data then
|
if index >= #data then
|
||||||
break
|
break
|
||||||
elseif #data - index < 31 then
|
elseif #data - index < 31 then
|
||||||
stdnse.print_verbose("%s malformed traceroute response.", SCRIPT_NAME)
|
stdnse.verbose1("malformed traceroute response.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -303,12 +303,12 @@ local getInterface = function(target)
|
|||||||
local sock = nmap.new_socket()
|
local sock = nmap.new_socket()
|
||||||
local status, err = sock:connect(target, "12345", "udp")
|
local status, err = sock:connect(target, "12345", "udp")
|
||||||
if not status then
|
if not status then
|
||||||
stdnse.print_verbose("%s: %s", SCRIPT_NAME, err)
|
stdnse.verbose1("%s", err)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local status, address, _, _, _ = sock:get_info()
|
local status, address, _, _, _ = sock:get_info()
|
||||||
if not status then
|
if not status then
|
||||||
stdnse.print_verbose("%s: %s", SCRIPT_NAME, err)
|
stdnse.verbose1("%s", err)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for _, interface in pairs(nmap.list_interfaces()) do
|
for _, interface in pairs(nmap.list_interfaces()) do
|
||||||
@@ -330,7 +330,7 @@ action = function()
|
|||||||
|
|
||||||
-- Source address from which to traceroute
|
-- Source address from which to traceroute
|
||||||
if not fromip then
|
if not fromip then
|
||||||
stdnse.print_verbose("%s: A source IP must be provided through fromip argument.", SCRIPT_NAME)
|
stdnse.verbose1("A source IP must be provided through fromip argument.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ hostrule = function(host)
|
|||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
||||||
if not nmap.registry[SCRIPT_NAME].rootfail then
|
if not nmap.registry[SCRIPT_NAME].rootfail then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
end
|
end
|
||||||
nmap.registry[SCRIPT_NAME].rootfail = true
|
nmap.registry[SCRIPT_NAME].rootfail = true
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ hostrule = function(host)
|
|||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
|
||||||
if not nmap.registry[SCRIPT_NAME].rootfail then
|
if not nmap.registry[SCRIPT_NAME].rootfail then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
end
|
end
|
||||||
nmap.registry[SCRIPT_NAME].rootfail = true
|
nmap.registry[SCRIPT_NAME].rootfail = true
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ local function test_ccs_injection(host, port, version)
|
|||||||
repeat
|
repeat
|
||||||
status, response, err = tls.record_buffer(s, response, i)
|
status, response, err = tls.record_buffer(s, response, i)
|
||||||
if err == "TIMEOUT" or not status then
|
if err == "TIMEOUT" or not status then
|
||||||
stdnse.print_verbose(1, "No response from server: %s", err)
|
stdnse.verbose1("No response from server: %s", err)
|
||||||
s:close()
|
s:close()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ local arg_timeout = stdnse.parse_timespec(stdnse.get_script_args(SCRIPT_NAME ..
|
|||||||
|
|
||||||
prerule = function()
|
prerule = function()
|
||||||
if ( not(nmap.is_privileged()) ) then
|
if ( not(nmap.is_privileged()) ) then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ local arg_iface = nmap.get_interface() or stdnse.get_script_args(SCRIPT_NAME ..
|
|||||||
prerule = function()
|
prerule = function()
|
||||||
local has_interface = ( arg_iface ~= nil )
|
local has_interface = ( arg_iface ~= nil )
|
||||||
if not nmap.is_privileged() then
|
if not nmap.is_privileged() then
|
||||||
stdnse.print_verbose("%s not running for lack of privileges.", SCRIPT_NAME)
|
stdnse.verbose1("not running for lack of privileges.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if ( not(has_interface) ) then
|
if ( not(has_interface) ) then
|
||||||
stdnse.print_verbose("%s no network interface was supplied, aborting ...", SCRIPT_NAME)
|
stdnse.verbose1("no network interface was supplied, aborting ...")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user