← 피드로
Finding Hidden Subdomains: Building a Subdomain Enumerator in Python
I recently built my third cybersecurity tool — a subdomain enumerator that finds hidden subdomains of a target domain. Here’s how I built it.
What Is a Subdomain Enumerator?
A subdomain enumerator finds all the subdomains of a domain. For example:
- www.example.com
- mail.example.com
- admin.example.com
- dev.example.com
How It Works
- Loads a wordlist of common subdomain names
- Tries to resolve each one using DNS
- Prints the ones that exist
The Code
- Get a list of common subdomains (from a wordlist file)
- For each subdomain, combine it with the target domain
- Try to resolve it to an IP address using DNS
- If it resolves → the subdomain exists!
- Print it and save it
What I Learned
I learned that subdomains are important in the field of cybersecurity since it relates to ethical hacking. Defenders use this to find weak points and find out what to protect. In this project I also learned how the internet works with this code.
The Full Code
🔍 Subdomain Enumerator
A powerful, multi-threaded subdomain enumeration tool written in Python. Find all subdomains of a target domain using DNS resolution and HTTP checks.
🎯 What It Does
A subdomain enumerator finds all the subdomains associated with a target domain.
Why This Matters
Use Case Explanation 🔐 Security Research Discover attack surfaces and hidden services 🔎 OSINT Gather public information about a target 🐛 Bug Bounty Find subdomains for vulnerability testing 🛡️ Defensive Security Identify unauthorized or forgotten services 📊 Asset Discovery Know what you own and need to protect
✨ Features
Feature Description 🚀 Multi-threaded Fast scanning using concurrent threads 🌐 DNS Resolution Checks if subdomains actually exist 🌍 HTTP/HTTPS Detection Identifies if subdomains have websites 📝 Custom Wordlist Support Use your own subdomain list 💻 Command-Line Interface Professional tool design 💾 Results Saving Automatically saves findings to a file 🛡️ Error Handling Graceful handling of DNS failures …
추출 본문 · 출처: dev.to · https://dev.to/cyber_preston/subdomain-enumerator-4ic6