Python Whois client example
In this article, we will show you how to create a simple Whois client both in Python 2 and Python 3. Tested Python 2.7.10 Python 3.4.3 1. Python 3 Whois example In Python 3, the socket accepts bytes, so you need to encode() and decode() manually. whois3.py import sys import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) …