ashishjsharda/crabguard
GitHub: ashishjsharda/crabguard
CrabGuard 是一款可通过 pip 安装的企业级 Web 安全扫描器,提供被动与主动漏洞检测能力,旨在作为 Burp Suite 和 OWASP ZAP 的低成本替代方案。
Stars: 0 | Forks: 0
# 🦀 CrabGuard
**企业级 Web 安全扫描器。相当于 Burp Suite + OWASP ZAP —— 无需每年支付 400 美元的授权费。**
[](https://badge.fury.io/py/crabguard)
[](https://pypi.org/project/crabguard/)
[](https://pypi.org/project/crabguard/)
[](https://pypi.org/project/crabguard/)
[](LICENSE)
[](https://github.com/ashishjsharda/crabguard)
```
pip install crabguard
crabguard scan https://your-site.com
```
## 检测项目
| 类别 | 免费版(被动) | 专业版(主动) |
|---|:---:|:---:|
| 安全响应头(CSP, HSTS, XFO...) | ✅ | ✅ |
| Cookie 安全性(HttpOnly, Secure, SameSite) | ✅ | ✅ |
| TLS/HTTPS + 证书过期 | ✅ | ✅ |
| 混合内容 | ✅ | ✅ |
| 子资源完整性(SRI) | ✅ | ✅ |
| 存在漏洞的 JS 库 | ✅ | ✅ |
| CORS 配置不当 | ✅ | ✅ |
| 信息泄露 | ✅ | ✅ |
| SQL 注入(报错型 + 时间盲注) | — | ✅ |
| 反射型 XSS | — | ✅ |
| 敏感文件发现(.env, .git, ...) | — | ✅ |
| SSRF | — | ✅ |
| 开放重定向 | — | ✅ |
| 默认凭证 | — | ✅ |
| **PDF 报告** | — | ✅ |
| **白标报告** | — | ✅ |
## 快速开始
```
# 安装
pip install crabguard
# Passive scan(免费,无需账户)
crabguard scan https://example.com
# Full active scan(Pro — 需要 API key)
crabguard scan https://example.com --mode full --api-key YOUR_KEY --consent
# 保存为 PDF
crabguard scan https://example.com --format pdf --api-key YOUR_KEY
# 通过 Burp Suite / OWASP ZAP 路由
crabguard scan https://example.com --proxy http://127.0.0.1:8080
# 用于 CI/CD 的 JSON 输出
crabguard scan https://example.com --format json --quiet
echo $? # exit 1 if critical/high findings, 0 if clean
```
## Python API
```
from crabguard import CrabGuardScanner, CrabGuardConfig, ScanMode
# 免费 Passive scan
scanner = CrabGuardScanner("https://example.com", verbose=True)
report = scanner.scan()
scanner.save_report(report, "report.html")
# Pro Active scan
config = CrabGuardConfig(api_key="YOUR_KEY", active_consent=True)
scanner = CrabGuardScanner("https://example.com", mode=ScanMode.FULL, config=config)
report = scanner.scan()
scanner.save_report(report, "report.html")
scanner.save_report(report, "report.pdf", fmt="pdf")
# 以编程方式访问 findings
for finding in report.all_findings:
print(f"[{finding.severity.value.upper()}] {finding.title}")
if finding.remediation:
print(f" Fix: {finding.remediation}")
```
## CI/CD 集成(GitHub Actions)
```
- name: Security scan
run: |
pip install crabguard
crabguard scan ${{ env.STAGING_URL }} --format json --quiet
# Fails the build automatically if critical/high findings are found
```
## 报告示例
CrabGuard 会生成完整的 HTML 或 PDF 报告,内容包括:
- 总体安全评分(0–100)
- 各类别评分及 OWASP Top 10 映射
- 详细的发现结果,包含修复步骤和代码片段
- CrabGuard 品牌水印(专业版支持白标)
## 定价
| | 免费版 | 专业版 | 企业版 |
|---|:---:|:---:|:---:|
| 被动扫描 | ✅ | ✅ | ✅ |
| 主动扫描(SQLi, XSS, SSRF...) | — | ✅ | ✅ |
| PDF 报告 + 白标 | — | ✅ | ✅ |
| 扫描历史和仪表板 | — | — | ✅ |
| 团队席位 | — | — | ✅ |
| SLA + 优先支持 | — | — | ✅ |
| 价格 | 免费 | $49/月 | 联系我们 |
请在 **[ashishjsharda.github.io/crabguard](https://ashishjsharda.github.io/crabguard)** 获取你的 API key
## ⚠️ 负责任的使用
主动扫描会向目标服务器发送真实的 payload。**仅扫描你拥有或获得明确书面授权的系统。** 未经授权的扫描可能违反 CFAA 及类似法律。请始终传递 `--consent` 参数以确认你已获得授权。
## License
MIT —— 可免费使用、修改和分发。详见 [LICENSE](LICENSE)。
由 [CrabGuard Security](https://ashishjsharda.github.io/crabguard) ❤️ 构建
标签:CISA项目, DOE合作, Python, Web安全, 安全测试, 攻击性安全, 文档结构分析, 无后门, 蓝队分析, 逆向工具