{"id":13813684,"url":"https://github.com/boy-hack/ksubdomain","last_synced_at":"2026-03-07T20:32:17.971Z","repository":{"id":38141846,"uuid":"420709383","full_name":"boy-hack/ksubdomain","owner":"boy-hack","description":"Subdomain enumeration tool, asynchronous dns packets, use pcap to scan 1600,000 subdomains in 1 second","archived":false,"fork":false,"pushed_at":"2026-02-26T07:18:20.000Z","size":10493,"stargazers_count":1175,"open_issues_count":8,"forks_count":161,"subscribers_count":15,"default_branch":"main","last_synced_at":"2026-02-26T08:13:27.444Z","etag":null,"topics":["bugbounty","hacker-tools","subdomain"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boy-hack.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-24T14:37:09.000Z","updated_at":"2026-02-25T08:35:58.000Z","dependencies_parsed_at":"2024-07-23T16:17:17.706Z","dependency_job_id":"e6159a6c-4cb0-437e-beaf-c6105fd3adcb","html_url":"https://github.com/boy-hack/ksubdomain","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/boy-hack/ksubdomain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boy-hack%2Fksubdomain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boy-hack%2Fksubdomain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boy-hack%2Fksubdomain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boy-hack%2Fksubdomain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boy-hack","download_url":"https://codeload.github.com/boy-hack/ksubdomain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boy-hack%2Fksubdomain/sbom","scorecard":{"id":31159,"data":{"date":"2025-08-11","repo":{"name":"github.com/boy-hack/ksubdomain","commit":"3f3a68a69d0adaa93030a8adbc6d993d9fdbca88"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:93: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:135: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:93: update your workflow using https://app.stepsecurity.io/secureworkflow/boy-hack/ksubdomain/test.yml/main?enable=pin","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.3.1 not signed: https://api.github.com/repos/boy-hack/ksubdomain/releases/212711153","Warn: release artifact v2.3 not signed: https://api.github.com/repos/boy-hack/ksubdomain/releases/212561201","Warn: release artifact v2.2.2 not signed: https://api.github.com/repos/boy-hack/ksubdomain/releases/212551212","Warn: release artifact v2.2.1 not signed: https://api.github.com/repos/boy-hack/ksubdomain/releases/212073040","Warn: release artifact v2.2 not signed: https://api.github.com/repos/boy-hack/ksubdomain/releases/212071439","Warn: release artifact v2.3.1 does not have provenance: https://api.github.com/repos/boy-hack/ksubdomain/releases/212711153","Warn: release artifact v2.3 does not have provenance: https://api.github.com/repos/boy-hack/ksubdomain/releases/212561201","Warn: release artifact v2.2.2 does not have provenance: https://api.github.com/repos/boy-hack/ksubdomain/releases/212551212","Warn: release artifact v2.2.1 does not have provenance: https://api.github.com/repos/boy-hack/ksubdomain/releases/212073040","Warn: release artifact v2.2 does not have provenance: https://api.github.com/repos/boy-hack/ksubdomain/releases/212071439"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T19:08:52.414Z","repository_id":38141846,"created_at":"2025-08-14T19:08:52.414Z","updated_at":"2025-08-14T19:08:52.414Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30229744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bugbounty","hacker-tools","subdomain"],"created_at":"2024-08-04T04:01:25.702Z","updated_at":"2026-03-07T20:32:17.934Z","avatar_url":"https://github.com/boy-hack.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# KSubdomain: 极速无状态子域名爆破工具\n\n[![Release](https://img.shields.io/github/release/boy-hack/ksubdomain.svg)](https://github.com/boy-hack/ksubdomain/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/boy-hack/ksubdomain)](https://goreportcard.com/report/github.com/boy-hack/ksubdomain) [![License](https://img.shields.io/github/license/boy-hack/ksubdomain)](https://github.com/boy-hack/ksubdomain/blob/main/LICENSE)\n\n**KSubdomain 是一款基于无状态技术的子域名爆破工具，带来前所未有的扫描速度和极低的内存占用。** 告别传统工具的效率瓶颈，体验闪电般的 DNS 查询，同时拥有可靠的状态表重发机制，确保结果的完整性。 KSubdomain 支持 Windows、Linux 和 macOS，是进行大规模DNS资产探测的理想选择。\n\n![](image.gif)\n\n## 🚀 核心优势\n\n*   **闪电般的速度:** 采用无状态扫描技术，直接操作网络适配器进行原始套接字发包，绕过系统内核的网络协议栈，实现惊人的发包速率。通过 `test` 命令可探测本地网卡的最大发送速度。\n*   **极低的资源消耗:** 创新的内存管理机制，包括对象池和全局内存池，显著降低内存分配和 GC 压力，即使处理海量域名也能保持低内存占用。\n*   **无状态设计:** 类似 Masscan 的无状态扫描，不从系统维护状态表，自建轻量状态表，从根本上解决了传统扫描工具的内存瓶颈和性能限制，以及解决了无状态扫描漏包问题。\n*   **可靠的重发:** 内建智能重发机制，有效应对网络抖动和丢包，确保结果的准确性和完整性。\n*   **跨平台支持:** 完美兼容 Windows, Linux, macOS。\n*   **易于使用:** 简洁的命令行接口，提供验证 (verify) 和枚举 (enum) 两种模式，并内置常用字典。\n\n## ⚡ 性能亮点\n\nKSubdomain 在速度和效率上远超同类工具。以下是在 4 核 CPU、5M 带宽网络环境下，使用 10 万字典进行的对比测试：\n\n| 工具         | 扫描模式 | 发包方式     | 命令                                                                       | 耗时           | 成功个数 | 备注                      |\n| ------------ | -------- | ------------ | -------------------------------------------------------------------------- | -------------- | -------- | ------------------------- |\n| **KSubdomain** | 验证     | pcap 网卡发包 | `time ./ksubdomain v -b 5m -f d2.txt -o k.txt -r dns.txt --retry 3 --np`  | **~30 秒**     | 1397     | `--np` 关闭实时打印       |\n| massdns      | 验证     | pcap/socket  | `time ./massdns -r dns.txt -t A -w m.txt d2.txt --root -o L`                 | ~3 分 29 秒    | 1396     |                           |\n| dnsx         | 验证     | socket       | `time ./dnsx -a -o d.txt -r dns.txt -l d2.txt -retry 3 -t 5000`             | ~5 分 26 秒    | 1396     | `-t 5000` 设置 5000 并发 |\n\n**结论:** KSubdomain 的速度是 massdns 的 **7 倍**，是 dnsx 的 **10 倍** 以上！\n## 🛠️ 技术革新 (v2.0)\n\nKSubdomain 2.0 版本引入了多项底层优化，进一步压榨性能潜力：\n\n1.  **状态表优化:**\n    *   **分片锁 (Sharded Lock):** 替代全局锁，大幅减少锁竞争，提高并发写入效率。\n    *   **高效哈希:** 优化键值存储，均匀分布域名，提升查找速度。\n2.  **发包机制优化:**\n    *   **对象池:** 复用 DNS 包结构体，减少内存分配和 GC 开销。\n    *   **模板缓存:** 为相同 DNS 服务器复用以太网/IP/UDP 层数据，减少重复构建开销。\n    *   **并行发送:** 多协程并行发包，充分利用多核 CPU 性能。\n    *   **批量处理:** 批量发送域名请求，减少系统调用和上下文切换。\n3.  **接收机制优化:**\n    *   **对象池:** 复用解析器和缓冲区，降低内存消耗。\n    *   **并行处理管道:** 接收 → 解析 → 处理三阶段并行，提高处理流水线效率。\n    *   **缓冲区优化:** 增加内部 Channel 缓冲区大小，避免处理阻塞。\n    *   **高效过滤:** 优化 BPF 过滤规则和包处理逻辑，快速丢弃无效数据包。\n4.  **内存管理优化:**\n    *   **全局内存池:** 引入 `sync.Pool` 管理常用数据结构，减少内存分配和碎片。\n    *   **结构复用:** 复用 DNS 查询结构和序列化缓冲区。\n5.  **架构与并发优化:**\n    *   **动态并发:** 根据 CPU 核心数自动调整协程数量。\n    *   **高效随机数:** 使用性能更优的随机数生成器。\n    *   **自适应速率:** 根据网络状况和系统负载动态调整发包速率。\n    *   **批量加载:** 批量加载和处理域名，降低单个域名处理的固定开销。\n\n## 📦 安装\n\n1.  **下载预编译二进制文件:** 前往 [Releases](https://github.com/boy-hack/ksubdomain/releases) 页面下载对应系统的最新版本。\n2.  **安装 `libpcap` 依赖:**\n    *   **Windows:** 下载并安装 [Npcap](https://npcap.com/) 驱动 (WinPcap 可能无效)。\n    *   **Linux:** 已静态编译打包 `libpcap`，通常无需额外操作。若遇问题，请尝试安装 `libpcap-dev` 或 `libcap-devel` 包。\n    *   **macOS:** 系统自带 `libpcap`，无需安装。\n3.  **赋予执行权限 (Linux/macOS):** `chmod +x ksubdomain`\n4.  **运行!**\n\n### 源码编译 (可选)\n\n确保您已安装 Go 1.23 版本和 `libpcap` 环境。\n\n```bash\ngo install -v github.com/boy-hack/ksubdomain/v2/cmd/ksubdomain@latest\n# 二进制文件通常位于 $GOPATH/bin 或 $HOME/go/bin\n```\n\n## 📖 使用说明\n\n```bash\nKSubdomain - 极速无状态子域名爆破工具\n\n用法:\n  ksubdomain [全局选项] 命令 [命令选项] [参数...]\n\n版本:\n  查看版本信息: ksubdomain --version\n\n命令:\n  enum, e    枚举模式: 提供主域名进行爆破\n  verify, v  验证模式: 提供域名列表进行验证\n  test       测试本地网卡最大发包速度\n  help, h    显示命令列表或某个命令的帮助\n\n全局选项:\n  --help, -h     显示帮助 (默认: false)\n  --version, -v  打印版本信息 (默认: false)\n```\n\n### 验证模式 (Verify)\n\n验证模式用于快速检查提供的域名列表的存活状态。\n\n```bash\n./ksubdomain verify -h # 查看验证模式帮助，可缩写 ksubdomain v\n\nUSAGE:\n   ksubdomain verify [command options] [arguments...]\n\nOPTIONS:\n   --filename value, -f value       验证域名的文件路径\n   --domain value, -d value         域名\n   --band value, -b value           宽带的下行速度，可以5M,5K,5G (default: \"3m\")\n   --resolvers value, -r value      dns服务器，默认会使用内置dns\n   --output value, -o value         输出文件名\n   --output-type value, --oy value  输出文件类型: json, txt, csv (default: \"txt\")\n   --silent                         使用后屏幕将仅输出域名 (default: false)\n   --retry value                    重试次数,当为-1时将一直重试 (default: 3)\n   --timeout value                  超时时间 (default: 6)\n   --stdin                          接受stdin输入 (default: false)\n   --not-print, --np                不打印域名结果 (default: false)\n   --eth value, -e value            指定网卡名称\n   --wild-filter-mode value         泛解析过滤模式[从最终结果过滤泛解析域名]: basic(基础), advanced(高级), none(不过滤ne\")\n   --predict                        启用预测域名模式 (default: false)\n   --help, -h                       show help (default: false)\n\n# 示例:\n# 验证多个域名解析\n./ksubdomain v -d xx1.example.com -d xx2example.com\n\n# 从文件读取域名进行验证，保存为 output.txt\n./ksubdomain v -f domains.txt -o output.txt\n\n# 从标准输入读取域名，带宽限制为 10M\ncat domains.txt | ./ksubdomain v --stdin -b 10M\n\n# 启用预测模式，泛解析过滤，保存为csv\n./ksubdomain v -f domains.txt --predict --wild-filter-mode advanced --oy csv -o output.csv\n```\n\n### 枚举模式 (Enum)\n\n枚举模式基于字典和预测算法爆破指定域名下的子域名。\n\n```bash\n./ksubdomain enum -h # 查看枚举模式帮助,可简写 ksubdomain e\n\nUSAGE:\n   ksubdomain enum [command options] [arguments...]\n\nOPTIONS:\n   --domain value, -d value         域名\n   --band value, -b value           宽带的下行速度，可以5M,5K,5G (default: \"3m\")\n   --resolvers value, -r value      dns服务器，默认会使用内置dns\n   --output value, -o value         输出文件名\n   --output-type value, --oy value  输出文件类型: json, txt, csv (default: \"txt\")\n   --silent                         使用后屏幕将仅输出域名 (default: false)\n   --retry value                    重试次数,当为-1时将一直重试 (default: 3)\n   --timeout value                  超时时间 (default: 6)\n   --stdin                          接受stdin输入 (default: false)\n   --not-print, --np                不打印域名结果 (default: false)\n   --eth value, -e value            指定网卡名称\n   --wild-filter-mode value         泛解析过滤模式[从最终结果过滤泛解析域名]: basic(基础), advanced(高级), none(不过滤) (default: \"none\")\n   --predict                        启用预测域名模式 (default: false)\n   --filename value, -f value       字典路径\n   --ns                             读取域名ns记录并加入到ns解析器中 (default: false)\n   --help, -h                       show help (default: false)\n\n# 示例:\n# 枚举多个域名\n./ksubdomain e -d example.com -d hacker.com\n\n# 从文件读取字典枚举，保存为 output.txt\n./ksubdomain e -f sub.dict -o output.txt\n\n# 从标准输入读取域名，带宽限制为 10M\ncat domains.txt | ./ksubdomain e --stdin -b 10M\n\n# 启用预测模式枚举域名，泛解析过滤，保存为csv\n./ksubdomain e -d example.com --predict --wild-filter-mode advanced --oy csv -o output.csv\n```\n\n## ✨ 特性与技巧\n\n*   **带宽自动适配:** 只需使用 `-b` 参数指定你的公网下行带宽 (如 `-b 10m`), KSubdomain 会自动优化发包速率。\n*   **测试最大速率:** 运行 `./ksubdomain test` 测试当前环境的最大理论发包速率。\n*   **自动网卡检测:** KSubdomain 会自动检测可用网卡。\n*   **进度显示:** 实时进度条显示 成功数 / 发送数 / 队列长度 / 接收数 / 失败数 / 已耗时。\n*   **参数调优:** 根据网络质量和目标域名数量，调整 `--retry` 和 `--timeout` 参数以获得最佳效果。当 `--retry` 为 -1 时，将无限重试直至所有请求成功或超时。\n*   **多种输出格式:** 支持 `txt` (实时输出), `json` (完成后输出), `csv` (完成后输出)。通过 `-o` 指定文件名后缀即可 (如 `result.json`)。\n*   **环境变量配置:**\n    *   `KSubdomainConfig`: 指定配置文件的路径。\n\n## 💡 参考\n\n*   原 KSubdomain 项目: [https://github.com/knownsec/ksubdomain](https://github.com/knownsec/ksubdomain)\n*   从 Masscan, Zmap 源码分析到开发实践: [https://paper.seebug.org/1052/](https://paper.seebug.org/1052/)\n*   KSubdomain 无状态域名爆破工具介绍: [https://paper.seebug.org/1325/](https://paper.seebug.org/1325/)\n*   KSubdomain 与 massdns 的对比分析: [微信公众号文章链接](https://mp.weixin.qq.com/s?__biz=MzU2NzcwNTY3Mg==\u0026mid=2247484471\u0026idx=1\u0026sn=322d5db2d11363cd2392d7bd29c679f1\u0026chksm=fc986d10cbefe406f4bda22f62a16f08c71f31c241024fc82ecbb8e41c9c7188cfbd71276b81\u0026token=76024279\u0026lang=zh_CN#rd)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboy-hack%2Fksubdomain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboy-hack%2Fksubdomain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboy-hack%2Fksubdomain/lists"}