1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-01 20:39:02 +00:00

Change some http scripts to use host table instead of IP in requests

This commit is contained in:
dmiller
2017-08-10 15:23:19 +00:00
parent 6c62fb6a74
commit 987680e7b6
5 changed files with 6 additions and 6 deletions

View File

@@ -66,7 +66,7 @@ untrusted website and XSS injection.]],
local vuln_report = vulns.Report:new(SCRIPT_NAME, host, port)
local header = { ["Referer"] = '"><script>alert("XSS")</script><"' }
local open_session = http.get(host.ip, port, "/"..stdnse.generate_random_string(16), { header = header })
local open_session = http.get(host, port, "/"..stdnse.generate_random_string(16), { header = header })
if open_session and open_session.status == 404 then
stdnse.debug2("got 404-that's good!")
if open_session.body:match('"><script>alert%("XSS"%)</script><"') then