请确保你已安装 Rust,然后运行以下命令来安装 dnsresolver。
git clone https://github.com/ethicalhackingplayground/dnsresolver ; cd dnsresolver ; cargo install --path .
cat subs.txt | dnsresolver
如果你需要解析带有任意端口的主机,可以使用 --ports 参数。
cat subs.txt | dnsresolver -p 443,80,8080,8081
第一步是使用以下命令从给定的域名列表中获取所有未解析的主机:
cat subs.txt | dnsresolver --show-unresolved | anew unresolved.txt
然后,要发现给定域名列表中的所有虚拟主机,
可以使用 --vhost 参数,后跟 --vhost-file 参数。
dnsresolver 旨在绕过某些页面上的访问限制。它通过将 Host 头替换为未解析的域名并使用 sift 算法来实现这一点。这确保了虚拟主机的响应与实际响应不同。请记住使用命令 ulimit -n 10000 提高软限制,以便同时处理更多文件。
cat subs.txt | dnsresolver --vhost --vhost-file unresolved.txt
要验证发现的结果,请运行以下 curl 命令:
curl -v -k thehost.com -H "Host: unresolved-domain.com"
你还可以将 --vhost 参数与 --check-localhost 参数一起使用,将 Host 头替换为 localhost,这通常可以让你访问
受限页面,并可能导致一些信息泄露和诱人的管理面板。
cat subs.txt | dnsresolver --vhost --check-localhost
要验证发现的结果,请运行以下 curl 命令:
curl -v -k thehost.com -H "Host: localhost"
如果你有任何反馈,请通过 [email protected] 或 Twitter https://twitter.com/z0idsec 联系我们