We can learn more about an IP address using the Whois program. For agents with Linux or Mac OS X, the Whois program is built-in. Agents using Windows may want to download and install a whois program. See https://technet.microsoft.com/en-us/sysinternals/bb897435.aspx for more information.
The Whois program will examine the various registries used to track the names of servers on the internet. It will provide whatever information is available for a given server. This often includes the name of a person or organization that owns the server.
We'll start by using the built-in whois program. An alternative is to make a REST API request to a whois service using urllib
. We're going to defer making REST API requests to the Chapter 3, Following the Social Network.
The Whois program makes a request of a server and displays the results. The request is a single line of text, usually containing a domain name or IP address. The response from the server is a flood of text providing information...