genrex-bot/Reconx
GitHub: genrex-bot/Reconx
ReconX 是一款自动化侦察 CLI 工具,整合子域名枚举、OSINT 邮箱收集、Shodan 服务发现和技术指纹识别,并生成 HTML/PDF 报告。
Stars: 0 | Forks: 0
# ReconX 🔍
ReconX 是一个模块化的侦察框架,可自动化执行子域名枚举、OSINT 邮箱收集、Shodan 服务发现和技术指纹识别 —— 最终生成美观的 HTML 和 PDF 报告。
```
██████╗ ███████╗ ██████╗ ██████╗ ███╗ ██╗██╗ ██╗
██╔══██╗██╔════╝██╔════╝██╔═══██╗████╗ ██║╚██╗██╔╝
██████╔╝█████╗ ██║ ██║ ██║██╔██╗ ██║ ╚███╔╝
██╔══██╗██╔══╝ ██║ ██║ ██║██║╚██╗██║ ██╔██╗
██║ ██║███████╗╚██████╗╚██████╔╝██║ ╚████║██╔╝ ██╗
╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝
```



## 功能
| 模块 | 方法 | 描述 |
|--------|--------|-------------|
| **子域名 (Subdomains)** | 被动 + 主动 | Sublist3r (OSINT) + DNS 暴力破解 |
| **邮箱 / OSINT** | 被动 | theHarvester 覆盖 10+ 来源 |
| **Shodan** | 被动 API | 暴露的端口、banner、CVE |
| **指纹识别 (Fingerprinting)** | 主动 | Server、CMS、框架、CDN、headers |
| **报告 (Reports)** | — | HTML(暗色主题)+ PDF(可打印) |
## 安装说明
### 前置条件
- Python 3.9+
```
# 1. 克隆 repo
git clone https://github.com/genrex-bot/reconx.git
cd reconx
# 2. 安装 Python 依赖
pip install -r requirements.txt
# 3. 安装外部工具
pip install sublist3r
```
## API Key 设置
ReconX 使用以下外部 API。每一个都是可选的 —— 如果缺少某个 key,则该模块将被跳过并发出警告,其余功能仍会正常运行。
### 🔑 Shodan API *(被用于:`--modules shodan`)*
Shodan 用于查找目标 IP 暴露的服务、开放的端口和已知的 CVE。
**第 1 步 —— 获取你的 key(免费)**
1. 访问 [https://account.shodan.io/register](https://account.shodan.io/register) 并创建一个免费账号
2. 登录后,前往 [https://account.shodan.io/](https://account.shodan.io/)
3. 你的 API key 会显示在控制面板顶部 —— 复制它
**第 2 步 —— 设置你的 key**
```
# 复制 config 模板
cp config.example.ini config.ini
# 打开 config.ini 并将占位符替换为你的 key
SHODAN_API_KEY = paste_your_key_here
```
或者改用环境变量:
```
export SHODAN_API_KEY=paste_your_key_here
```
或者在运行时直接传入:
```
python reconx.py -d example.com --shodan-key paste_your_key_here
```
### 🔑 theHarvester 来源 *(被用于:`--modules emails`)*
theHarvester 是一个独立的工具 —— 它**不需要** API key 即可使用大多数来源(Bing、DuckDuckGo、CRT.sh 等)。不过 theHarvester 内部的某些高级来源支持可选的 key。
**安装 theHarvester:**
```
pip install theHarvester
```
完成 —— 开箱即用,无需 key 即可进行被动 OSINT。
### 🔑 Sublist3r *(被用于:`--modules subdomains`)*
Sublist3r 从公开来源抓取子域名。它**不需要 API key**。
**安装:**
```
pip install sublist3r
```
### 配置文件概览
运行 `cp config.example.ini config.ini` 后,你的 `config.ini` 看起来会是这样的:
```
[api_keys]
SHODAN_API_KEY = your_key_here ← only key needed right now
[settings]
threads = 10 ← DNS brute force thread count
timeout = 10 ← request timeout in seconds
report_format = both
output_dir = reports/output
```
### Key 优先级顺序
如果你在多个地方设置了 key,ReconX 将按以下优先级使用:
```
--shodan-key flag > SHODAN_API_KEY env var > config.ini
```
## 使用说明
### 基础全面扫描
```
python reconx.py -d example.com
```
### 仅被动扫描(无 DNS 暴力破解,无主动请求)
```
python reconx.py -d example.com --passive-only
```
### 仅运行特定模块
```
python reconx.py -d example.com --modules subdomains,emails
```
### 包含 Shodan
```
python reconx.py -d example.com --shodan-key YOUR_KEY
```
### 自定义输出目录和格式
```
python reconx.py -d example.com --output /tmp/reports --format pdf
```
### 自定义 DNS 字典 + 更多线程
```
python reconx.py -d example.com --wordlist wordlist.txt --threads 30
```
### 详细输出全面扫描
```
python reconx.py -d example.com --verbose
```
## 所有 CLI 参数
```
usage: reconx [-h] -d DOMAIN [--passive-only | --active-only]
[--modules MODULE1,MODULE2] [--shodan-key API_KEY]
[--output DIR] [--format {html,pdf,both,json}]
[--threads N] [--wordlist FILE] [--timeout SEC]
[--verbose] [--no-banner] [--version]
Options:
-d, --domain Target domain (required)
--passive-only Passive recon only (no DNS brute force)
--active-only Active recon only
--modules Comma-separated module list (default: all)
--shodan-key Shodan API key
-o, --output Output directory (default: reports/output)
-f, --format Report format: html | pdf | both | json
--threads DNS brute force thread count (default: 10)
--wordlist Custom wordlist file for DNS brute force
--timeout Request timeout in seconds (default: 10)
-v, --verbose Verbose output
--no-banner Suppress ASCII banner
--version Show version
```
## 报告
报告默认保存到 `reports/output/`:
```
reports/output/
├── example.com_20240615_143022_recon.html ← dark-themed, interactive
└── example.com_20240615_143022_recon.pdf ← printable PDF
```
## 项目结构
```
reconx/
├── reconx.py # CLI entry point
├── requirements.txt
├── config.example.ini # Config template (commit this)
├── config.ini # Your actual keys (DO NOT commit — gitignored)
├── modules/
│ ├── subdomain_enum.py # Sublist3r + DNS brute force
│ ├── harvester.py # theHarvester OSINT
│ ├── shodan_scan.py # Shodan API
│ └── fingerprint.py # Technology detection
├── reports/
│ ├── generator.py # HTML + PDF report builder
│ └── output/ # Generated reports (gitignored)
├── utils/
│ ├── config_loader.py # Loads keys from config/env/CLI
│ ├── logger.py
│ └── helpers.py
└── logs/ # Scan logs (gitignored)
```
## 法律免责声明
本工具仅供**教育和授权的安全测试目的**使用。作者不对因使用本工具而造成的任何滥用或损坏负责。在扫描任何不属于你的域名或系统之前,请务必获得明确的书面许可。
## 许可证
MIT 许可证 —— 见 [LICENSE](LICENSE)
标签:ESC4, GitHub, OSINT, Python, 实时处理, 密码管理, 无后门, 资产测绘, 逆向工具