1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Re-indent some scripts. Whitespace-only commit

https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
dmiller
2014-01-31 13:02:29 +00:00
parent 64fb5b3482
commit d36c08dcf5
137 changed files with 3977 additions and 3977 deletions

View File

@@ -58,29 +58,29 @@ local function fail(err) return ("\n ERROR: %s"):format(err or "") end
action = function(host, port)
local response = http.get(host, port, ("/secure?command=browse&dir=%s"):format(arg_dir))
local response = http.get(host, port, ("/secure?command=browse&dir=%s"):format(arg_dir))
if ( response.status ~= 200 or not(response.body) or 0 == #response.body ) then
if ( response.status == 401 ) then
return fail("Server requires authentication")
else
return
end
end
if ( response.status ~= 200 or not(response.body) or 0 == #response.body ) then
if ( response.status == 401 ) then
return fail("Server requires authentication")
else
return
end
end
local status, parsed = json.parse(response.body)
if ( not(status) ) then
return fail("Failed to parse response")
end
local status, parsed = json.parse(response.body)
if ( not(status) ) then
return fail("Failed to parse response")
end
if ( parsed.errorMessage ) then
return fail(parsed.errorMessage)
end
if ( parsed.errorMessage ) then
return fail(parsed.errorMessage)
end
local output = {}
for _, entry in pairs(parsed.files or {}) do
table.insert(output,entry.path)
end
table.sort(output, function(a,b) return a<b end)
return stdnse.format_output(true, output)
local output = {}
for _, entry in pairs(parsed.files or {}) do
table.insert(output,entry.path)
end
table.sort(output, function(a,b) return a<b end)
return stdnse.format_output(true, output)
end