Last active
May 9, 2022 07:57
-
-
Save stevenswafford/51e6a9f84540c607027a to your computer and use it in GitHub Desktop.
Maps DNS from a given domain.
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
#!/usr/bin/env python | |
# Description : Maps DNS from a given domain. | |
import socket | |
import sys | |
domain = raw_input("Enter domain: ") | |
try: | |
ip = socket.gethostbyname(domain) | |
except socket.gaierror: | |
print "Invalid Domain: " + domain | |
sys.exit() | |
print "DNS: " + ip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment