Support querying WHOIS for information about IP blocks/addresses
WHOIS is very useful for determining who owns/operates the network that defines a given IP address, and roughly determining its location (since that's how IP blocks are assigned).
The same issues parsing WHOIS results for DNS domains apply to WHOIS results for IP addresses/subnets, e.g. ARIN uses a different format than JPNIC....
This codebase probably needs to be slightly refactored to support this, e.g.: instead of directly mapping a substring of the input to a set of per-domain regexps, just do the WHOIS query and then try to determine the registrar (and their regexp map) by parsing either the whois server name output by "whois --verbose" (not sure how portable this is) or the WHOIS service identification in response text.
For example, queries that end up going to JPNIC result in verbose output starting with "Using server whois.nic.ad.jp.", and the responses include this header:
[ JPNIC database provides information regarding IP address and ASN. Its use ]
Queries going to ARIN produce verbose output starting with "Using server whois.arin.net.", and the responses include this header text:
# # ARIN WHOIS data and services are subject to the Terms of Use