mirror of
https://github.com/nmap/nmap.git
synced 2025-12-11 10:19:03 +00:00
hostmap-robtex needs to take a DNS name, not an IP address.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
description = [[
|
description = [[
|
||||||
Tries to find hostnames that resolve to the target's IP address by querying the Robtex service at http://www.robtex.com/dns/.
|
Finds up to 100 domain names that use the same name server as the target by querying the Robtex service at http://www.robtex.com/dns/.
|
||||||
|
|
||||||
|
The target must be specified by DNS name, not IP address.
|
||||||
]];
|
]];
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -28,7 +30,6 @@ categories = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
require "http";
|
require "http";
|
||||||
require "ipOps"
|
|
||||||
require "shortport";
|
require "shortport";
|
||||||
|
|
||||||
--- Scrape domains sharing name servers from robtex website
|
--- Scrape domains sharing name servers from robtex website
|
||||||
@@ -46,11 +47,11 @@ function parse_robtex_response (data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
hostrule = function (host)
|
hostrule = function (host)
|
||||||
return not ipOps.isPrivate(host.ip)
|
return host.targetname
|
||||||
end;
|
end;
|
||||||
|
|
||||||
action = function (host)
|
action = function (host)
|
||||||
local link = "http://www.robtex.com/dns/" .. host.ip .. ".html";
|
local link = "http://www.robtex.com/dns/" .. host.targetname .. ".html";
|
||||||
local htmldata = http.get_url(link);
|
local htmldata = http.get_url(link);
|
||||||
local domains = parse_robtex_response(htmldata.body);
|
local domains = parse_robtex_response(htmldata.body);
|
||||||
if (#domains > 0) then
|
if (#domains > 0) then
|
||||||
|
|||||||
Reference in New Issue
Block a user