1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 00:19:01 +00:00

Remove trailing whitespace in lua files

Whitespace is not significant, so this should not be a problem.
https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
dmiller
2014-01-23 21:51:58 +00:00
parent 86ac3c0a19
commit 620f9fdb34
499 changed files with 11134 additions and 11134 deletions

View File

@@ -42,7 +42,7 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"default", "discovery", "external", "safe"}
--- Performs the custom test, with user's arguments
--- Performs the custom test, with user's arguments
-- @param host The host table
-- @param port The port table
-- @param test_url The url to request
@@ -56,7 +56,7 @@ local function custom_test(host, port, test_url, pattern)
local response = {}
-- strip hostname
if not string.match(test_url, "^http://.*") then
if not string.match(test_url, "^http://.*") then
test_url = "http://" .. test_url
stdnse.print_debug("URL missing scheme. URL concatenated to http://")
end
@@ -71,8 +71,8 @@ local function custom_test(host, port, test_url, pattern)
fstatus = status4 or status5
if(cstatus4) then response[#response+1]="socks4" end
if(cstatus5) then response[#response+1]="socks5" end
if(fstatus) then return fstatus, response end
if(fstatus) then return fstatus, response end
-- Nothing works...
if not (cstatus4 or cstatus5) then
return false, nil
@@ -101,7 +101,7 @@ local function default_test(host, port)
local get_r4, get_r5
local methods
local response = {}
local test_url = "/"
local hostname = "www.google.com"
local pattern = "^server: gws"
@@ -113,13 +113,13 @@ local function default_test(host, port)
if(cstatus5) then response[#response+1]="socks5" end
if(fstatus) then return fstatus, response end
-- if we receive a invalid response, but with a valid
-- if we receive a invalid response, but with a valid
-- response code, we should make a next attempt.
-- if we do not receive any valid status code,
-- there is no reason to keep testing... the proxy is probably not open
if not (cstatus4 or cstatus5) then return false, nil end
stdnse.print_debug("Test 1 - Google Web Server: Received valid status codes, but pattern does not match")
test_url = "/"
hostname = "www.wikipedia.org"
pattern = "wikimedia"
@@ -132,7 +132,7 @@ local function default_test(host, port)
if not (cstatus4 or cstatus5) then return false, nil end
stdnse.print_debug("Test 2 - Wikipedia.org: Received valid status codes, but pattern does not match")
local redir_check_get = get_r4 or get_r5
test_url = "/"