GoSpider - 用Go编写的快速网络爬虫
该项目是Osmedeus引擎的一部分。查看它在@OsmedeusEngine上的集成方式
GO111MODULE=on go install github.com/jaeles-project/gospider@latest
# 克隆仓库
git clone https://github.com/jaeles-project/gospider.git
# 构建容器
docker build -t gospider:latest gospider
# 运行容器
docker run -t gospider -h
用Go编写的快速网络爬虫 - v1.1.5 由 @thebl4ckturtle 和 @j3ssiejjj 开发
用法:
gospider [flags]
标志:
-s, --site string 要爬取的站点
-S, --sites string 要爬取的站点列表文件
-p, --proxy string 代理 (例如: http://127.0.0.1:8080)
-o, --output string 输出文件夹
-u, --user-agent string 使用的User-Agent
web: 随机桌面User-Agent
mobi: 随机移动User-Agent
或者你可以设置自定义User-Agent (默认 "web")
--cookie string 使用的Cookie (例如: testA=a; testB=b)
-H, --header stringArray 使用的请求头 (可以使用多个标志设置多个请求头)
--burp string 从Burp原始HTTP请求中加载请求头和Cookie
--blacklist string 黑名单URL正则表达式
--whitelist string 白名单URL正则表达式
--whitelist-domain string 白名单域名
-t, --threads int 线程数 (并行运行站点) (默认 1)
-c, --concurrent int 匹配域名的最大允许并发请求数 (默认 5)
-d, --depth int 最大深度,限制访问URL的递归深度 (设置为0表示无限递归) (默认 1)
-k, --delay int 发送新请求之前的等待时间 (秒)
-K, --random-delay int 在请求延迟之上额外增加的随机等待时间 (秒)
-m, --timeout int 请求超时时间 (秒) (默认 10)
-B, --base 禁用所有,仅使用HTML内容
--js 在JavaScript文件中启用链接查找器 (默认 true)
--subs 包含子域名
--sitemap 尝试爬取sitemap.xml
--robots 尝试爬取robots.txt (默认 true)
-a, --other-source 从第三方来源查找URL (Archive.org, CommonCrawl.org, VirusTotal.com, AlienVault.com)
-w, --include-subs 包含从第三方爬取的子域名。默认为主域名
-r, --include-other-source 也包含其他来源的URL (仍然会爬取和请求)
--debug 开启调试模式
--json 启用JSON输出
-v, --verbose 开启详细输出
-l, --length 开启长度显示
-L, --filter-length 开启长度过滤
-R, --raw 开启原始输出
-q, --quiet 静默模式,只显示URL
--no-redirect 禁用重定向
--version 检查版本
-h, --help gospider帮助
gospider -q -s "https://google.com/"
gospider -s "https://google.com/" -o output -c 10 -d 1
gospider -S sites.txt -o output -c 10 -d 1
gospider -S sites.txt -o output -c 10 -d 1 -t 20
gospider -s "https://google.com/" -o output -c 10 -d 1 --other-source
gospider -s "https://google.com/" -o output -c 10 -d 1 --other-source --include-subs
gospider -s "https://google.com/" -o output -c 10 -d 1 --other-source -H "Accept: */*" -H "Test: test" --cookie "testA=a; testB=b"
gospider -s "https://google.com/" -o output -c 10 -d 1 --other-source --burp burp_req.txt
附注: gospider默认黑名单为 .(jpg|jpeg|gif|css|tif|tiff|png|ttf|woff|woff2|ico)
gospider -s "https://google.com/" -o output -c 10 -d 1 --blacklist ".(woff|pdf)"
gospider -s "https://google.com/" -o output -c 10 -d 1 --length --filter-length "6871,24432"
Gospider 由 @j3ssiejjj 和 @thebl4ckturtle 用 ♥ 制作,并以MIT许可证发布。