lucap123/Scope
GitHub: lucap123/Scope
专为 Web 渗透设计的 CLI 会话管理器,一次设置 headers、proxy 和 base URL 即可自动注入到 curl、ffuf、nuclei、sqlmap 等工具命令中。
Stars: 1 | Forks: 0
# scope




# create a session
scope new --url https://target.com
scope set url https://target.com # set base URL
scope set header "Authorization: Bearer "
scope set header "Cookie: session=abc123"
scope set proxy http://127.0.0.1:8080
scope unset header Authorization # remove a header
scope use # set active session
scope show # inspect active session
scope show --reveal # show full header values (not masked)
scope list # list all sessions
scope delete # delete a session
```
在 shell 中设置 `SCOPE_SESSION=` 即可按终端覆盖当前的活动会话,而无需更改全局状态。
### 工具封装
```
scope curl /users
scope curl -X POST /login -d '{"user":"test","pass":"test"}'
scope ffuf -w wordlist.txt -u /FUZZ
scope ffuf -w wordlist.txt -u /api/FUZZ
scope http GET /users
scope http POST /login user=test pass=test
scope nuclei -t exposures/
scope nuclei -t cves/ -severity high,critical
scope sqlmap -u /search?q=test --dbs
```
以 `/` 开头的路径会自动加上会话的 base URL 前缀。所有其他参数将原封不动地传递。
使用 `--verbose` 可以在命令运行前查看完整的执行命令:
```
scope --verbose curl /users
# [scope] curl -H "Authorization: Bearer ey..." --proxy http://127.0.0.1:8080 https://api.target.com/users
```
### 导出
```
# 生成一个可直接复制粘贴的命令
scope export curl /users
scope export ffuf -w words.txt -u /FUZZ
# 导出会话本身
scope export --format json > session.json
scope export --format env
```
### 从 Burp Suite 导入
在 Burp 中右键点击一个请求 → Save item → 导入它:
```
scope import burp burp-export.xml
```
会自动解析 base URL、auth headers 和 cookies。并自动跳过 Host、Content-Length 及其他每次请求特定的 headers。
### 备注
```
scope note "Admin panel at /manage no auth check"
scope note "v1 endpoint still active at /api/v1/auth"
scope notes
```
## 会话的存储方式
以纯 JSON 文件格式存储在 `~/.scope/sessions/` 中。没有云端同步,没有账号绑定,没有遥测数据。
```
~/.scope/
sessions/
bugcrowd-target.json
hackerone-acme.json
active
```
文件权限为 `chmod 600`。Tokens 以明文形式存储——这本身就是一个用于渗透的工具,安全由你自己掌控。
可以通过设置 `SCOPE_HOME=/path/to/dir` 来覆盖存储目录。
## 构建
```
make build # builds ./scope
make install # installs to $GOPATH/bin
make test # runs tests
make release # builds for linux/mac/windows
```
## 路线图
| 版本 | 功能 |
|---------|----------|
| v0.1 | Sessions、headers、proxy、curl/ffuf/nuclei/sqlmap 封装 ✓ |
| v0.2 | Burp 导入、会话导出、notes ✓ |
| v0.3 | 通过 hook 脚本自动刷新 Token |
| v0.4 | 团队共享与可选加密 |
| v1.0 | 面向社区工具的插件系统 |
## 许可证
MIT
别再复制粘贴你的 auth token 了。**scope** 是一个专为 Web 渗透设计的轻量级 CLI 会话管理器——只需设置一次 headers、proxy 和 base URL,即可运行 curl、ffuf、nuclei、sqlmap 等工具,所有配置自动注入。 ``` scope new bugcrowd-target --url https://api.target.com scope set header "Authorization: Bearer eyJhbG..." scope set header "Cookie: session=abc123" scope set proxy http://127.0.0.1:8080 scope use bugcrowd-target scope curl /users # → curl -H "Authorization: ..." https://api.target.com/users scope ffuf -w words.txt -u /FUZZ scope nuclei -t exposures/ ``` ## 安装 ``` go install github.com/lucap123/scope@latest ``` 或者从源码构建: ``` git clone https://github.com/lucap123/scope cd scope make install ``` ## 使用说明 ### 会话 ``` scope new
标签:Bug Bounty, CLI, cURL, ffuf, Golang, Google, Go语言, HTTP代理, Nuclei, SQLMap, Web安全, Web黑客, WiFi技术, 会话管理, 可自定义解析器, 安全测试, 安全编程, 开源安全工具, 攻击性安全, 攻击路径可视化, 数据展示, 日志审计, 程序破解, 红队, 网络安全, 自动化注入, 蓝队分析, 请求头注入, 逆向工程平台, 隐私保护, 黑客工具