Code:
###################################################################################################
## ##
## Exploit Title : ONLINE FIND DNS/NS Cloudflare 2023 ##
## ##
## Author : E1.Coders ##
## ##
## Contact : E1.Coders [at] Mail [dot] RU ##
## ##
## Portal Link : Cloudflare.com (https://Cloudflare.org) ##
## ##
## Tested ON : All DNS/NS version Host ##
## ##
## Description : Description: All websites that use this Cloudflare can be targeted ##
## ##
## All rights of this "code" tool are reserved for E1.Coders ##
## ##
###################################################################################################
# Import the socket module
import socket
# Define the domain name
domain = "targert.com"
# Get the IP address of the domain
ip = socket.gethostbyname(domain)
# Print the IP address
print(f"The IP address of {domain} is {ip}")
# Get the NS records of the domain
ns = socket.gethostbyname_ex(domain)[2]
# Print the NS records
print(f"The NS records of {domain} are {ns}")
# Get the DNS records of the domain using dnspython module
import dns.resolver
# Create a resolver object
resolver = dns.resolver.Resolver()
# Set the nameservers to Cloudflare's
resolver.nameservers = ["1.1.1.1", "1.0.0.1"]
# Query for A records
a_records = resolver.resolve(domain, "A")
# Print the A records
print(f"The A records of {domain} are:")
for record in a_records:
print(record)
# Query for CNAME records
cname_records = resolver.resolve(domain, "CNAME")
# Print the CNAME records
print(f"The CNAME records of {domain} are:")
for record in cname_records:
print(record)