mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Re-indent some NSE libraries.
https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
@@ -26,7 +26,7 @@ local b32standard = {
|
||||
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
|
||||
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
|
||||
'Y', 'Z', '2', '3', '4', '5', '6', '7',
|
||||
}
|
||||
}
|
||||
|
||||
local b32dcstandard = {} -- efficency
|
||||
b32dcstandard['A'] = '00000'
|
||||
@@ -192,7 +192,7 @@ function dec(b32data, hexExtend)
|
||||
append(bdataBuf, bpack("B", substr(nbyte, 1, 8)))
|
||||
nbyte = substr(nbyte, 9)
|
||||
end
|
||||
-- pos = pos + 1
|
||||
-- pos = pos + 1
|
||||
end
|
||||
return concat(bdataBuf)
|
||||
end
|
||||
|
||||
@@ -24,7 +24,7 @@ local b64table = {
|
||||
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||
'w', 'x', 'y', 'z', '0', '1', '2', '3',
|
||||
'4', '5', '6', '7', '8', '9', '+', '/'
|
||||
}
|
||||
}
|
||||
|
||||
local b64dctable = {} -- efficency
|
||||
b64dctable['A'] = '000000'
|
||||
@@ -173,7 +173,7 @@ function dec(b64data)
|
||||
append(bdataBuf, bpack("B", substr(nbyte, 1, 8)))
|
||||
nbyte = substr(nbyte, 9)
|
||||
end
|
||||
-- pos = pos + 1
|
||||
-- pos = pos + 1
|
||||
end
|
||||
return concat(bdataBuf)
|
||||
end
|
||||
|
||||
@@ -384,6 +384,6 @@ EIGRP = {
|
||||
end
|
||||
return data
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
return _ENV;
|
||||
return _ENV;
|
||||
|
||||
@@ -46,7 +46,7 @@ local function dbg_err(str,...)
|
||||
stdnse.print_debug("json-ERR:"..str, ...)
|
||||
end
|
||||
|
||||
-- Javascript null representation, see explanation above
|
||||
-- Javascript null representation, see explanation above
|
||||
NULL = {}
|
||||
|
||||
-- See section 2.5 for escapes.
|
||||
@@ -468,8 +468,8 @@ function Json:parseString()
|
||||
else -- Char
|
||||
val = val .. c
|
||||
end
|
||||
end
|
||||
return val
|
||||
end
|
||||
return val
|
||||
end
|
||||
--- Parses json data into an object form
|
||||
-- This is the method you probably want to use if you
|
||||
|
||||
@@ -152,8 +152,8 @@ version_port_or_service = function(ports, services, protos, states)
|
||||
end
|
||||
|
||||
--[[
|
||||
Apache Tomcat HTTP server default ports: 8180 and 8000
|
||||
Litespeed webserver default ports: 8088 and 7080
|
||||
Apache Tomcat HTTP server default ports: 8180 and 8000
|
||||
Litespeed webserver default ports: 8088 and 7080
|
||||
--]]
|
||||
LIKELY_HTTP_PORTS = {
|
||||
80, 443, 631, 7080, 8080, 8088, 5800, 3872, 8180, 8000
|
||||
|
||||
@@ -308,7 +308,7 @@ function concat_iterators (iter1, iter2)
|
||||
end
|
||||
end
|
||||
return iterator
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns a new iterator that filters it's results based on the filter.
|
||||
-- @param iterator Iterator that needs to be filtered
|
||||
@@ -324,6 +324,6 @@ function filter_iterator (iterator, filter)
|
||||
return helper(iterator(command))
|
||||
end
|
||||
return filter
|
||||
end
|
||||
end
|
||||
|
||||
return _ENV;
|
||||
|
||||
@@ -43,7 +43,7 @@ _ENV = stdnse.module("url", stdnse.seeall)
|
||||
|
||||
_VERSION = "URL 1.0"
|
||||
|
||||
--[[ Internal functions --]]
|
||||
--[[ Internal functions --]]
|
||||
|
||||
local function make_set(t)
|
||||
local s = {}
|
||||
@@ -100,7 +100,7 @@ local function absolute_path(base_path, relative_path)
|
||||
end
|
||||
|
||||
|
||||
--[[ External functions --]]
|
||||
--[[ External functions --]]
|
||||
|
||||
---
|
||||
-- Encodes a string into its escaped hexadecimal representation.
|
||||
|
||||
Reference in New Issue
Block a user