mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Use a legit HTTP probe for detecting SSL in http-slowloris and -check
This commit is contained in:
parent
b4f10146e4
commit
87fb195c3f
2 changed files with 5 additions and 3 deletions
|
|
@ -91,7 +91,8 @@ the http server's resources causing Denial Of Service.
|
|||
local report = vulns.Report:new(SCRIPT_NAME, host, port)
|
||||
slowloris.state = vulns.STATE.NOT_VULN
|
||||
|
||||
local sd, response, Bestopt = comm.tryssl(host, port, "GET / \r\n\r\n") -- first determine if we need ssl
|
||||
local sd, response, Bestopt = comm.tryssl(host, port, "GET / HTTP/1.0\r\n\r\n") -- first determine if we need ssl
|
||||
if sd then sd:close() end
|
||||
if Bestopt == "none" then
|
||||
stdnse.debug1("Error determining SSL: %s", response)
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -202,9 +202,10 @@ local function do_monitor(host, port)
|
|||
"Host: " .. host.ip ..
|
||||
"\r\nUser-Agent: " .. http.USER_AGENT .. "\r\n\r\n"
|
||||
local opts = {}
|
||||
local _
|
||||
local sd,_
|
||||
|
||||
_, _, Bestopt = comm.tryssl(host, port, "GET / \r\n\r\n", opts) -- first determine if we need ssl
|
||||
sd, _, Bestopt = comm.tryssl(host, port, "GET / HTTP/1.0\r\n\r\n", opts) -- first determine if we need ssl
|
||||
if sd then sd:close() end
|
||||
|
||||
while not StopAll do
|
||||
local monitor = nmap.new_socket()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue