Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
dnsrecon — DNS 枚举脚本 | Kitploit
工具/GitHubGitHub/darkoperator/dnsrecon
侦察DNS和子域名枚举信息收集网络安全渗透测试DNS 分析
GitHubdarkoperator/dnsrecon

dnsrecon

DNS 枚举脚本

查看仓库
3.1k5793天前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

DNSRecon

DNSRecon 是我在2007年初为了学习Ruby语言和DNS知识而编写的一个Ruby脚本的Python移植版本。这次我想学习Python并扩展原始工具的功能,同时重新学习DNS的工作原理以及如何在安全评估和网络故障排查中使用它。

此脚本提供以下功能:

  • 检查所有NS记录的域传送。
  • 枚举给定域名的通用DNS记录(MX、SOA、NS、A、AAAA、SPF和TXT)。
  • 执行常见的SRV记录枚举。
  • 顶级域(TLD)扩展。
  • 检查通配符解析。
  • 使用指定域名和字典文件暴力破解子域名及主机A和AAAA记录。
  • 对指定IP范围或CIDR执行PTR记录查询。
  • 检查DNS服务器缓存中指定主机列表文件中的A、AAAA和CNAME记录。

安装

前提条件

DNSRecon需要Python 3.12或更高版本。

使用 uv(推荐)

  1. 如果尚未安装uv,请先安装:

    root@kitploit:~
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. 克隆仓库:

    root@kitploit:~
    git clone https://github.com/darkoperator/dnsrecon.git
    cd dnsrecon
    
  3. 安装依赖并创建虚拟环境:

    root@kitploit:~
    uv sync
    
  4. 运行DNSRecon:

    root@kitploit:~
    uv run dnsrecon
    

开发

安装开发依赖:

root@kitploit:~
uv sync --extra dev

运行测试:

root@kitploit:~
uv run pytest

运行代码检查和格式化:

root@kitploit:~
uv run ruff check
root@kitploit:~
uv run ruff format

Shodan 网段扩展

DNSRecon 可以使用 Shodan 来扩展在标准枚举过程中从 SPF(-s)和/或 WHOIS(-w)数据中发现的网段。

CLI 示例

被动 Shodan 增强(使用 SPF + WHOIS 网段):

root@kitploit:~
uv run dnsrecon -d example.com -t std -s -w --shodan --shodan-key "$SHODAN_API_KEY"

主动验证 Shodan 结果(重新解析主机并确认它们仍然匹配查询的网段):

root@kitploit:~
uv run dnsrecon -d example.com -t std -s -w --shodan --shodan-active --shodan-key "$SHODAN_API_KEY"

你也可以通过环境变量设置 API 密钥,而不是使用 --shodan-key:

root@kitploit:~
export SHODAN_API_KEY="your-shodan-api-key"
uv run dnsrecon -d example.com -t std -s -w --shodan

REST API 示例

启动 REST API:

root@kitploit:~
uv run restdnsrecon

调用 /general_enum 并启用 Shodan 扩展:

root@kitploit:~
curl -s \
  -H "X-Shodan-Api-Key: $SHODAN_API_KEY" \
  "http://127.0.0.1:5000/general_enum?domain=example.com&do_spf=true&do_whois=true&do_shodan=true"

在 API 中启用主动验证:

root@kitploit:~
curl -s \
  -H "X-Shodan-Api-Key: $SHODAN_API_KEY" \
  "http://127.0.0.1:5000/general_enum?domain=example.com&do_spf=true&do_whois=true&do_shodan=true&shodan_active=true"

REST API 的 thread_num 值限制在 1..100 范围内。API 的 wordlist 参数可以引用 dnsrecon/data 中的捆绑文件,或者引用 DNSRECON_WORDLIST_DIRS 列出的目录下的文件,使用平台路径分隔符。仅配置专门的字典目录;不要将 DNSRECON_WORDLIST_DIRS 指向宽泛的路径,如 /、主目录或其他包含敏感文件的位置。

root@kitploit:~
export DNSRECON_WORDLIST_DIRS="/opt/dnsrecon-wordlists:/srv/shared-wordlists"

打包版本

Packaging status

下载工具