Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 Unix 命令或 php 获取与给定 IP 地址关联的所有域。
我尝试过 dig 或 nslookup,但它们给出了主机名,但不是所有域。
如果您在 senderscore.org 中输入给定的 ip,它将给出与该 ip 关联的所有域的报告。他们是怎么做到的?是 Unix 命令还是他们使用的一些 php 函数?
任何想法或建议将不胜感激。
通过使用简单的命令,您将永远无法获取指向 IP 地址的所有域。这是因为 dns 只是从记录解析为 ip,并且因为 dns 是一个分散的基础设施。因此,拥有域的每个人都可以为每个 ip 添加一个 A-Record。
您可以gethostbyaddr ( $ip_address );在 php 或# whois iplinux cli 中使用,但如果定义了一个,您将始终只获得反向记录。
gethostbyaddr ( $ip_address );
# whois ip