tommyvercetti89/ospy

GitHub: tommyvercetti89/ospy

Ospy 是一款强制通过 Tor 运行的 APT 级被动 OSINT 情报收集引擎,支持对域名、IP、用户名、邮箱等多种目标进行递归式的匿名侦察。

Stars: 0 | Forks: 0

# Ospy 👁️‍🗨️

Ospy Logo

Python Version Version Status License Tor Required Modules

Ospy 不是漏洞扫描器或漏洞利用工具。它是一款专为真正的匿名性而设计的 **APT 级被动侦察引擎**。它完全通过 Tor 网络(Ghost Protocol)运行,被动抓取、映射和分析目标的 Domain、IP Address、Username、Email、Crypto Wallet 和 Hash,全程不会与目标基础设施建立任何可识别的连接。 由 **[@tommyvercetti89](https://github.com/tommyvercetti89)** 开发。 架构与 v2 升级由 **[Antigravity](https://deepmind.google/)** (Google DeepMind) 协助完成。 ## ⚠️ 法律免责声明 **关键提示:Ospy 仅专为授权的情报收集、教育研究和防御性威胁分析而构建。** 1. 在分析目标的数字足迹之前,你**必须**获得目标明确且书面的许可。 2. 开发者**不承担任何责任**,并且不对因使用此工具而导致的任何滥用、损害或非法追踪负责。 3. 一旦运行 Ospy,即表示你自动同意这些条款。 ## 🕷️ 核心功能 ### 核心引擎 (v2) * **Ghost Protocol(强制):** 如果本地 Tor SOCKS5 proxy (`127.0.0.1:9050`) 未激活,Ospy 将拒绝运行。你的真实 IP 绝不会被泄露。 * **并行 Async 引擎:** 所有 OSINT 模块通过 `asyncio.gather()` **并发**运行,比顺序扫描快得多。 * **真正的递归 Spidering:** Ospy 会扫描 Domain,发现 Email,将这些 Email 输入到新的扫描中,查找 Username,递归检查 GitHub 上泄露的凭证,直到你按下 `Ctrl+C`。 * **跨平台 Daemon:** 后台监视模式 (`--daemon`) 可在 **Windows**、Linux 和 macOS 上运行。 * **集中式日志记录:** 所有活动都会记录到 `logs/` 目录下带有时间戳的会话文件中。 * **Webhook 告警:** 关键发现(暗网提及、恶意 IP、数据泄露)会触发即时的 **Discord** 和/或 **Telegram** 通知。 * **重试引擎:** 失败的 HTTP 请求会通过指数退避自动重试。 ### OSINT 模块(共 25 个) | 模块 | 目标类型 | 描述 | |--------|-------------|-------------| | `domain_osint` | domain | IP 解析、WHOIS 注册数据 | | `ip_osint` | ip / domain | 地理定位、异步隐蔽端口扫描 | | `web_osint` | domain | HTTP 标头、WAF 指纹识别、子域名枚举 | | `dns_osint` | domain | SPF / DMARC 欺骗漏洞分析 | | `tech_osint` | domain | 通过 Wappalyzer 签名进行完整技术栈检测 | | `dork_osint` | domain | DuckDuckGo 自动化 Google 风格 dorking | | `cloud_osint` | domain | AWS S3 存储桶枚举(公开 / 私有) | | `wayback_osint` | domain | Wayback Machine 历史 endpoint 发现 | | `corp_osint` | domain | LinkedIn 员工抓取 + Email 模式生成 | | `empire_osint` | domain | 反向 WHOIS:发现相关的隐藏 domain | | `doc_osint` | domain | 通过 Tor 在 DDG 上搜索 9 种暴露的文档类型(PDF、Word、Excel、PPT、CSV、config、backup、log、txt) | | `social_osint` | username | 通过 Tor 在 35 个平台上进行 Sherlock 风格的存在性检查 | | `identity_osint` | email / username | RFC-5322 验证、DNS MX 查询、300+ 一次性域名检查以及技术性 username 分析 | | `darkweb_osint` | domain / username / email | Ahmia 暗网 Spider + .onion 深度抓取 | | `git_osint` | username / domain | GitHub 公开仓库 + TruffleHog 安全建议 | | `crypto_osint` | crypto / username | Bitcoin 区块链余额及交易映射 | | `hash_osint` | hash / email | 通过 Tor 解密 MD5、SHA1、SHA256、SHA512 并检测 NTLM/bcrypt | | `iot_osint` | ip / domain | Shodan InternetDB:开放端口、CVE、SCADA 检测 | | **`virustotal_osint`** ⭐ | domain / ip / hash | VirusTotal v3 多厂商信誉度(需要 API 密钥) | | **`hibp_osint`** ⭐ | email | HaveIBeenPwned 泄露与粘贴查询(需要 API 密钥) | | **`abuseipdb_osint`** ⭐ | ip | AbuseIPDB 置信度评分及滥用历史(需要 API 密钥) | | **`crtsh_osint`** ⭐ | domain | 证书透明性子域名枚举(免费) | | **`urlscan_osint`** ⭐ | domain | URLScan.io 历史扫描(免费,API 密钥可选) | | **`greynoise_osint`** ⭐ | ip | GreyNoise IP 噪音/上下文(免费社区 endpoint) | ### 报告格式 | 标志 | 输出 | |------|--------| | `--txt` | 纯文本摘要 | | `--json` | 机器可读的 JSON(用于自动化 pipeline) | | `--pdf` | 通过 ReportLab 生成的专业 PDF 报告 | | `--graph` | **交互式 Vis.js 节点情报地图**(HTML — 推荐) | ## 🛠️ 安装说明 **前置条件:** Python 3.10+、Git、Tor ``` git clone https://github.com/tommyvercetti89/ospy.git cd ospy pip install -r requirements.txt pip install python-Wappalyzer duckduckgo-search ``` **启动 Tor:** * **Linux / macOS:** `sudo systemctl start tor` * **Windows:** 启动 Tor Browser,或安装 Tor 独立服务,Ospy 需要端口 `127.0.0.1:9050` 处于活动状态。 **配置 API 密钥(可选,但强烈推荐):** ``` cp config/.env.example config/.env # 打开 config/.env 并填写你的密钥 ``` ## 🔑 API 密钥 所有 API 密钥均为可选。未配置密钥的模块将优雅跳过并输出状态信息。 | 密钥 | 服务 | 免费层级 | |-----|---------|-----------| | `VIRUSTOTAL_API_KEY` | VirusTotal | 500 次请求/天 | | `HIBP_API_KEY` | HaveIBeenPwned | 付费($3.50/月) | | `ABUSEIPDB_API_KEY` | AbuseIPDB | 1,000 次请求/天 | | `URLSCAN_API_KEY` | URLScan.io | 免费(搜索无需密钥) | | `GREYNOISE_API_KEY` | GreyNoise | 免费社区层级 | | `SHODAN_API_KEY` | Shodan | 付费 | | `HUNTER_API_KEY` | Hunter.io | 25 次请求/月 | ## 🚀 使用说明 ``` python ospy.py -t --type [OPTIONS] ``` ### 目标类型 | `--type` | 触发模块 | |----------|------------------| | `domain` | 企业映射、dorking、子域名、技术栈、CVE、crt.sh、URLScan | | `ip` | Geo-IP、端口扫描、AbuseIPDB、GreyNoise、Shodan IoT、VirusTotal | | `username` | Sherlock 社交追踪、暗网 spider、GitHub 泄露检查 | | `email` | HIBP 泄露查询、身份映射、暗网提及 | | `crypto` | Bitcoin 区块链余额 / 交易追踪 | | `hash` | MD5 彩虹表解密、VirusTotal 文件信誉度 | ### 示例 ``` # 通过交互式 intelligence graph 进行全面域名扫描 python ospy.py -t targetcompany.com --type domain --depth 2 --graph --agree # 跨所有平台追踪用户名 python ospy.py -t some_username --type username --pdf --agree # Email 泄露和 dark-web 检查 python ospy.py -t user@example.com --type email --json --agree # IP 威胁情报 python ospy.py -t 1.2.3.4 --type ip --txt --agree # Hash 查找 python ospy.py -t 5f4dcc3b5aa765d61d8327deb882cf99 --type hash --txt --agree # 部署后台每小时监视器 python ospy.py -t targetcompany.com --type domain --daemon --agree python ospy.py --daemon-status python ospy.py --daemon-stop ``` ### 关键选项 | 标志 | 描述 | |------|-------------| | `--depth N` | 递归深度:`1` = 仅目标 · `2` = + 发现的目标 · `3` = 深度 | | `--graph` | **推荐** — 交互式 Vis.js 节点情报地图 | | `--agree` | 自动接受法律免责声明(用于脚本和自动化) | | `--daemon` | 作为后台每小时监视进程运行 | ## 🔔 通知(可选) 在 `config/.env` 中配置 Discord / Telegram webhook,以便在发现关键结果(暗网提及、高滥用分数 IP、已确认的数据泄露)时接收**即时告警**。 ``` DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/... TELEGRAM_BOT_TOKEN=123456:ABC-DEF... TELEGRAM_CHAT_ID=123456789 ``` ## 📚 文档 | 语言 | 指南 | |----------|-------| | 🇹🇷 土耳其语 | [GUIDE.md](GUIDE.md) | | 🇬🇧 英语 | [GUIDE_EN.md](GUIDE_EN.md) | ## 📄 许可证 [MIT](https://choosealicense.com/licenses/mit/)
标签:ESC4, GitHub, OSINT, Python, Tor, 匿名网络, 安全工具库, 实时处理, 异步框架, 无后门, 被动侦察, 计算机取证, 逆向工具