Python nslookup

def foward_lookup(domain): try: return socket.gethostbyname(domain) except: return False

Reverse resolution

def reverse_lookup(ip): try: return socket.gethostbyaddr(ip)[0] except: return False

main(): foward_lookup("yahoo.co.jp")

Recommended Posts

Python nslookup
Python
kafka python
Python basics ⑤
python + lottery 6
Built-in python
Python comprehension
Python technique
Studying python
Python 2.7 Countdown
Python memorandum
Python FlowFishMaster
Python service
python function ①
Python basics
Python memo
ufo-> python (3)
Python comprehension
install python
Python Singleton
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Python increment
python tips
Installing Python 3.4.3.
Try python
Python memo
Python iterative
Python algorithm
[Python] Variables
Python functions
Python sys.intern ()
Python decimals
python underscore
Python summary
Start python
[Python] Sort
Note: Python
Python basics ③
Python basics
[Scraping] Python scraping
Python update (2.6-> 2.7)
Python memorandum
python learning
Hannari Python 2020
[Rpmbuild] Python 3.7.3.
Prorate Python (1)
python memorandum
Download python
python memorandum
Python memo
started python
Python #JSON
python quiz
Python encoding
Python note
Python string
Python installation
ufo-> python (2)