A fast, operator-friendly CLI for querying the ip.thc.org public intelligence API (dataset advertised as ~4.7B indexed domains) to perform:
- Reverse DNS lookups (IP → domains)
- Subdomain enumeration (domain → subdomains)
- CNAME relationship discovery (target domain → domains pointing to it)
Disclaimer: This tool was developed independently. The author has no affiliation with The Hacker’s Choice (THC).
When you’re doing recon at scale (red team ops, pentests, bug bounty triage, or investigative work), you often need fast enrichment from a large dataset:
- Pivot from an IP to domains hosted behind it (Reverse DNS)
- Expand scope with subdomain coverage (Subdomain Lookup)
- Identify possible hosting / SaaS / takeover surfaces via CNAME pivots (CNAME Lookup)
ip-thc is built as a stable, defensive CLI:
- Clear target ingestion (flags, lists, explicit STDIN)
- Strong operational controls (threads, rate-limit, pagination)
- Proxy support (HTTP(S) + SOCKS5) for segmented environments
- Clean output modes (raw or file output with sort+dedupe)
$ ./ip-thc --help
/$$ www.thc.org /$$ /$$
|__/ | $$ | $$
/$$ /$$$$$$ /$$$$$$ | $$$$$$$ /$$$$$$$
| $$ /$$__ $$ /$$$$$$|_ $$_/ | $$__ $$ /$$_____/
| $$| $$ \ $$|______/ | $$ | $$ \ $$| $$
| $$| $$ | $$ | $$ /$$| $$ | $$| $$
| $$| $$$$$$$/ | $$$$/| $$ | $$| $$$$$$$
|__/| $$____/ \___/ |__/ |__/ \_______/
| $$
| $$ github.com/haltman-io/ip-thc (Golang version)
|__/ [release: v1.0.0-stable]
[!] This tool was developed independently. The author has no affiliation with The Hacker's Choice.
ip-thc (v1.0.0-stable) - ip.thc.org API client (ReverseDNS / Subdomain / CNAME)
USAGE:
ip-thc [mode] [targets] [options]
TARGET INPUT:
--target <target> Define a target (repeatable, comma-separated supported)
-t <target>
--target-list <file> File with targets (one per line; repeatable, comma-separated supported)
-tL <file>
--stdin Enable reading targets from STDIN (pipe) as additional targets
MODES (select exactly one):
--reverse-dns Reverse DNS lookup (API: POST /api/v1/lookup)
-rdns
--subdomain Subdomain lookup (API: POST /api/v1/lookup/subdomains)
-sub
--cname CNAME lookup (API: POST /api/v1/lookup/cnames)
-cn
OPTIONS:
--results <n> Max results per API request (default: 10)
--limit <n> Alias for --results
-r <n>
--all Auto-pagination until next_page_state is empty
--threads <n> Concurrent targets (default: 1)
--rate-limit <rps> Max requests per second (default: 5)
-rl <rps>
--proxy <url> Proxy URL: http://host:port, https://host:port, socks5://host:port
--proxy-auth <user:pass> Proxy auth: HTTP Basic or SOCKS5 user/pass
--no-proxy Ignore proxy environment variables
--insecure Disable TLS verification (curl-style)
-k
--output <file> Save sorted + deduped results to file
-o <file>
--silent Print results only (also suppress banner)
-s
--debug Verbose debug logs to STDERR
--timeout <duration> HTTP timeout (default: 30s). Examples: 30s, 2m
--user-agent <ua> Override User-Agent
NOTES:
- Multiple targets are supported:
ip-thc -t google.com,twitter.com -sub
ip-thc -t google.com -t twitter.com -sub
ip-thc -tL targets1.txt,targets2.txt -sub
- STDIN is ignored unless --stdin is explicitly provided.
--reverse-dns/-rdns→POST /api/v1/lookup--subdomain/-sub→POST /api/v1/lookup/subdomains--cname/-cn→POST /api/v1/lookup/cnames
Exactly one mode must be selected.
--target/-t(repeatable, supports comma-separated lists)--target-list/-tL(repeatable, supports comma-separated file paths; one target per line)--stdin(explicitly enables reading piped targets from STDIN)
STDIN is ignored unless --stdin is explicitly provided.
- API responses include
next_page_state - With
--all,ip-thccontinues requesting pages untilnext_page_state == ""
-
--threadscontrols concurrency across targets -
--rate-limitcontrols max requests per second (global limiter shared by all workers) -
Response header handling:
- If
X-Ratelimit-Remaining < 5, the tool pauses silently for 15 seconds to avoid hard throttling
- If
- Default prints one result per line
--output/-osaves sorted + deduplicated results to a file
-
--proxysupports:http://host:porthttps://host:portsocks5://host:port(andsocks5h://host:port)
-
--proxy-auth user:passfor HTTP Basic proxy auth or SOCKS5 auth -
--no-proxyignores environment proxy variables -
--insecure/-kdisables TLS verification (curl-style)
--silent/-ssuppresses the banner and prints only results (no decorations)
Hidden easter egg
--thcprints a greets message and exits (not listed in help)
- Reverse DNS lookup:
https://ip.thc.org/docs/API/reverse-dns-lookup - Subdomain lookup:
https://ip.thc.org/docs/API/subdomain-lookup - CNAME lookup:
https://ip.thc.org/docs/API/cname-lookup
- Go 1.22+
- Network access to
ip.thc.org(unless you route through a proxy)
git clone https://github.com/haltman-io/ip-thc.git
cd ip-thc
go mod download
go build -o ./ip-thc ./cmd/ip-thcRun:
./ip-thc --helpGo installs binaries into:
$GOBINif set, otherwise$GOPATH/bin(commonly~/go/bin)
From the repository root:
go install ./cmd/ip-thcNow ip-thc should be available on your PATH if $GOBIN (or $GOPATH/bin) is in PATH.
Verify:
command -v ip-thc
ip-thc --helpgo build -o ip-thc ./cmd/ip-thc
mv ip-thc "${GOBIN:-$HOME/go/bin}/ip-thc"Ensure your PATH includes the bin directory:
export PATH="${GOBIN:-$HOME/go/bin}:$PATH"ip-thc --helpip-thc -rdns -t 1.1.1.1All pages:
ip-thc -rdns -t 1.1.1.1 --allip-thc -sub -t example.comMultiple targets (comma-separated):
ip-thc -sub -t google.com,twitter.comMultiple targets (repeat flag):
ip-thc -sub -t google.com -t twitter.comip-thc -cn -t github.ioSingle list:
ip-thc -sub -tL targets.txtMultiple files:
ip-thc -sub -tL targets1.txt -tL targets2.txtMultiple files (comma-separated):
ip-thc -sub -tL targets1.txt,targets2.txtSTDIN must be explicitly enabled:
cat targets.txt | ip-thc --stdin -subPipeline + extra targets combined:
cat targets.txt | ip-thc --stdin -sub -t example.comip-thc -sub -t example.com --all -o subdomains.txtThe file will contain unique entries, sorted lexicographically.
Default:
--rate-limit 5(requests per second)
Tune it:
ip-thc -sub -t example.com --rate-limit 2If the server sends:
X-Ratelimit-Remaining < 5
ip-thc will pause silently for 15 seconds to reduce the chance of hitting hard limits.
You should still use conservative settings when running at scale. Don’t abuse public services.
ip-thc -sub -t example.com --proxy http://127.0.0.1:8080ip-thc -sub -t example.com --proxy http://127.0.0.1:8080 --proxy-auth user:passip-thc -sub -t example.com --proxy socks5://127.0.0.1:9050ip-thc -sub -t example.com --proxy socks5://127.0.0.1:9050 --proxy-auth user:passip-thc -sub -t example.com --proxy http://127.0.0.1:8080 --no-proxyDisable TLS verification (curl -k style):
ip-thc -sub -t example.com -kUse only when you fully understand the risk (MITM visibility, etc.).
Enable debug logs to STDERR:
ip-thc -sub -t example.com --debugDebug includes:
- Request path + request JSON
- HTTP status + truncated response payload
- Worker/target execution traces
0→ success (no fatal errors)1→ completed but at least one target failed2→ invalid arguments / configuration / initialization errors
This tool is intended for:
- authorized security assessments,
- lawful investigation,
- defensive research,
- and legitimate bug bounty activity.
You are responsible for complying with:
- applicable laws,
- scope boundaries,
- and the upstream service’s acceptable use policies.
This project is licensed under the Unlicense, see the LICENSE file for details.
- Public intelligence API: ip.thc.org
- Inspired by the operational needs of offensive and investigative practitioners





