diff --git a/scripts/http-avaya-ipoffice-users.nse b/scripts/http-avaya-ipoffice-users.nse index 6647effc2..af86b8ffc 100644 --- a/scripts/http-avaya-ipoffice-users.nse +++ b/scripts/http-avaya-ipoffice-users.nse @@ -47,7 +47,7 @@ action = function(host, port) end local output = stdnse.output_table() local vuln_report = vulns.Report:new(SCRIPT_NAME, host, port) - local open_session = http.get(host.ip, port, "/system/user/scn_user_list") + local open_session = http.get(host, port, "/system/user/scn_user_list") if open_session and open_session.status == 200 then local _, _, source = string.find(open_session.body, "(.-)") if source == nil then diff --git a/scripts/http-huawei-hg5xx-vuln.nse b/scripts/http-huawei-hg5xx-vuln.nse index 6e2f59efc..fdc42db44 100644 --- a/scripts/http-huawei-hg5xx-vuln.nse +++ b/scripts/http-huawei-hg5xx-vuln.nse @@ -91,7 +91,7 @@ including PPPoE credentials, firmware version, model, gateway, dns servers and a end local vuln_report = vulns.Report:new(SCRIPT_NAME, host, port) - local open_session = http.get(host.ip, port, "/Listadeparametros.html") + local open_session = http.get(host, port, "/Listadeparametros.html") if open_session and open_session.status == 200 then local _, _, pppoe_user = string.find(open_session.body, 'Usuario PPPoE:\n(.-)') local _, _, model = string.find(open_session.body, 'Modelo de m\195\179dem:\n(.-)') @@ -116,7 +116,7 @@ including PPPoE credentials, firmware version, model, gateway, dns servers and a return vuln_report:make_output(vuln) end - local ppp = http.get(host.ip, port, "/wanfun.js") + local ppp = http.get(host, port, "/wanfun.js") if ppp.status and ppp.status == 200 then local _, _, ppp_pwd = string.find(ppp.body, 'var pwdppp = "(.-)"') info = string.format("%sPPPoE password:%s", info, ppp_pwd) diff --git a/scripts/http-malware-host.nse b/scripts/http-malware-host.nse index 99d868ffa..f578b4a9e 100644 --- a/scripts/http-malware-host.nse +++ b/scripts/http-malware-host.nse @@ -56,7 +56,7 @@ action = function(host, port) end -- Perform a GET request on the file - result = http.get_url("http://" .. host.ip .. ":" .. port.number .. "/ts/in.cgi?open2") + result = http.get(host, port, "/ts/in.cgi?open2") if(not(result)) then return stdnse.format_output(false, "Couldn't perform GET request") end diff --git a/scripts/http-vuln-cve2013-6786.nse b/scripts/http-vuln-cve2013-6786.nse index ddaa69285..8307973de 100644 --- a/scripts/http-vuln-cve2013-6786.nse +++ b/scripts/http-vuln-cve2013-6786.nse @@ -66,7 +66,7 @@ untrusted website and XSS injection.]], local vuln_report = vulns.Report:new(SCRIPT_NAME, host, port) local header = { ["Referer"] = '"><"' } - 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('"><"') then diff --git a/scripts/supermicro-ipmi-conf.nse b/scripts/supermicro-ipmi-conf.nse index ccd6ffc54..77e1b2914 100644 --- a/scripts/supermicro-ipmi-conf.nse +++ b/scripts/supermicro-ipmi-conf.nse @@ -80,7 +80,7 @@ network's Active Directory.]], } local vuln_report = vulns.Report:new(SCRIPT_NAME, host, port) - local open_session = http.get(host.ip, port, "/PSBlock") + local open_session = http.get(host, port, "/PSBlock") if open_session and open_session.status ==200 and string.len(open_session.body)>200 then local s = open_session.body:gsub("%z", ".") vuln.state = vulns.STATE.EXPLOIT