diff --git a/scripts/hadoop-datanode-info.nse b/scripts/hadoop-datanode-info.nse index fbe58a5b9..e1b79ef31 100644 --- a/scripts/hadoop-datanode-info.nse +++ b/scripts/hadoop-datanode-info.nse @@ -45,7 +45,7 @@ action = function( host, port ) local result = {} local uri = "/browseDirectory.jsp" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then port.version.name = "hadoop-datanode" diff --git a/scripts/hadoop-jobtracker-info.nse b/scripts/hadoop-jobtracker-info.nse index b4e9accf9..8f9312071 100644 --- a/scripts/hadoop-jobtracker-info.nse +++ b/scripts/hadoop-jobtracker-info.nse @@ -63,7 +63,7 @@ get_userhistory = function( host, port ) local results = {} local uri = "/jobhistory.jsp?pageno=-1&search=" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then local body = response['body']:gsub("%%","%%%%") @@ -84,7 +84,7 @@ get_tasktrackers = function( host, port ) local results = {} local uri = "/machines.jsp?type=active" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then stdnse.print_debug(2, ("%s: Body %s\n"):format(SCRIPT_NAME,response['body'])) @@ -111,7 +111,7 @@ action = function( host, port ) local result = {} local uri = "/jobtracker.jsp" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then stdnse.print_debug(2, ("%s: Body %s\n"):format(SCRIPT_NAME,response['body'])) diff --git a/scripts/hadoop-namenode-info.nse b/scripts/hadoop-namenode-info.nse index e1c981c77..a2068d285 100644 --- a/scripts/hadoop-namenode-info.nse +++ b/scripts/hadoop-namenode-info.nse @@ -63,7 +63,7 @@ get_datanodes = function( host, port, Status ) local result = {} local uri = "/dfsnodelist.jsp?whatNodes=" .. Status stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response" )) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then local body = response['body']:gsub("%%","%%%%") @@ -89,7 +89,7 @@ action = function( host, port ) local result = {} local uri = "/dfshealth.jsp" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then local body = response['body']:gsub("%%","%%%%") diff --git a/scripts/hadoop-secondary-namenode-info.nse b/scripts/hadoop-secondary-namenode-info.nse index a48d67709..8f5991007 100644 --- a/scripts/hadoop-secondary-namenode-info.nse +++ b/scripts/hadoop-secondary-namenode-info.nse @@ -59,7 +59,7 @@ action = function( host, port ) local result = {} local uri = "/status.jsp" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Resposne")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then local body = response['body']:gsub("%%","%%%%") diff --git a/scripts/hadoop-tasktracker-info.nse b/scripts/hadoop-tasktracker-info.nse index f95d6196d..b7b56a420 100644 --- a/scripts/hadoop-tasktracker-info.nse +++ b/scripts/hadoop-tasktracker-info.nse @@ -49,7 +49,7 @@ action = function( host, port ) local result = {} local uri = "/tasktracker.jsp" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then local body = response['body']:gsub("%%","%%%%") diff --git a/scripts/hbase-master-info.nse b/scripts/hbase-master-info.nse index 55f783cb9..5a0ef543d 100644 --- a/scripts/hbase-master-info.nse +++ b/scripts/hbase-master-info.nse @@ -62,7 +62,7 @@ action = function( host, port ) local region_servers = {} local uri = "/master.jsp" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then local body = response['body']:gsub("%%","%%%%") diff --git a/scripts/hbase-region-info.nse b/scripts/hbase-region-info.nse index e1f9e3dfa..336456237 100644 --- a/scripts/hbase-region-info.nse +++ b/scripts/hbase-region-info.nse @@ -55,7 +55,7 @@ action = function( host, port ) local region_servers = {} local uri = "/regionserver.jsp" stdnse.print_debug(1, ("%s:HTTP GET %s:%s%s"):format(SCRIPT_NAME, host.targetname or host.ip, port.number, uri)) - local response = http.get( host.targetname or host.ip, port.number, uri ) + local response = http.get( host, port, uri ) stdnse.print_debug(1, ("%s: Status %s"):format(SCRIPT_NAME,response['status-line'] or "No Response")) if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then local body = response['body']:gsub("%%","%%%%")