Bulk .lk Domain Generator & Resolver

Project Overview
The Bulk Domain Generator & Resolver is a dual-script automation tool designed to create massive lists of potential domain names and efficiently verify their DNS records. It was specifically optimized to handle .lk domain permutations, providing a blazing-fast way to discover active or available domains without manual intervention.
The Challenge
Manually brainstorming and checking the availability or active status of thousands of domain variations is incredibly time-consuming. The challenge was to build a lightweight, fast, and resource-efficient pipeline that could generate domain combinations and rapidly query name servers without rate-limiting issues or heavy system overhead.
The Solution & Architecture
To solve this, we split the task into two highly optimized processes, leveraging the best tools for each specific job: string manipulation and network querying.
- Domain Generation (Python): We utilized a Python script to handle the complex string permutations, dictionary combining, and rule-based generation to create a massive text list of potential
.lkdomains. Python's robust text processing capabilities made this instantaneous. - DNS Resolution (Bash): For the heavy lifting of network requests, we shifted to a Bash script. It read the Python-generated list and executed sequential (and concurrent)
nslookupcommands to resolve the domains natively through the Linux terminal, filtering out the active ones from the dead ones.
Key Features
- High-Speed Generation: Algorithmic generation of thousands of domain variations in seconds.
- Native Network Querying: Bash script optimized for fast, low-overhead DNS lookups directly from the OS level.
- Resource Efficiency: Zero heavy dependencies; runs natively and smoothly on any Linux environment.
Technical Implementation
The core of the network efficiency came from the Bash script. By using native Unix networking tools, we could process the output of the Python script seamlessly, handling success and error streams directly in the terminal.
#!/bin/bash
# Example: Efficiently checking a generated list of .lk domains
input_file="generated_lk_domains.txt"
output_file="active_domains.txt"
echo "Starting DNS lookup process..."
while IFS= read -r domain
do
# Perform nslookup and suppress standard error output
if nslookup "$domain" > /dev/null 2>&1; then
echo "[ACTIVE] $domain"
echo "$domain" >> "$output_file"
else
echo "[DEAD / UNRESOLVED] $domain"
fi
done < "$input_file"
echo "Process complete. Active domains saved to $output_file."