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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user