1

我有一个包含 IP 地址列表的文本文件,我希望能够将它们与它们各自的域进行匹配。是否可以轻松地做到这一点,如果可以,有人可以指出我如何做到这一点的正确方向吗?

谢谢!

4

2 回答 2

0

Assuming you are satisfied with seeing whether there is a reverse DNS mapping,

 xargs -n 1 host <ips.txt

If you want the names of all the hosts whose forward DNS resolves to this particular IP address, that's significantly more challenging, but probably also more useful (reverse DNS is neglected by some ISPs, and when it does exist, it often doesn't help answer any useful question you might have). There is no straightforward and quick technique for this, but DomainTools and their competitors have painstakingly distilled databases through crawling which they will be happy to accept your money for.

于 2012-09-12T19:43:50.153 回答
0

(由于您没有提到任何语言..我假设您将使用.Net)

利用

System.Net.Dns.Resolve();

您可以传入 IP 地址并获取解析的主机名。

于 2012-09-11T18:51:16.613 回答