COOLXPLO/ScanX
GitHub: COOLXPLO/ScanX
一款集成端口扫描、目录爆破、子域名枚举及 SSL 与 HTTP 头部审计的安全扫描工具,同时提供 Web UI 和命令行两种使用方式。
Stars: 2 | Forks: 0
# ScanX v2.0
```
███████╗ ██████╗ █████╗ ███╗ ██╗██╗ ██╗
██╔════╝██╔════╝██╔══██╗████╗ ██║╚██╗██╔╝
███████╗██║ ███████║██╔██╗ ██║ ╚███╔╝
╚════██║██║ ██╔══██║██║╚██╗██║ ██╔██╗
███████║╚██████╗██║ ██║██║ ╚████║██╔╝ ██╗
╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝
```
## 功能
| 模块 | 描述 |
|--------|-------------|
| 🔌 **TCP 端口扫描器** | 快速异步扫描,支持 banner 抓取与服务探测 |
| 📡 **UDP 扫描器** | 扫描常见 UDP 端口(DNS、SNMP、NTP 等)并进行协议探测 |
| 📂 **目录暴力破解器** | 路径枚举与扩展名 fuzzing(类似 gobuster) |
| 🌐 **子域名枚举器** | 通过 DNS 暴力破解发现子域名 |
| 🔒 **SSL/TLS 检测器** | 证书信息、过期时间、密码套件、已弃用协议检测 |
| 🛡️ **HTTP 头部审计器** | 安全头部检查(HSTS、CSP、X-Frame-Options 等) |
**Web UI** 和 **CLI** 提供相同的功能。
## 安装说明
### 前置条件
- Python 3.9+
- pip
```
# Clone the repo
git clone https://github.com/iamunknown77/scanx.git
cd scanx
# Install dependencies
pip install -r requirements.txt
```
## 用法
### 🖥️ Web UI(浏览器)
**Linux / macOS:**
```
bash run.sh
```
**Windows:**
```
run.bat
```
然后在浏览器中打开 → **http://localhost:8000**
_(后端运行在端口 8000;`index.html` 前端会自动连接到它。)_
或者手动启动:
```
python scanner_backend.py
# 然后在你的 browser 中打开 index.html
```
### 💻 终端 CLI(类似 nmap / gobuster)
```
python scanx_cli.py [options]
```
#### TCP 端口扫描
```
# Scan top 100 ports(默认)
python scanx_cli.py portscan -H 192.168.1.1
# Specific ports
python scanx_cli.py portscan -H 192.168.1.1 -p 22,80,443,8080-8090
# Top 1000 ports,保存为 JSON
python scanx_cli.py portscan -H 192.168.1.1 --preset top1000 -o results.json -f json
# Full scan(所有 65535 ports)
python scanx_cli.py portscan -H 192.168.1.1 --preset full
```
#### UDP 扫描
```
python scanx_cli.py udpscan -H 192.168.1.1
python scanx_cli.py udpscan -H 192.168.1.1 -p 53,161,123
```
#### 目录暴力破解
```
# Built-in wordlist
python scanx_cli.py dirscan -u https://example.com
# Custom wordlist + extensions
python scanx_cli.py dirscan -u https://example.com -w wordlist.txt --ext php,html,txt
# 仅显示特定的 status codes
python scanx_cli.py dirscan -u https://example.com -c 200,403
```
#### 子域名枚举
```
python scanx_cli.py subdomain -d example.com
python scanx_cli.py subdomain -d example.com -w subs.txt -o found.csv -f csv
```
#### SSL/TLS 检测
```
python scanx_cli.py sslcheck -H example.com
python scanx_cli.py sslcheck -H example.com -p 8443
```
#### HTTP 头部审计
```
python scanx_cli.py headers -u https://example.com
python scanx_cli.py headers -u https://example.com -o headers.json -f json
```
## CLI 参数参考
| 参数 | 描述 |
|------|-------------|
| `-H`, `--host` | 目标主机名或 IP |
| `-u`, `--url` | 目标 URL |
| `-d`, `--domain` | 目标域名 |
| `-p`, `--ports` | 端口:`80`, `80,443`, `1-1000` |
| `--preset` | `top100` / `top1000` / `full` |
| `-w`, `--wordlist` | 字典文件路径 |
| `-x`, `--ext` | 文件扩展名(例如 `php,html,txt`) |
| `-T`, `--threads` | 并发数(默认值因模式而异) |
| `--timeout` | 超时时间(以秒为单位) |
| `-o`, `--output` | 输出文件名 |
| `-f`, `--format` | `txt` / `json` / `csv` |
## 文件结构
```
scanx/
├── index.html # Web UI frontend (open in browser)
├── scanner_backend.py # FastAPI backend (WebSocket API)
├── scanx_cli.py # Terminal CLI tool
├── favicon.svg # Browser tab icon
├── requirements.txt # Python dependencies
├── run.sh # Linux/macOS launcher
├── run.bat # Windows launcher
├── README.md
└── LICENSE
```
## 字典
ScanX 内置了用于目录和子域名扫描的字典。
如需更彻底的测试,请使用外部字典:
- [SecLists](https://github.com/danielmiessler/SecLists)
- [dirb common.txt](https://github.com/v0re/dirb/blob/master/wordlists/common.txt)
- [Sublist3r](https://github.com/aboul3la/Sublist3r)
使用 SecLists 的示例:
```
python scanx_cli.py dirscan -u https://example.com \
-w /usr/share/seclists/Discovery/Web-Content/common.txt
python scanx_cli.py subdomain -d example.com \
-w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
```
## 输出格式
所有 CLI 命令均支持 `-o FILE -f FORMAT`:
```
# JSON(结构化,最适合 scripting)
python scanx_cli.py portscan -H 10.0.0.1 -o scan.json -f json
# CSV(最适合 spreadsheets)
python scanx_cli.py dirscan -u https://example.com -o dirs.csv -f csv
# TXT(tab-separated,默认)
python scanx_cli.py subdomain -d example.com -o subs.txt -f txt
```
## 许可证
MIT — 详见 [LICENSE](LICENSE)
标签:AV绕过, FastAPI, GraphQL安全矩阵, Python, Web安全, 后端开发, 子域名枚举, 安全扫描器, 密码管理, 插件系统, 数据统计, 无后门, 目录爆破, 端口扫描, 系统安全, 蓝队分析, 逆向工具