mirror of
https://github.com/nmap/nmap.git
synced 2026-01-31 10:39:02 +00:00
Get rid of unnecessary spaces at the end of lines
This commit is contained in:
@@ -61,7 +61,7 @@ _M.NULL = NULL;
|
||||
local function utf8_enc (cp)
|
||||
local result = {};
|
||||
local n, mask;
|
||||
|
||||
|
||||
if cp % 1.0 ~= 0.0 or cp < 0 then
|
||||
-- Only defined for nonnegative integers.
|
||||
error("utf code point defined only for non-negative integers");
|
||||
@@ -80,14 +80,14 @@ local function utf8_enc (cp)
|
||||
else
|
||||
assert(false);
|
||||
end
|
||||
|
||||
|
||||
while n > 1 do
|
||||
result[n] = 0x80 + bit.band(cp, 0x3F);
|
||||
cp = bit.rshift(cp, 6);
|
||||
n = n - 1;
|
||||
end
|
||||
result[1] = mask + cp;
|
||||
|
||||
|
||||
return string.char(unpack(result));
|
||||
end
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ local function debug (level, ...)
|
||||
prefix = prefix .. ":" .. port.number
|
||||
end
|
||||
prefix = prefix .. "] "
|
||||
if prefix ~= "[] " then
|
||||
if prefix ~= "[] " then
|
||||
nmap.log_write("stdout", prefix..format(...))
|
||||
else
|
||||
nmap.log_write("stdout", format(...))
|
||||
@@ -96,7 +96,7 @@ end
|
||||
-- arguments are processed with Lua's <code>string.format</code> function.
|
||||
--
|
||||
-- If known, the output includes some context based information: the script
|
||||
-- identifier and the target ip/port (if there is one). If the debug level is
|
||||
-- identifier and the target ip/port (if there is one). If the debug level is
|
||||
-- at least 2, it also prints the base thread identifier and whether it is a
|
||||
-- worker thread or the master thread.
|
||||
--
|
||||
@@ -115,7 +115,7 @@ function debug4 (...) return debug(4, ...) end
|
||||
function debug5 (...) return debug(5, ...) end
|
||||
|
||||
---
|
||||
-- Deprecated version of debug(), kept for now to prevent the script id from being
|
||||
-- Deprecated version of debug(), kept for now to prevent the script id from being
|
||||
-- printed twice. Scripts should use debug() and not pass SCRIPT_NAME
|
||||
print_debug = function(level, fmt, ...)
|
||||
local l, d = tonumber(level), nmap.debugging();
|
||||
@@ -154,7 +154,7 @@ end
|
||||
---
|
||||
-- Prints a formatted verbosity message if the current verbosity level is greater
|
||||
-- than or equal to a given level.
|
||||
--
|
||||
--
|
||||
-- This is a convenience wrapper around <code>nmap.log_write</code>. The first
|
||||
-- optional numeric argument, <code>level</code>, is used as the verbosity level
|
||||
-- necessary to print the message (it defaults to 1 if omitted). All remaining
|
||||
@@ -179,7 +179,7 @@ function verbose4 (...) return verbose(4, ...) end
|
||||
function verbose5 (...) return verbose(5, ...) end
|
||||
|
||||
---
|
||||
-- Deprecated version of verbose(), kept for now to prevent the script id from being
|
||||
-- Deprecated version of verbose(), kept for now to prevent the script id from being
|
||||
-- printed twice. Scripts should use verbose() and not pass SCRIPT_NAME
|
||||
print_verbose = function(level, fmt, ...)
|
||||
local l, d = tonumber(level), nmap.verbosity();
|
||||
|
||||
Reference in New Issue
Block a user