
Bash-based passive reconnaissance + attack surface mapping script using only public APIs + stock Linux tools (curl, dig, openssl, nmap, python3).
_ _ _ _ _ _______
| \ | | | | | |/ / ____|
| \| | | | | ' /| _|
| |\ | |_| | . \| |___
|_| \_|\___/|_|\_\_____|
N U K E // recon & attack surface mapper
-----------------------------------------
Bash-based passive reconnaissance + attack surface mapping script using only public APIs + stock Linux tools (curl, dig, openssl, nmap, python3).
All output goes to a single .txt file: nuke_<domain>.txt.
No dependency on subfinder, ffuf, gobuster, subjs, getJS, jshunter, or js_snitch.
| # | Module | Source / Technique |
|---|---|---|
| 1 | Subdomains via CT | crt.sh |
| 2 | Subdomains via alternate CT | crt.name |
| 3 | Subdomains (optional, requires key) | SecurityTrails API |
| 4 | Subdomains + URLs + IPs | OTX AlienVault |
| 5 | Domains + IPs + ASN/Server | urlscan.io |
| 6 | Subdomains + siblings + IPs (requires key) | VirusTotal v2 |
| 7 | Consolidated subdomains | Union + dedupe across all sources |
| 8 | DNS (TXT/SPF, A, AAAA, NS, MX, SOA + AXFR) | dns.google (DoH) + dig/host — equivalent to dnsrecon -d |
| 9 | WHOIS | RDAP via rdap.org |
| 10 | IPs / Reverse DNS / RDAP-IP / HTTP status | dns.google PTR + rdap.org/ip + curl -I |
| 11 | Favicon hash (Shodan hunting) + IP SSL verification | Local Shodan-standard murmur3 (http.favicon.hash) + openssl + nmap --script ssl-cert |
| 12 | JS files + extracted endpoints | <script src> parsing + path/URL regex (replaces subjs/getJS/jshunter) |
| 13 | Historical URLs | Wayback Machine CDX |
| 14 | Origin IP discovery (CDN/WAF bypass) | Correlates DNS + OTX + urlscan + VT + SPF + Shodan, filters via RDAP org + Host: header test |
| 15 | Built-in dirscan | High-signal curated wordlist, parallel (no ffuf/gobuster needed) |
Highlights:
pip install), with ready-to-use dorks: http.favicon.hash:X.ip4:/include:/a/mx) — leaks infra / origin IP.?api=, admin, token, .bak, .sql, .env, .git)..git/HEAD, .env, backup.zip, phpinfo.php, actuator/env, swagger/, graphql, jenkins/, etc.bash, curl, grep, sed, awk, sort, trdig or host → for AXFRpython3 → for favicon murmur3 hash (Shodan standard)nmap → for nmap --script ssl-cert -p 443 <IP>openssl → for cert CN/SAN inspectionWorks on Kali, Ubuntu, Debian, WSL2.
git clone https://github.com/AnkhCorp/Nuke.sh.git
cd Nuke.sh
chmod +x nuke.sh
# Basic (100% free, no keys)
bash nuke.sh example.com
# With keys (via arguments)
bash nuke.sh example.com SECURITYTRAILS_KEY VIRUSTOTAL_KEY
# With keys via env (recommended — never commit keys)
export SECURITYTRAILS_API_KEY="your_key"
export VT_APIKEY="your_key"
export SHODAN_API_KEY="your_key" # optional
export ZOOMEYE_KEY="your_key" # optional
bash nuke.sh example.com
Supported environment variables:
| Variable | Required? | Where to get it |
|---|---|---|
SECURITYTRAILS_API_KEY | No | https://securitytrails.com/app/signup |
VT_APIKEY | No | https://www.virustotal.com/gui/my-apikey |
SHODAN_API_KEY | No | https://account.shodan.io |
ZOOMEYE_KEY | No | https://www.zoomeye.hk |
URLSCAN_SIZE | No (default 1000) | E.g. export URLSCAN_SIZE=10000 for max |
Output:
nuke_example.com.txt
===================================================================
== 7. CONSOLIDATED SUBDOMAINS (all sources)
===================================================================
crt.sh=45 | crt.name=38 | securitytrails=52 | otx=20 | urlscan=15 | virustotal=30
[UNIQUE total]: https://raw.githubusercontent.com/ankhcorp/nuke.sh/main/87
admin.example.com
api.example.com
...
===================================================================
== 14. ORIGIN IP DISCOVERY (consolidated)
===================================================================
[All candidate IPs (current DNS + OTX + urlscan + VT + SPF + Shodan)]:
https://raw.githubusercontent.com/ankhcorp/nuke.sh/main/1.2.3.4
5.6.7.8
...
IP: 1.2.3.4 | RDAP_ORG: CLOUDFLARENET
IP: 5.6.7.8 | RDAP_ORG: LOCAWEB
# Shodan — certificate
shodan search 'Ssl.cert.subject.CN:"example.com" 200 --fields ip_str'
# Shodan — favicon
shodan search 'http.favicon.hash:123456789'
# ZoomEye
ssl:"example.com" # at https://www.zoomeye.hk/
# Manual
https://crt.name/v1/search?apex=example.com
https://favicon-hash.kmsec.uk/
https://viewdns.info/iphistory/?domain=example.com
https://mxtoolbox.com/SuperTool.aspx
https://urlscan.io/search/#domain:example.com
Manual verification of an origin-IP candidate:
curl -sk -H 'Host: example.com' https://<CANDIDATE_IP>/ | head -n 20
echo | openssl s_client -connect <CANDIDATE_IP>:443 -servername example.com 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName
nmap --script ssl-cert -p 443 <CANDIDATE_IP>
If the cert answers with CN/SAN=example.com (or title/Server matches the site), that's the real IP.
| Tool | Replacement reason |
|---|---|
subfinder | Replaced by crt.sh + crt.name + OTX + urlscan + VT + SecurityTrails (all via API, nothing to install) |
webanalyze | Reliable tech detection requires a paid API (Wappalyzer/BuiltWith) — out of scope |
subjs / getJS | Replaced by built-in <script src> extraction (section 12) |
jshunter | Replaced by built-in endpoint regex (section 12) |
js_snitch | No public-API equivalent |
dnsrecon -d | Equivalent in section 8 (NS/MX/SOA/AXFR via DoH + dig) |
httpx-toolkit | Partial equivalent in section 10 (status/server per host) |
ffuf / gobuster | Built-in dirscan with curated wordlist + xargs -P (section 15) — for full fuzzing use SecLists: ffuf -u https://TARGET/FUZZ -w raft-medium-directories.txt |
Use only against targets you are authorized to test (your own assets, in-scope bug bounty programs, contracted pentests).
The author is not responsible for misuse.
MIT — use, modify, and share freely.
PRs are welcome! Roadmap ideas:
--only-ips / --only-subs flagsamass / anubis integration