mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Move stdnse.generate_random_string to new rand.lua
This commit is contained in:
@@ -4,8 +4,7 @@ local shortport = require "shortport"
|
||||
local stdnse = require "stdnse"
|
||||
local string = require "string"
|
||||
local vulns = require "vulns"
|
||||
|
||||
local openssl = stdnse.silent_require "openssl"
|
||||
local rand = require "rand"
|
||||
|
||||
description = [[
|
||||
Tests for the CVE-2011-3368 (Reverse Proxy Bypass) vulnerability in Apache HTTP server's reverse proxy mode.
|
||||
@@ -72,7 +71,7 @@ servers to remote users who send carefully crafted requests.]],
|
||||
|
||||
-- Take a reference chrono for a 404
|
||||
local start = os.time(os.date('*t'))
|
||||
local random_page = stdnse.tohex(openssl.sha1(openssl.rand_pseudo_bytes(512)))
|
||||
local random_page = rand.rand_alpha(20)
|
||||
local reference = http.get(host,port,("%s/%s.htm"):format(prefix,random_page))
|
||||
local chrono_404 = os.time(os.date('*t'))-start
|
||||
|
||||
|
||||
Reference in New Issue
Block a user