mzuhairkhan3/PyRecon

GitHub: mzuhairkhan3/PyRecon

一款用纯 Python 从零实现的多线程 TCP 端口扫描器,支持 Banner 抓取与服务指纹识别。

Stars: 0 | Forks: 0

# PyRecon 一个使用 Python 从零开始构建的多线程 TCP 端口扫描器 —— 不依赖 nmap,没有捷径。 支持 TCP connect 扫描、Banner 抓取、服务指纹识别,并输出格式化报告。 ## 功能特性 - 通过 Python socket 执行原生 TCP connect 扫描 - 使用 `ThreadPoolExecutor` 的多线程引擎 —— 比顺序执行快 100 倍 - 支持 HTTP、SSH、FTP、SMTP 等协议探测的 Banner 抓取 - 针对 40 多种已知软件特征的服务指纹识别 - 彩色终端输出 - 导出报告至 `.txt` 文件 ## 用法 ``` # 基础扫描 python pyrecon.py -t scanme.nmap.org -p 1-1024 # 保存报告到文件 python pyrecon.py -t scanme.nmap.org -p 1-1024 --output report.txt # 具有高线程数的完整端口范围 python pyrecon.py -t 192.168.1.1 -p 1-65535 --threads 300 --output full.txt # 特定端口 python pyrecon.py -t 10.0.0.1 -p 22,80,443 # Sequential 模式(debug) python pyrecon.py -t scanme.nmap.org -p 1-100 --no-threads ``` ## 参数标志 | 标志 | 描述 | 默认值 | |------|-------------|---------| | `-t`, `--target` | 目标主机名或 IP | 必填 | | `-p`, `--ports` | 端口范围、列表或单个端口 | 必填 | | `--threads` | 并发线程数 | 100 | | `--timeout` | 单端口超时时间(秒) | 1.0 | | `--output` | 将报告保存至文件 | None | | `--no-threads` | 顺序扫描模式 | False | ## 安装说明 ``` git clone https://github.com/mzuhairkhan3/PyRecon.git cd PyRecon python3 -m venv venv && source venv/bin/activate pip install -r requirements.txt ``` ## 项目结构 pyrecon/ ├── pyrecon.py # CLI 入口 ├── scanner/ │ ├── tcp.py # Socket 逻辑与线程引擎 │ ├── fingerprint.py # 服务映射与 Banner 特征 │ └── report.py # 报告生成器与文件输出 └── requirements.txt ## 法律声明 请仅对您拥有或获得明确授权的系统使用本工具。 未经授权的端口扫描在您所在的司法管辖区可能属于违法行为。 ## 展示技能 TCP/IP 网络 · Python socket · 并发编程 · Banner 抓取 · 服务指纹识别 · CLI 设计 · 威胁报告
标签:Python, Scrypt密钥派生, 云存储安全, 插件系统, 数据统计, 文档结构分析, 无后门, 服务器安全, 服务指纹识别, 端口扫描, 网络扫描, 逆向工具