Skip to content

Instantly share code, notes, and snippets.

@R3DHULK
Created February 10, 2023 15:26
Show Gist options
  • Save R3DHULK/031f4ff86c0eab11d65a8ed27626c377 to your computer and use it in GitHub Desktop.
Save R3DHULK/031f4ff86c0eab11d65a8ed27626c377 to your computer and use it in GitHub Desktop.
DNS Enumeration Software In Python
import socket
def dns_enumeration(domain):
try:
# Get all DNS records for the domain
records = socket.getaddrinfo(domain, None)
print("[+] DNS Records for " + domain + ":")
for record in records:
print("[-] " + str(record[4][0]))
except Exception as e:
print("[-] Error: " + str(e))
# Example usage
dns_enumeration(input(" [+] Enter URL: "))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment