接收一个域名列表,并探测其中可用的 HTTP 和 HTTPS 服务器。
▶ go install github.com/tomnomnom/httprobe@latest
httprobe 从 stdin 接收以换行符分隔的域名:
▶ cat recon/example/domains.txt
example.com
example.edu
example.net
▶ cat recon/example/domains.txt | httprobe
http://example.com
http://example.net
http://example.edu
https://example.com
https://example.edu
https://example.net
默认情况下,httprobe 会检查 80 端口的 HTTP 和 443 端口的 HTTPS。你可以使用 -p 标志,通过指定协议和端口对来添加额外探测:
▶ cat domains.txt | httprobe -p http:81 -p https:8443
你可以使用 -c 标志设置并发级别:
▶ cat domains.txt | httprobe -c 50
你可以使用 -t 标志并指定以毫秒为单位的超时时间来更改超时:
▶ cat domains.txt | httprobe -t 20000
如果你不想探测 80 端口的 HTTP 或 443 端口的 HTTPS,可以使用 -s 标志。你需要使用 -p 标志来指定你确实想要的探测:
▶ cat domains.txt | httprobe -s -p https:8443
有时,如果 HTTPS 可用,你并不关心 HTTP 的检查。你可以使用 --prefer-https 标志来实现这一点:
▶ cat domains.txt | httprobe --prefer-https
构建 Docker 容器:
▶ docker build -t httprobe .
运行容器,将文件内容传入容器内进程的 stdin。需要使用 -i 来正确地将 stdin 映射到容器及 httprobe 二进制程序。
▶ cat domains.txt | docker run -i httprobe <args>