小巧、快速、简单的工具,用于大规模执行反向 DNS 查询。
你向它输入 IP 地址,它返回主机名。
这是通过 IP 地址查找属于某公司的域名和子域名的一种有用方法。
go install github.com/hakluke/hakrevdns@latest
最基本的用法是直接将 IP 地址列表通过管道传给该工具,例如:
hakluke~$ prips 173.0.84.0/24 | hakrevdns
173.0.84.110 he.paypal.com.
173.0.84.109 twofasapi.paypal.com.
173.0.84.114 www-carrier.paypal.com.
173.0.84.77 twofasapi.paypal.com.
173.0.84.102 pointofsale.paypal.com.
173.0.84.104 slc-a-origin-pointofsale.paypal.com.
173.0.84.111 smsapi.paypal.com.
173.0.84.203 m.paypal.com.
173.0.84.105 prm.paypal.com.
173.0.84.113 mpltapi.paypal.com.
173.0.84.8 ipnpb.paypal.com.
173.0.84.2 active-www.paypal.com.
173.0.84.4 securepayments.paypal.com.
...
hakluke~$ hakrevdns -h
Usage:
main [OPTIONS]
Application Options:
-t, --threads= How many threads should be used (default: 8)
-r, --resolver= IP of the DNS resolver to use for lookups
-R, --resolvers-file= File containing list of DNS resolvers to use for lookups
-U, --use-default Use default resolvers for lookups
-P, --protocol=[tcp|udp] Protocol to use for lookups (default: udp)
-p, --port= Port to bother the specified DNS resolver on (default: 53)
-d, --domain Output only domains
-h, --help Show help message
Help Options:
-h, --help Show this help message
-U, --use-default:
指定后,此标志会告诉程序使用预定义的默认 DNS 解析器列表进行查询。这对于确保在不同环境中获得一致的 DNS 解析结果非常有用,尤其是在未提供自定义解析器的情况下。
-R, --resolvers-file:
此标志允许你指定一个包含自定义 DNS 解析器列表的文件。文件中的每一行应包含一个解析器 IP 地址。如果同时提供了 -R 和 -r,则 -r 指定的解析器会被添加到文件中解析器列表的末尾。
如果你想使用操作系统未指定的解析器,例如:1.1.1.1,可以这样尝试:
hakluke~$ echo "173.0.84.110" | hakrevdns -r 1.1.1.1
173.0.84.110 he.paypal.com.
如果你只想获得域名列表而不包含 IP 地址,可以使用 -d:
$ echo "173.0.84.110" | hakrevdns -d
该工具被设计为可轻松地通过管道与其他工具配合使用,例如:
$ echo "173.0.84.110" | hakrevdns -d | httprobe
由 hakluke(Luke Stephens)构建,他是 Haksec 的创始人兼 CEO,Haksec 是一组网络安全公司:
我会在 hakluke.com 上撰写有关黑客技术和安全行业的文章。