DNS (Domain Name System) Resolver

Script DNS (Domain Name System) Resolver

DNS Resolver​

This script is designed to retrieve various types of DNS records for a list of domains. It performs domain name resolution and collects records such as A, AAAA, NS, MX, TXT, SPF, SOA, CNAME, and DMARC. It uses multithreading to speed up the process of retrieving data for multiple domains.

Copyright holder: underground forum
Release date: 2025-06-04


Main Function Overview:​

  1. resolve_domain:
    • This function takes a domain and a list of record types to query (e.g., A, MX, etc.).
    • For each record type, it performs a DNS query using the dns.resolver library.
    • Queries are handled per type (A, MX, TXT, etc.), and the result is a dictionary containing the retrieved data for each record type of the domain.
    • If a query fails, the corresponding record is marked as "not selected".
  2. process_domains:
    • This function processes the list of domains in parallel using concurrent.futures.ThreadPoolExecutor.
    • This allows querying multiple domains simultaneously through multithreading.
    • For each domain, an asynchronous request is created using executor.submit.
    • The function collects the results of all requests and returns them.

Usage Instructions:

  1. Install the dependency:
    pip install dnspython
  2. Create an input file domains.txt with one domain per line (UTF-8 encoded):
  3. Run the DNS Resolver:
    python dns_resolver.py --input domains.txt --output dns_output.txt --records a,aaaa,ns,mx,txt,spf,soa,cname,dmarc --threads 10
    You can specify the types of DNS records to query using the: --records a, mx, spf, dmarc
    and also define the number of threads using --threads 10. The result will be saved in dns_output.txt.

Download DNS Resolver:
Content of this hidden block can only be seen by members of: Premium
Password:
Content of this hidden block can only be seen by members of: Premium
Top