Imagine if Sherlock Holmes went digital and decided to hunt down subdomains instead of criminals. That's SubHunter! π΅οΈπ¦
A tool so nosy, it makes your grandma's neighborhood watch look like amateurs. We find subdomains faster than you can say "DNS resolution"!
const sources = [
`https://api.hackertarget.com/hostsearch/?q=${domain}`,
`https://crt.sh/?q=%25.${domain}&output=json`
];
Think of this like a digital party invitation list. We're not just knocking on the main door, we're finding ALL the secret entrances! πͺπ²οΈ
const dnsResponse = await fetch(`https://dns.google.com/resolve?name=${subdomain}`);
const dnsData = await dnsResponse.json();
// Collecting IP addresses
if (dnsData.Answer) {
dnsData.Answer.forEach(answer => {
if (answer.type === 1) { // A record
subdomainDetails.get(subdomain).ips.add(answer.data);
}
});
}
We're basically the GPS for internet addresses. "Hey Google, where does THIS subdomain live?" ποΈπ
try {
const httpResponse = await fetchWithTimeout(`https://${subdomain}`, {
method: 'HEAD',
redirect: 'manual'
});
subdomainDetails.get(subdomain).httpStatus = httpResponse.status;
} catch {
// Fallback to HTTP if HTTPS fails
try {
const httpResponse = await fetchWithTimeout(`http://${subdomain}`, {
method: 'HEAD',
redirect: 'manual'
});
subdomainDetails.get(subdomain).httpStatus = httpResponse.status;
} catch {
subdomainDetails.get(subdomain).httpStatus = 'N/A';
}
}
We check if subdomains are alive or just digital zombies. "You shall not pass!" π§π§ββοΈ
- π‘ Subdomain hunting so thorough, it's almost creepy
- π IP resolution faster than your internet connection
- π¦ HTTP status checking with attitude
- π¨ UI so cool, it makes The Matrix look boring
SubHunter is for:
- Ethical hackers
- Cybersecurity nerds
- People who think "404" is a personality trait
- NOT for causing digital mischief! π§π
Pro Tip: Just because you CAN scan a domain doesn't mean you SHOULD. Ask for permission, or risk becoming everyone's least favorite party guest! ππ«
Got ideas to make SubHunter even more awesome?
- Fork the repo
- Create a branch
- Commit your digital wizardry
- Open a pull request faster than you can say "recursive DNS"
This project is basically a masterclass in:
- Web API gymnastics
- Async JavaScript ninja moves
- DNS resolution dark arts
- How to look cool while coding π
Made in Ceylon by @sh13y
- Powered by β and an unhealthy amount of curiosity
- Fueled by the spirit of digital adventure
WTFPL (Because sharing is caring, and lawyers are expensive) πΈ
Remember: In the world of SubHunter, every subdomain has a story. We're just here to read it! π΅οΈπ
Star this repo if it saved you hours of manual searching! β