Created
February 10, 2023 15:26
-
-
Save R3DHULK/031f4ff86c0eab11d65a8ed27626c377 to your computer and use it in GitHub Desktop.
DNS Enumeration Software In Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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