diff --git a/scripts/http-slowloris-check.nse b/scripts/http-slowloris-check.nse index 8006091d8..d8482aa64 100644 --- a/scripts/http-slowloris-check.nse +++ b/scripts/http-slowloris-check.nse @@ -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 diff --git a/scripts/http-slowloris.nse b/scripts/http-slowloris.nse index 2ea43f31c..33d1102a3 100644 --- a/scripts/http-slowloris.nse +++ b/scripts/http-slowloris.nse @@ -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()