rapiddns — DNS Reconnaissance via RapidDNS
Installation
rapiddns-cli is cross-platform. Install via pre-built binary (recommended) or Go.
Option 1: Pre-built Binary (Recommended)
Download from GitHub Releases:
| Platform | File |
|---|
| macOS (Intel) | INLINECODE0 |
| macOS (Apple Silicon) |
rapiddns_*_darwin_arm64.tar.gz |
| Linux (x86_64) |
rapiddns_*_linux_amd64.tar.gz |
| Linux (ARM64) |
rapiddns_*_linux_arm64.tar.gz |
| Windows (x86_64) |
rapiddns_*_windows_amd64.zip |
CODEBLOCK0
Option 2: Go Install
Requires Go 1.24+:
CODEBLOCK1
Binary is placed in $GOPATH/bin (usually ~/go/bin). Add to PATH:
CODEBLOCK2
API Key Configuration
Full features (export, unlimited search) require an API key from https://rapiddns.io/user/profile
CODEBLOCK3
Without a key, search results are limited and export is disabled.
Common Workflows
Subdomain Search
CODEBLOCK4
Extract Subdomains / IPs
CODEBLOCK5
Reverse IP & CIDR
CODEBLOCK6
Advanced Query
Use Elasticsearch-style syntax for complex queries:
CODEBLOCK7
Export (Requires API Key)
Automated workflow: trigger → poll → download → extract:
CODEBLOCK8
Results saved to result/ directory.
Output Formats & Piping
CODEBLOCK9
Field Reference
| Field | Description |
|---|
| subdomain | The subdomain (e.g. www.example.com) |
| type |
DNS record type (A, AAAA, CNAME, MX, NS, TXT, etc.) |
| value | Record value (IP, target, etc.) |
| timestamp | Last observation timestamp |
| date | Date of last observation |
Advanced Query Syntax
| Operator | Example |
|---|
| Domain (2nd-level only) | INLINECODE9 ⚠️ NOT INLINECODE10 |
| Type filter |
type:A,
type:MX,
type:CNAME |
| TLD filter |
tld:com,
tld:cn |
| Subdomain match |
subdomain:apple.com* (trailing wildcard) |
| Exact subdomain |
subdomain:"a.ns.example.com" |
| Value/IP |
value:"1.1.1.1" |
| Boolean |
domain:apple AND type:A |
| Negation |
domain:apple AND NOT subdomain:www.* |
Available fields: domain, tld, subdomain, value, type, INLINECODE26
⚠️ domain 字段是二级域名(不含 TLD):用 domain:baidu,不要用 domain:baidu.com
Important: Date Accuracy
- - Use
-o text for displaying results with dates — includes subdomain, type, value, date. - Use
--column subdomain -o text for pure subdomain lists (pipe to other tools). - JSON output (
-o json) also includes dates but needs parsing; prefer -o text for display. - Dates come directly from the API and match the rapiddns.io website exactly.
Response Language
- - Match the user's language. If they ask in Chinese, respond in Chinese. If English, respond in English.
- CLI output (tables, lists) stays as-is (machine output). Summaries and explanations follow the user's language.
Display results
CODEBLOCK10
Tips
- - Use
--silent when piping or saving to file to suppress console output - Note:
--silent with --extract-subdomains still prints the extracted file path to stdout (CLI behavior) - INLINECODE37 auto-paginates — no need to manually loop pages
- Without API key: search works but limited results; export disabled
- For large-scale recon, combine
--extract-subdomains with other tools via pipe
rapiddns — 通过 RapidDNS 进行 DNS 侦察
安装
rapiddns-cli 是跨平台的。可通过预编译二进制文件(推荐)或 Go 进行安装。
选项 1:预编译二进制文件(推荐)
从 GitHub Releases 下载:
| 平台 | 文件 |
|---|
| macOS (Intel) | rapiddnsdarwinamd64.tar.gz |
| macOS (Apple Silicon) |
rapiddns
darwinarm64.tar.gz |
| Linux (x86
64) | rapiddns*
linuxamd64.tar.gz |
| Linux (ARM64) | rapiddns
*linux_arm64.tar.gz |
| Windows (x86
64) | rapiddns*
windowsamd64.zip |
bash
Linux/macOS 示例
VERSION=1.0.2
OS=linux # 或 darwin(macOS)
ARCH=amd64 # 或 arm64
curl -sL https://github.com/rapiddns/rapiddns-cli/releases/download/v${VERSION}/rapiddns
v${VERSION}${OS}_${ARCH}.tar.gz | tar xz
sudo mv rapiddns /usr/local/bin/
rapiddns-cli --help
选项 2:Go 安装
需要 Go 1.24+:
bash
go install github.com/rapiddns/rapiddns-cli@latest
二进制文件位于 $GOPATH/bin(通常为 ~/go/bin)。添加到 PATH:
bash
echo export PATH=$PATH:$(go env GOPATH)/bin >> ~/.bashrc # Linux
或 macOS 上的 ~/.zshrc
API 密钥配置
完整功能(导出、无限制搜索)需要从 https://rapiddns.io/user/profile 获取 API 密钥
bash
rapiddns-cli config set-key
rapiddns-cli config get-key # 验证
没有密钥时,搜索结果受限且导出功能被禁用。
常见工作流程
子域名搜索
bash
基础 — 域名的所有记录
rapiddns-cli search example.com
强制搜索类型(当自动检测失败时)
rapiddns-cli search 1.2.3.4 --type ip
自动分页,最多 5000 条记录
rapiddns-cli search example.com --max 5000
提取子域名 / IP
bash
仅子域名(去重文本列表)
rapiddns-cli search example.com --extract-subdomains
仅 IP + 子网统计
rapiddns-cli search example.com --extract-ips
两者
rapiddns-cli search example.com --extract-subdomains --extract-ips
反向 IP 与 CIDR
bash
反向 IP — 哪些域名指向此 IP?
rapiddns-cli search 1.2.3.4
CIDR 范围 — 枚举整个子网
rapiddns-cli search 129.134.0.0/16 --max 10000
高级查询
使用 Elasticsearch 风格的语法进行复杂查询:
bash
apple.com 子域名的所有 A 记录(domain = 仅二级域名!)
rapiddns-cli search domain:apple AND type:A --type advanced
特定子域名模式
rapiddns-cli search subdomain:admin.* AND tld:com --type advanced
域名的 MX 记录
rapiddns-cli search type:MX AND domain:baidu --type advanced
精确子域名查找
rapiddns-cli search subdomain:mail.google.com --type advanced
导出(需要 API 密钥)
自动化工作流程:触发 → 轮询 → 下载 → 提取:
bash
完整导出,包含子域名 + IP 提取
rapiddns-cli export start example.com --max 100000 --extract-subdomains --extract-ips
高级查询导出
rapiddns-cli export start domain:example AND type:A --type advanced
结果保存到 result/ 目录。
输出格式与管道
bash
JSON(默认)
rapiddns-cli search example.com -o json
CSV
rapiddns-cli search example.com -o csv -f results.csv
文本 — 适合管道(stdout = 干净数据,stderr = 状态)
rapiddns-cli search example.com --column subdomain -o text | sort -u > subdomains.txt
静默模式 — 仅提取到文件,无控制台输出
rapiddns-cli search example.com --extract-subdomains --silent
字段参考
| 字段 | 描述 |
|---|
| subdomain | 子域名(例如 www.example.com) |
| type |
DNS 记录类型(A、AAAA、CNAME、MX、NS、TXT 等) |
| value | 记录值(IP、目标等) |
| timestamp | 最后观察时间戳 |
| date | 最后观察日期 |
高级查询语法
| 运算符 | 示例 |
|---|
| 域名(仅二级域名) | domain:apple ⚠️ 不是 domain:apple.com |
| 类型过滤 |
type:A、type:MX、type:CNAME |
| TLD 过滤 | tld:com、tld:cn |
| 子域名匹配 | subdomain:apple.com*(尾部通配符) |
| 精确子域名 | subdomain:a.ns.example.com |
| 值/IP | value:1.1.1.1 |
| 布尔运算 | domain:apple AND type:A |
| 否定 | domain:apple AND NOT subdomain:www.* |
可用字段:domain、tld、subdomain、value、type、is_root
⚠️ domain 字段是二级域名(不含 TLD):用 domain:baidu,不要用 domain:baidu.com
重要提示:日期准确性
- - 使用 -o text 显示带日期的结果 — 包含子域名、类型、值、日期。
- 使用 --column subdomain -o text 获取纯子域名列表(通过管道传递给其他工具)。
- JSON 输出(-o json)也包含日期但需要解析;显示时优先使用 -o text。
- 日期直接来自 API,与 rapiddns.io 网站完全一致。
响应语言
- - 匹配用户的语言。 如果用户用中文提问,则用中文回复。如果用英文,则用英文回复。
- CLI 输出(表格、列表)保持不变(机器输出)。摘要和说明遵循用户的语言。
显示结果
bash
带日期的制表符分隔表格(默认按最新排序)
rapiddns-cli search
--max 5000 -o text 2>/dev/null
用于管道的纯子域名列表
rapiddns-cli search --max 5000 --column subdomain -o text 2>/dev/null | sort -u
提示
- - 通过管道或保存到文件时使用 --silent 以抑制控制台输出
- 注意:--silent 与 --extract-subdomains 结合使用时,仍会将提取的文件路径打印到 stdout(CLI 行为)
- --max 自动分页 — 无需手动循环页面
- 无 API 密钥:搜索可用但结果受限;导出功能禁用
- 对于大规模侦察,通过管道将 --extract-subdomains 与其他工具结合使用