theultimatederek/XSSProbe
GitHub: theultimatederek/XSSProbe
一款基于 Python 的 XSS 漏洞扫描器,通过智能爬虫和 Payload 注入实现 Web 应用跨站脚本漏洞的自动化检测与报告生成。
Stars: 1 | Forks: 0
# 🔍 XSSProbe — Web 漏洞扫描器
[](LICENSE)
[](https://www.python.org/)
[](https://owasp.org/www-community/attacks/xss/)
[](https://github.com/YOUR_USERNAME/XSSProbe/pulls)
[](https://github.com/YOUR_USERNAME/XSSProbe)
## ✨ 功能
- 🕷️ **智能爬虫** — BFS 爬取并保持在同一域名下,收集所有链接和表单
- 💉 **20 个 XSS Payload** — 包含基础型、事件型、编码型以及绕过过滤器向量
- 🔍 **双重注入** — 同时测试 URL GET 参数和 HTML 表单 POST/GET 字段
- 📊 **实时仪表盘** — 实时统计数据(页面数、测试数、漏洞数、耗时)
- 📋 **实时日志** — 每个请求带有颜色编码的终端输出
- ⚠️ **漏洞检查器** — 独立标签页显示所有漏洞及其 payload + 证据
- 📄 **3 种报告格式** — HTML(暗黑主题样式)+ JSON + CSV
- 🖥️ **GUI + CLI** — 适用于演示的暗黑赛博朋克 GUI,适用于自动化的 CLI
- 🍪 **Cookie 认证** — 传递 session cookie 以扫描经过身份验证的页面
- 🎯 **快捷目标** — 一键预设 DVWA、testphp.vulnweb.com
## 🚀 如何运行
### 前置条件
- Python 3.9+
- pip
### 安装说明
```
# 1. 克隆仓库
git clone https://github.com/YOUR_USERNAME/XSSProbe.git
cd XSSProbe
# 2. 安装依赖
pip install -r requirements.txt
# 3a. 启动 GUI
python gui.py
# 3b. 或者使用 CLI
python cli.py -u http://testphp.vulnweb.com -p 20
```
### CLI 选项
```
python cli.py -u [options]
-u, --url Target URL (required)
-p, --pages Max pages to crawl (default: 10)
-d, --delay Delay between requests in seconds (default: 0.3)
-c, --cookie Session cookie string (e.g. PHPSESSID=abc123)
-o, --output Output directory for reports (default: reports/)
```
## 🗂️ 项目结构
```
XSSProbe/
│
├── gui.py # GUI application (customtkinter dark theme)
├── cli.py # Command-line interface
├── scanner.py # Core scan engine (crawler + injector + analyzer)
├── reporter.py # HTML / JSON / CSV report generator
├── requirements.txt
│
├── reports/ # Generated scan reports (auto-created)
│ ├── xss_report_TIMESTAMP.html
│ ├── xss_report_TIMESTAMP.json
│ └── xss_report_TIMESTAMP.csv
│
└── README.md
```
## 🔬 工作原理
```
Target URL entered
↓
Phase 1 — BFS Crawl
→ Collect all same-domain links
→ Discover URL parameters
→ Find all HTML forms (GET + POST)
↓
Phase 2 — Payload Injection
→ Inject each of 20 XSS payloads into every parameter
→ For forms: replace each input field with payload
→ Send GET/POST request with injected data
↓
Phase 3 — Reflection Analysis
→ Check if payload appears verbatim in response HTML
→ Check for partial reflection markers (onerror, onload, alert etc.)
↓
Phase 4 — Report Generation
→ Save vulnerable URL + parameter + payload + evidence
→ Generate HTML, JSON, CSV reports
```
## 💉 Payload 分类
| 分类 | 示例 |
|---|---|
| 基础 script | `` |
| 事件型 | `
` |
| SVG 向量 | `
标签:BeEF, Python, Splunk, Web漏洞扫描器, XSS检测, 图形界面(GUI), 无后门, 爬虫, 逆向工具