mrflippermen/SpiderFoot-URL-Parser
GitHub: mrflippermen/SpiderFoot-URL-Parser
一款用于从SpiderFoot CSV导出文件中提取、解析并规范化URL和子域名的命令行工具,支持与Nuclei、httpx等安全工具无缝对接。
Stars: 0 | Forks: 0
```
███████╗██████╗ ██╗██████╗ ███████╗██████╗ ███████╗ ██████╗ ██████╗ ████████╗
██╔════╝██╔══██╗██║██╔══██╗██╔════╝██╔══██╗██╔════╝██╔═══██╗██╔═══██╗╚══██╔══╝
███████╗██████╔╝██║██║ ██║█████╗ ██████╔╝█████╗ ██║ ██║██║ ██║ ██║
╚════██║██╔═══╝ ██║██║ ██║██╔══╝ ██╔══██╗██╔══╝ ██║ ██║██║ ██║ ██║
███████║██║ ██║██████╔╝███████╗██║ ██║██║ ╚██████╔╝╚██████╔╝ ██║
╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝
██╗ ██╗██████╗ ██╗ ██████╗ █████╗ ██████╗ ███████╗███████╗██████╗
██║ ██║██╔══██╗██║ ██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔════╝██╔══██╗
██║ ██║██████╔╝██║ ██████╔╝███████║██████╔╝███████╗█████╗ ██████╔╝
██║ ██║██╔══██╗██║ ██╔═══╝ ██╔══██║██╔══██╗╚════██║██╔══╝ ██╔══██╗
╚██████╔╝██║ ██║███████╗ ██║ ██║ ██║██║ ██║███████║███████╗██║ ██║
╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
```
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://www.spiderfoot.net/)
## 🇬🇧 English
### 描述
**SpiderFoot URL Parser** 是一个专门用于从 SpiderFoot 的 CSV 导出文件中提取和分析 URL 及子域名的工具。专为侦察自动化和工具链设计。
**主要特性:**
- 🔗 **强大的 URL 正则表达式** 支持 auth、fragments 和 IPv6
- 🌐 **子域名层级分析** 带有树状结构
- 🎯 **工具集成** (Nuclei, httpx, Amass)
- 📊 **多种导出格式** (JSON, CSV, TXT, Nuclei, httpx)
- 🔍 **高级过滤** 按端口、协议(scheme)和域名
- 📈 **URLInfo 数据类(Dataclass)** 用于结构化解析
### 为什么选择此工具?
SpiderFoot 收集了大量数据,**SpiderFoot URL Parser 提取关键信息**。非常适用于:
- 自动化侦察工作流
- Bug bounty 目标生成
- 与漏洞扫描器集成
- 资产发现和枚举
### 特性
✅ **企业级正则表达式**:支持复杂的 URL(auth、查询参数、fragments、IPv6)
✅ **子域名树**:对发现的子域名进行分层组织
✅ **Nuclei 集成**:直接输出到 Nuclei 目标列表
✅ **httpx 集成**:生成用于存活主机检测的探测列表
✅ **纯 Python**:无需任何外部依赖
✅ **类型安全**:基于 Dataclass 的架构
### 安装
```
git clone https://github.com/yourusername/SpiderFoot-URL-Parser.git
cd SpiderFoot-URL-Parser
pip install -r requirements.txt # No dependencies!
```
### 用法
#### 提取所有 URL
```
python src/spiderfoot_parser.py spiderfoot_export.csv
```
#### 提取域名的子域名
```
python src/spiderfoot_parser.py data.csv -d example.com
```
#### 生成 Nuclei 目标
```
python src/spiderfoot_parser.py data.csv -d example.com -f nuclei -o targets.txt
# Then run Nuclei
nuclei -l targets.txt -t nuclei-templates/ -o results.txt
```
#### 生成 httpx 探测列表
```
python src/spiderfoot_parser.py data.csv -f httpx -o domains.txt
# Then run httpx
httpx -l domains.txt -title -tech-detect -o live_hosts.txt
```
#### 导出为 JSON 以供分析
```
python src/spiderfoot_parser.py data.csv -d example.com -f json -o analysis.json
```
### 命令参考
```
positional arguments:
input SpiderFoot CSV file
optional arguments:
-d, --domain DOMAIN Base domain for subdomain filtering
-f, --format FORMAT Output format: txt, json, csv, nuclei, httpx (default: txt)
-o, --output FILE Output file (default: stdout for txt)
--urls-only Output only URLs (not subdomains)
--subdomains-only Output only subdomains
-v, --verbose Verbose output
```
### 集成示例
#### 完整侦察链
```
# 1. Parse SpiderFoot data
python src/spiderfoot_parser.py scan.csv -d target.com -f nuclei -o targets.txt
# 2. Run Nuclei vulnerability scan
nuclei -l targets.txt -t nuclei-templates/ -severity critical,high -o vulns.txt
# 3. Probe for live hosts
python src/spiderfoot_parser.py scan.csv -d target.com -f httpx -o domains.txt
httpx -l domains.txt -tech-detect -title -status-code -o live.txt
# 4. Extract for further analysis
python src/spiderfoot_parser.py scan.csv -d target.com -f json -o full_analysis.json
```
### 示例输出
#### 文本输出
```
=== URLs ===
https://www.example.com/
https://api.example.com/v1/users
https://admin.example.com:8443/login
=== Subdomains ===
www.example.com
api.example.com
admin.example.com
dev.example.com
```
#### JSON 输出
```
{
"total_urls": 1234,
"total_subdomains": 42,
"base_domain": "example.com",
"urls": [...],
"subdomains": [...],
"subdomain_tree": {
"example.com": [
"www.example.com",
"api.example.com"
]
},
"url_details": [...]
}
```
### 项目结构
```
SpiderFoot-URL-Parser/
├── src/
│ ├── spiderfoot_parser.py
│ └── __init__.py
├── examples/
│ ├── sample_output.json
│ └── README.md
├── requirements.txt # No dependencies!
├── .gitignore
├── LICENSE
└── README.md
```
## 🇪🇸 Español
### Descripción
**SpiderFoot URL Parser** es una herramienta especializada para extraer y analizar URLs y subdominios de exportaciones CSV de SpiderFoot. Diseñada para automatización de reconocimiento y encadenamiento de herramientas.
**Características Clave:**
- 🔗 **Regex Robusto de URL** soportando auth, fragments, IPv6
- 🌐 **Análisis Jerárquico de Subdominios**
- 🎯 **Integración con Herramientas** (Nuclei, httpx, Amass)
- 📊 **Múltiples Formatos de Exportación**
- 🔍 **Filtrado Avanzado** por puerto, esquema, dominio
### Instalación
```
git clone https://github.com/yourusername/SpiderFoot-URL-Parser.git
cd SpiderFoot-URL-Parser
# No requiere dependencias externas!
```
### Uso Básico
```
# Extraer URLs y subdominios
python src/spiderfoot_parser.py scan.csv -d ejemplo.com
# Generar lista para Nuclei
python src/spiderfoot_parser.py scan.csv -d ejemplo.com -f nuclei -o targets.txt
nuclei -l targets.txt -t nuclei-templates/
# Generar lista para httpx
python src/spiderfoot_parser.py scan.csv -f httpx -o dominios.txt
httpx -l dominios.txt -o hosts_vivos.txt
```
### Ejemplos de Integración
La herramienta se integra perfectamente con:
- **Nuclei**: Para escaneo de vulnerabilidades
- **httpx**: Para detección de hosts vivos
- **Amass**: Para enumeración adicional de subdominios
- **Subfinder**: Para descubrimiento pasivo
## 📋 要求
- Python 3.8+
- **无需外部依赖!** 纯 Python 实现
## 🔒 法律免责声明
**仅供授权的安全测试使用**
仅对您拥有或获得明确书面测试授权的域名使用此工具。
## 📜 许可证
MIT License - 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。
## 👤 作者
**Esteban Jiménez**
- 🏆 Hack The Box 厄瓜多尔第一名
- 🎯 Red Team Operator
- 🔗 [GitHub](https://github.com/virtualshoot)
## 🙏 致谢
- SpiderFoot 团队,感谢其提供的 OSINT 自动化
- ProjectDiscovery,感谢其提供的 Nuclei 和 httpx
- Bug bounty 社区,感谢其带来的工作流灵感
**⚠️ 请负责任地使用。祝您 hunting 愉快!**
标签:ESC4, OSINT, SpiderFoot插件, SYN扫描, URL解析, 域名解析, 运行时操纵, 逆向工具