Skip to content

Instantly share code, notes, and snippets.

@stevenswafford stevenswafford/dnsmap.py
Last active Aug 29, 2015

Embed
What would you like to do?
Maps DNS from a given domain.
#!/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
You can’t perform that action at this time.