A-z-exe/dns-intel

GitHub: A-z-exe/dns-intel

集 DNS 查询、子域名枚举、证书透明度查询、ASN 查询、域名关系可视化及持续监控告警于一体的命令行侦察工具。

Stars: 1 | Forks: 0

# 🔍 DNS 情报平台 ![Python](https://img.shields.io/badge/Python-3.8+-3776AB?style=flat&logo=python&logoColor=white) ![License](https://img.shields.io/badge/License-MIT-green?style=flat) ![Purpose](https://img.shields.io/badge/Purpose-Educational%20%26%20Defensive-blue?style=flat) ![Version](https://img.shields.io/badge/Version-1.1.0-orange?style=flat) ## ✨ 功能 | 功能 | 描述 | |---------|-------------| | 🔎 DNS 查询 | 查询所有记录类型(A、AAAA、MX、NS、TXT、CNAME、SOA) | | 🔄 反向 DNS | 针对 IP 的 PTR 记录解析 | | 📜 证书透明度 | 通过 crt.sh 发现子域名 | | 🌐 ASN 查询 | 通过 BGPView 获取组织和前缀信息 | | 🕵️ 子域名枚举 | 快速多线程暴力破解 | | 🕸️ 域名关系图 | 可视化关系映射(导出为 JSON) | | 💾 历史记录与对比 | 保存结果并检测随时间发生的变化 | | 🔔 DNS 监控 | 实时监控并发送 Telegram 提醒 | | 🚀 全面侦察 | 通过一条命令运行所有模块 | ## 📦 安装 ``` git clone https://github.com/A-z-exe/dns-intel.git cd dns-intel pip install -r requirements.txt ``` ## ⚙️ 配置 在项目根目录下创建一个 `.env` 文件: ``` TELEGRAM_TOKEN=your_bot_token_here TELEGRAM_CHAT_ID=your_chat_id_here ``` **如何获取 Telegram 凭证:** 1. 在 Telegram 上打开 `@BotFather` → `/newbot` → 复制 token 2. 在 Telegram 上打开 `@userinfobot` → 复制你的 Chat ID ## 🚀 用法 ### DNS 查询 ``` python cli.py dns example.com ``` ### 反向 DNS ``` python cli.py rdns 1.1.1.1 ``` ### 证书透明度 ``` python cli.py cert example.com ``` ### ASN 查询 ``` python cli.py asn 1.1.1.1 ``` ### 子域名枚举 ``` python cli.py sub example.com ``` ### 域名关系图 ``` python cli.py graph example.com # 输出:example.com_graph.json ``` ### 对比历史结果 ``` python cli.py compare example.com --type subdomains ``` ### 🔔 DNS 监控 + Telegram 提醒 ``` # 每小时监控 DNS records python cli.py monitor example.com --interval 3600 --type dns # 每 6 小时监控 subdomains python cli.py monitor example.com --interval 21600 --type subdomains # 每 12 小时监控 certificates python cli.py monitor example.com --interval 43200 --type cert ``` 当检测到变化时,你会收到类似以下的 Telegram 消息: ``` 🔔 DNS Change Detected 🌐 Domain: example.com ✅ Added: + 192.168.1.1 ❌ Removed: - 10.0.0.1 ``` ### 全面侦察(所有模块) ``` python cli.py full example.com ``` ## 📁 项目结构 ``` dns-intel/ ├── core/ │ ├── dns_lookup.py # DNS & Reverse DNS │ ├── cert_transparency.py # crt.sh integration │ ├── asn_lookup.py # BGPView ASN info │ └── subdomain_enum.py # Multithreaded bruteforce ├── monitor/ │ ├── watcher.py # DNS change detection │ └── alerts.py # Telegram notifications ├── graph/ │ └── domain_graph.py # Relationship graph builder ├── storage/ │ └── db.py # SQLite history & compare ├── cli.py # Main CLI interface ├── requirements.txt └── .env # Your credentials (not committed) ``` ## 📋 环境要求 ``` dnspython>=2.4.0 requests>=2.31.0 python-dotenv>=1.0.0 ``` ## ⚠️ 免责声明 本工具仅供**教育目的**和**授权的安全测试**使用。 请仅在您拥有或获得明确测试权限的域名上使用。 作者不对任何滥用行为负责。 ## 👤 作者 **AmirHossein Zarei** — [github.com/A-z-exe](https://github.com/A-z-exe) 🔐 安全研究员 | 🐍 Python 开发者 | 🐛 Bug Bounty 猎人
标签:DNS侦察, Python, 子域名枚举, 无后门, 系统安全, 资产测绘, 逆向工具