mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 05:09:14 +00:00
Whitespace/reindent cleanup in NSE. https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
@@ -1834,7 +1834,7 @@ local format_vuln_base = function(vuln_table, showall)
|
||||
local risk_str = ""
|
||||
|
||||
if vuln_table.scores and next(vuln_table.scores) then
|
||||
output_table.scores = vuln_table.scores
|
||||
output_table.scores = vuln_table.scores
|
||||
for score_type, score in pairs(vuln_table.scores) do
|
||||
risk_str = risk_str .. string_format(" %s: %s", score_type, score)
|
||||
end
|
||||
@@ -1858,10 +1858,10 @@ local format_vuln_base = function(vuln_table, showall)
|
||||
output_table.dates = vuln_table.dates
|
||||
if vuln_table.dates.disclosure and
|
||||
next(vuln_table.dates.disclosure) then
|
||||
output_table.disclosure = string_format("%s-%s-%s",
|
||||
vuln_table.dates.disclosure.year,
|
||||
vuln_table.dates.disclosure.month,
|
||||
vuln_table.dates.disclosure.day)
|
||||
output_table.disclosure = string_format("%s-%s-%s",
|
||||
vuln_table.dates.disclosure.year,
|
||||
vuln_table.dates.disclosure.month,
|
||||
vuln_table.dates.disclosure.day)
|
||||
insert(out, string_format(" Disclosure date: %s-%s-%s",
|
||||
vuln_table.dates.disclosure.year,
|
||||
vuln_table.dates.disclosure.month,
|
||||
@@ -1928,7 +1928,7 @@ local format_vuln_base = function(vuln_table, showall)
|
||||
local ref_str = {}
|
||||
for link in pairs(ref_set) do
|
||||
insert(out, string_format(" %s", link))
|
||||
table.insert(ref_str, link)
|
||||
table.insert(ref_str, link)
|
||||
end
|
||||
output_table.refs = ref_str
|
||||
end
|
||||
@@ -2241,10 +2241,10 @@ Report = {
|
||||
insert(output, "VULNERABLE:")
|
||||
for i, vuln_table in ipairs(self.entries.vulns) do
|
||||
local vuln_out, out_t = format_vuln_base(vuln_table)
|
||||
if type(out_t) == "table" then
|
||||
for i, v, k in pairs(out_t) do
|
||||
output_t2[i]=v
|
||||
end
|
||||
if type(out_t) == "table" then
|
||||
for i, v, k in pairs(out_t) do
|
||||
output_t2[i]=v
|
||||
end
|
||||
end
|
||||
if vuln_out then
|
||||
output_table.report = concat(vuln_out, "\n")
|
||||
@@ -2264,10 +2264,10 @@ Report = {
|
||||
end
|
||||
for i, vuln_table in ipairs(self.entries.not_vulns) do
|
||||
local vuln_out, out_t = format_vuln_base(vuln_table, SHOW_ALL)
|
||||
if type(out_t) == "table" then
|
||||
for i, v, k in pairs(out_t) do
|
||||
output_t2[i]=v
|
||||
end
|
||||
if type(out_t) == "table" then
|
||||
for i, v, k in pairs(out_t) do
|
||||
output_t2[i]=v
|
||||
end
|
||||
end
|
||||
if vuln_out then
|
||||
output_table.report = concat(vuln_out, "\n")
|
||||
|
||||
Reference in New Issue
Block a user