xcrawl3r 是一个命令行工具,用于递归爬取网页以获取 URL。它通过主动遍历网站——跟踪网页中的链接并解析文件(包括站点地图和 robots.txt)——来发现所有 URL。
与 xurlfind3r 不同,xcrawl3r 不直接与目标交互,而是通过实时爬取页面来直接与目标交互。这种主动方式使其能够发现可能被隐藏或未索引的 URL,从而提供网站导航流程和内容分布的完整视图。这使得 xcrawl3r 成为安全研究人员、IT 专业人员以及任何希望深入了解网站相关 URL 的用户的强大工具。
robots.txt)中提取 URLstdin 和 stdout,便于集成到自动化工作流访问 发布页面 并找到适合您操作系统和架构的压缩包。从浏览器下载压缩包,或复制其 URL 并使用 wget 或 curl 获取:
使用 wget:
wget https://github.com/hueristiq/xcrawl3r/releases/download/v<version>/xcrawl3r-<version>-linux-amd64.tar.gz
或使用 curl:
curl -OL https://github.com/hueristiq/xcrawl3r/releases/download/v<version>/xcrawl3r-<version>-linux-amd64.tar.gz
...然后解压二进制文件:
tar xf xcrawl3r-<version>-linux-amd64.tar.gz
[!TIP] 以上下载和解压步骤可以合并为一条命令:
curl -sL https://github.com/hueristiq/xcrawl3r/releases/download/v<version>/xcrawl3r-<version>-linux-amd64.tar.gz | tar -xzv
[!NOTE] 在 Windows 系统上,您可以双击 zip 压缩包来解压
xcrawl3r可执行文件。
...将 xcrawl3r 二进制文件移动到 PATH 中的某个目录。例如,在 GNU/Linux 和 OS X 系统上:
sudo mv xcrawl3r /usr/local/bin/
[!NOTE] Windows 用户可以按照 如何:将工具位置添加到 PATH 环境变量 将
xcrawl3r添加到PATH。
在从源码安装之前,需要确保系统上已安装 Go。您可以按照官方说明为您的操作系统安装 Go。这里我们假设已经安装好 Go。
go install ...go install -v github.com/hueristiq/xcrawl3r/cmd/xcrawl3r@latest
go build ... 开发版克隆仓库
git clone https://github.com/hueristiq/xcrawl3r.git
构建工具
cd xcrawl3r/cmd/xcrawl3r && \
go build .
将 xcrawl3r 二进制文件移动到 PATH 中的某个目录。例如,在 GNU/Linux 和 OS X 系统上:
sudo mv xcrawl3r /usr/local/bin/
Windows 用户可以按照 如何:将工具位置添加到 PATH 环境变量 将 xcrawl3r 添加到 PATH。
[!CAUTION] 尽管开发版是了解
xcrawl3r最新功能的好方法,但请注意它可能存在错误。官方发布的版本通常会更稳定。
要在 Docker 上安装 xcrawl3r:
拉取 Docker 镜像:
docker pull hueristiq/xcrawl3r:latest
使用镜像运行 xcrawl3r:
docker run --rm hueristiq/xcrawl3r:latest -h
xcrawl3r 在安装后即可使用。但您可以在首次运行时自动创建的配置文件 $HOME/.config/xcrawl3r/config.yaml 中添加配置,或通过环境变量进行设置。
环境变量示例:
XCRAWL3R_REQUEST_TIMEOUT=10
要开始使用 xcrawl3r,打开终端并运行以下命令查看选项列表:
xcrawl3r -h
帮助信息如下:
_ _____
__ _____ _ __ __ ___ _| |___ / _ __
\ \/ / __| '__/ _` \ \ /\ / / | |_ \| '__|
> < (__| | | (_| |\ V V /| |___) | |
/_/\_\___|_| \__,_| \_/\_/ |_|____/|_|
v1.2.0
USAGE:
xcrawl3r [OPTIONS]
CONFIGURATION:
-c, --configuration string (default: $HOME/.config/xcrawl3r/config.yaml)
INPUT:
-u, --url string[] target URL
-l, --list string target URLs file path
For multiple URLs, use comma(,) separated value with `--url`,
specify multiple `--url`, load from file with `--list` or load from stdin.
SCOPE:
-d, --domain string[] match domain(s) URLs
For multiple domains, use comma(,) separated value with `--domain`
or specify multiple `--domain`.
--include-subdomains bool with domain(s), match subdomains' URLs
REQUEST:
--delay int delay between each request in seconds
-H, --header string[] header to include in 'header:value' format
For multiple headers, use comma(,) separated value with `--header`
or specify multiple `--header`.
--timeout int time to wait for request in seconds (default: 10)
PROXY:
-p, --proxy string[] Proxy (e.g: http://127.0.0.1:8080)
For multiple proxies use comma(,) separated value with `--proxy`
or specify multiple `--proxy`.
OPTIMIZATION:
--depth int maximum depth to crawl, `0` for infinite (default: 1)
-C, --concurrency int number of concurrent inputs to process (default: 5)
-P, --parallelism int number of concurrent fetchers to use (default: 5)
DEBUG:
--debug bool enable debug mode
OUTPUT:
--jsonl bool output in JSONL(ines)
-o, --output string output write file path
-m, --monochrome bool stdout in monochrome
-s, --silent bool stdout in silent mode
-v, --verbose bool stdout in verbose mode
欢迎并鼓励贡献!请随时提交拉取请求或报告问题。更多详情,请查看贡献指南。
非常感谢所有贡献者的持续支持!
本包基于 MIT 许可 发布。您可以自由使用、修改和分发,前提是遵守许可条款。完整许可文本可在仓库中找到——MIT 许可全文。