1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 10:59:02 +00:00

Applied Dan Miller's fix to use new Robtex API (http://seclists.org/nmap-dev/2013/q2/1). I had to modify it slightly to allow [a-z]+.robtex.com in the pattern rather than just dns.robtex.com because many entries used host.robtex.com, top.robtex.com, etc. More improvements to follow.

Originally committed by fyodor but recommitted by david after recovery
from backup.
This commit is contained in:
david
2013-04-12 17:29:20 +00:00
parent b7c49e4276
commit 4df392f1a2

View File

@@ -37,7 +37,7 @@ categories = {
function parse_robtex_response (data)
local result = {};
for linkhref, domain in string.gmatch(data, "<a href=\"/dns/([^\"]-)%.html\">([^<]-)</a></span>") do
for domain in string.gmatch(data, "<span id=\"dns[0-9]+\"><a href=\"//[a-z]+.robtex.com/([^\"]-)%.html\"") do
if not table.contains(result, domain) then
table.insert(result, domain);
end
@@ -50,7 +50,7 @@ hostrule = function (host)
end;
action = function (host)
local link = "http://www.robtex.com/ip/" .. host.ip .. ".html";
local link = "http://ip.robtex.com/" .. host.ip .. ".html";
local htmldata = http.get_url(link);
local domains = parse_robtex_response(htmldata.body);
if (#domains > 0) then