Akira-KD/Subhunt

GitHub: Akira-KD/Subhunt

一款基于 Python 的多线程 OSINT 子域名枚举工具,支持 DNS 解析、HTTP/HTTPS 验证和子域名排列生成。

Stars: 0 | Forks: 0

# SubHunt 一款用 Python 编写的快速、多线程 OSINT 子域名枚举工具。SubHunt 通过执行 DNS 解析来发现子域名,并可选择验证其 HTTP/HTTPS 状态。 ## 目录 - [特性](#features) - [安装](#installation) - [用法](#usage) - [基本扫描](#basic-scanning) - [带 HTTP 验证](#with-http-verification) - [排列模式](#permutation-mode) - [输出到文件](#output-to-file) - [选项](#options) - [开发](#development) - [许可证](#license) ## 特性 - **快速 DNS 解析**:使用多线程并发解析子域名。 - **HTTP/HTTPS 验证**:可选的状态检查;优先尝试 HTTPS(如果端口 443 可达),然后回退到 HTTP。 - **子域名排列**:使用字典条目生成排列(例如 `api-admin`、`api.admin`)。 - **安全限制**:内置排列限制以防止意外的内存膨胀;使用 `--force-permute` 覆盖。 - **详细日志**:通过 `-v` 标志输出调试信息。 - **文件输出**:使用 `-o` 将结果保存到文件。 - **内置字典**:包含一份精选的常见子域名列表;可使用 `-w` 自带字典。 ## 安装 ### 从源码安装(可编辑安装) ``` git clone https://github.com/Akira-KD/subhunt.git cd subhunt pip install -e . ``` ### 从包安装(发布后) ``` pip install subhunt ``` ## 用法 ### 基本扫描 使用内置字典扫描常见子域名: ``` subhunt example.com ``` ### 带 HTTP 验证 检查已解析子域名的 HTTP/HTTPS 状态: ``` subhunt example.com --verify-http ``` ### 排列模式 生成子域名排列(例如 `api-admin`、`api.admin`): ``` subhunt example.com --permute ``` ⚠️ **警告**:排列会使字典大小成倍增加。例如,一个 46 个词的列表会生成 46 × 45 = 2,070 个排列。使用 `--max-permutations` 设置安全限制(默认:10,000)。如有需要,使用 `--force-permute` 强制覆盖。 ### 自定义字典 使用自定义字典: ``` subhunt example.com -w /path/to/wordlist.txt ``` ### 输出到文件 保存结果: ``` subhunt example.com --verify-http -o results.txt ``` ### 高级选项 调整线程数和请求延迟: ``` subhunt example.com -t 20 --delay 0.5 ``` ## 选项 ``` usage: subhunt [-h] [-w WORDLIST] [-t THREADS] [--permute] [--max-permutations MAX_PERMUTATIONS] [--force-permute] [--delay DELAY] [-o OUTPUT] [-v] [--verify-http] domain positional arguments: domain Target domain optional arguments: -h, --help Show this help message and exit -w, --wordlist WORDLIST Path to wordlist file (default: bundled) -t, --threads THREADS Number of threads (default: 10) --permute Enable subdomain permutations --max-permutations INT Maximum allowed permutations (default: 10000) --force-permute Force generating permutations beyond limit --delay DELAY Delay between requests in seconds (default: 0.0) -o, --output OUTPUT Save results to file -v, --verbose Enable verbose logging --verify-http Verify HTTP/HTTPS status ``` ## 开发 ### 设置 ``` pip install -r requirements-dev.txt ``` ### 运行测试 ``` pytest ``` ### 运行 Lint ``` ruff check . ``` ## 许可证 本项目基于 **MIT License** 授权。详情请参阅 [LICENSE](LICENSE) 文件。
标签:DNS解析, GitHub, HTTP探测, Kali工具, OSINT工具, Python, VEH, 加密文件系统, 域名爆破, 子域名挖掘, 子域名枚举, 字典攻击, 安全扫描, 密码管理, 开源项目, 插件系统, 无后门, 时序注入, 端口检查, 系统安全, 网络安全, 蓝队侦察, 逆向工具, 隐私保护