mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Correct function name for rand.random.alpha. Closes #1449
This commit is contained in:
@@ -65,7 +65,7 @@ end
|
|||||||
--Checks if the callback function is controllable from URL
|
--Checks if the callback function is controllable from URL
|
||||||
local callback_url = function(host, port, target, callback_variable)
|
local callback_url = function(host, port, target, callback_variable)
|
||||||
local path, response, report
|
local path, response, report
|
||||||
local value = rand.rand_alpha(8)
|
local value = rand.random_alpha(8)
|
||||||
if callback_variable == nil then
|
if callback_variable == nil then
|
||||||
callback_variable = "callback"
|
callback_variable = "callback"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ servers to remote users who send carefully crafted requests.]],
|
|||||||
|
|
||||||
-- Take a reference chrono for a 404
|
-- Take a reference chrono for a 404
|
||||||
local start = os.time(os.date('*t'))
|
local start = os.time(os.date('*t'))
|
||||||
local random_page = rand.rand_alpha(20)
|
local random_page = rand.random_alpha(20)
|
||||||
local reference = http.get(host,port,("%s/%s.htm"):format(prefix,random_page))
|
local reference = http.get(host,port,("%s/%s.htm"):format(prefix,random_page))
|
||||||
local chrono_404 = os.time(os.date('*t'))-start
|
local chrono_404 = os.time(os.date('*t'))-start
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ vulnerability via the Content-Type header.
|
|||||||
|
|
||||||
local method = stdnse.get_script_args(SCRIPT_NAME..".method") or "GET"
|
local method = stdnse.get_script_args(SCRIPT_NAME..".method") or "GET"
|
||||||
local path = stdnse.get_script_args(SCRIPT_NAME..".path") or "/"
|
local path = stdnse.get_script_args(SCRIPT_NAME..".path") or "/"
|
||||||
local value = rand.rand_alpha(8)
|
local value = rand.random_alpha(8)
|
||||||
|
|
||||||
local header = {
|
local header = {
|
||||||
["Content-Type"] = string.format("%%{#context['com.opensymphony.xwork2.dispatcher.HttpServletResponse'].addHeader('X-Check-Struts', '%s')}.multipart/form-data", value)
|
["Content-Type"] = string.format("%%{#context['com.opensymphony.xwork2.dispatcher.HttpServletResponse'].addHeader('X-Check-Struts', '%s')}.multipart/form-data", value)
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ action = function(host, port)
|
|||||||
-- Try to see what a nonexistent URL looks like
|
-- Try to see what a nonexistent URL looks like
|
||||||
local status, response = fetch_url(
|
local status, response = fetch_url(
|
||||||
host, port, ("rtsp://%s/%s"):format(
|
host, port, ("rtsp://%s/%s"):format(
|
||||||
stdnse.get_hostname(host), rand.rand_alpha(14))
|
stdnse.get_hostname(host), rand.random_alpha(14))
|
||||||
)
|
)
|
||||||
local status_404 = 404
|
local status_404 = 404
|
||||||
if status then
|
if status then
|
||||||
|
|||||||
Reference in New Issue
Block a user