diff --git a/scripts/http-robtex-shared-ns.nse b/scripts/http-robtex-shared-ns.nse index 8bbfcccf9..77c076914 100644 --- a/scripts/http-robtex-shared-ns.nse +++ b/scripts/http-robtex-shared-ns.nse @@ -48,11 +48,12 @@ function parse_robtex_response(data) end -- cut out the section we're interested in - data = data:match(".-(.-)") + data = data:match('.-(.-)') -- process each html list item if data then - for domain in data:gmatch("
  • (.-)
  • ") do + for domain in data:gmatch("]*>(.-)") do + domain = domain:gsub("<[^>]+>","") if ( domain ) then table.insert(result, domain) end @@ -67,7 +68,7 @@ local function lookup_dns_server(data) end local function fetch_robtex_data(url) - local htmldata = http.get("www.robtex.com", 443, url) + local htmldata = http.get("www.robtex.net", 443, url) if ( not(htmldata) or not(htmldata.body) ) then return end @@ -79,7 +80,7 @@ end hostrule = function (host) return host.targetname end action = function(host) - local base_url = "/dns/" .. host.targetname .. ".html" + local base_url = "/?dns=" .. host.targetname local data = fetch_robtex_data(base_url) local domains = parse_robtex_response(data)