MCPcopy Index your code
hub / github.com/chainreactors/spray

github.com/chainreactors/spray @v1.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.3.2 ↗ · + Follow
395 symbols 1,513 edges 46 files 75 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SPRAY

<a href="#features">Features</a> •
<a href="#quickstart">QuickStart</a> •
<a href="#make">Make</a> •
<a href="https://chainreactors.github.io/wiki/spray/">Wiki</a>

Features

  • 超强的性能, 在本地测试极限性能的场景下, 能超过ffuf与feroxbruster的性能50%以上. 实际情况受到网络的影响, 感受没有这么明确. 但在多目标下可以感受到明显的区别.
  • 基于掩码的字典生成
  • 基于规则的字典生成
  • 动态智能过滤, 自定义过滤策略
  • 全量gogo的指纹识别, 全量的fingerprinthub,wappalyzer指纹
  • 自定义信息提取, 内置敏感信息提取规则
  • 自定义输出格式与内容
  • *nix的命令行设计, 轻松与其他工具联动
  • 多角度的自动被ban,被waf判断
  • 断点续传

QuickStart

Document

基本使用

从字典中读取目录进行爆破

spray -u http://example.com -d wordlist1.txt -d wordlist2.txt

通过掩码生成字典进行爆破

spray -u http://example.com -w "/aaa/bbb{?l#4}/ccc"

通过规则生成字典爆破

规则文件格式参考hashcat的字典生成规则

spray -u http://example.com -r rule.txt -d 1.txt

批量爆破多个目标

spray -l url.txt -r rule.txt -d 1.txt

断点续传

spray --resume stat.json

高级用法

check-only 模式

类似ehole/httpx这类对单页面信息收集的模式. 会有针对性的性能优化. 默认使用templates指纹库. 可以使用--finger打开第三方指纹库的匹配

spray -l url.txt --check-only

启用拓展指纹识别

会进行主动探测常见的指纹目录, 并额外启用fingerprinthub与wappalyzer拓展指纹库

spray -u http://example.com --finger

启用爬虫

spray -u http://example.com --crawl

扫描备份文件与常见通用文件

spray -u http://example.com --bak --common

启用所有插件

spray -u http://example.com -a

被动url收集

参见: https://github.com/chainreactors/urlfounder

Wiki

详细用法请见wiki

https://chainreactors.github.io/wiki/spray/

Make

git clone --recurse-submodules https://github.com/chainreactors/spray

cd spray

go mod tidy

go generate

go build .  

Similar or related works

  • ffuf 一款优秀的http fuzz工具, 与spray的功能有一定重合但并不完全相同
  • feroxbuster 在编写spray之前我最常使用的目录爆破工具, 但因为批量扫描与过滤配置不便的原因选择自行编写
  • dirsearch 较早的目录爆破工具, 参考了部分字典生成与配色
  • httpx http信息收集功能, 参考了通过脚本语言编写任意过滤条件的功能
  • gobuster 一款统一是go编写的爆破工具, 但不仅限于目录爆破

TODO

  1. [x] 模糊对比
  2. [x] 断点续传
  3. [x] 简易爬虫
  4. [x] 支持http2
  5. [ ] auto-tune, 自动调整并发数量
  6. [x] 可自定义的递归配置
  7. [x] 参考feroxbuster--collect-backups, 自动爆破有效目录的备份
  8. [x] 支持socks/http代理, 不建议使用, 优先级较低. 代理的keep-alive会带来严重的性能下降
  9. [ ] 云函数化, chainreactors工具链的通用分布式解决方案.

Thanks

Extension points exported contracts — how you extend this code

ResourceProvider (FuncType)
ResourceProvider supplies template/config bytes by logical name.
pkg/resource_provider.go

Core symbols most depended-on inside this repo

Error
called by 82
pkg/errors.go
Done
called by 75
core/runner.go
EnableExtractors
called by 42
pkg/proton.go
String
called by 33
pkg/utils.go
Close
called by 29
core/task.go
Run
called by 28
core/task.go
addAddition
called by 20
core/pool/pool.go
ProtonExtract
called by 18
pkg/proton.go

Shape

Function 237
Method 121
Struct 31
TypeAlias 5
FuncType 1

Languages

Go100%

Modules by API surface

core/pool/brutepool.go43 symbols
core/pool/pool_test.go37 symbols
pkg/utils.go34 symbols
pkg/proton_test.go28 symbols
core/option.go22 symbols
core/e2e_test.go20 symbols
core/runner.go18 symbols
core/baseline/baseline.go13 symbols
pkg/statistor.go12 symbols
core/option_fuzz_test.go12 symbols
pkg/proton.go11 symbols
pkg/neutron.go11 symbols

For agents

$ claude mcp add spray \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact