nanog mailing list archives
RE: Question on 7.0.0.0/8
From: <michael.dillon () bt com>
Date: Mon, 16 Apr 2007 16:59:32 +0100
With whois, I'd need to do 256 lookups, and I'd probably have to implement the whois protocol myself (ok, trivial, but still) because I can't just use one of the 3 million HTTP utils/libraries.
Really?
Do you know for a fact that the IANA whois server will not support
lookups for 0.0.0.0 and return a complete set of entries in one query?
Your comment about the whois protocol is one of the funniest things I've
heard all year. Whois is about as complex as the TCP echo protocol found
on port 7. Here is an example in Python:
import socket
server = "whois.arin.net"
whoisport = 43
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((server, whoisport))
s.send("+ 199.1.2.3\n")
print s.recv(8192)
Nevertheless, I agree about using HTTP. The following basically works:
import urllib
answer =
urllib.urlopen("http://ws.arin.net/whois?queryinput=199.4.5.6").read()
print answer
However, to parse it you have to go to the second PRE block to extract
the data. If ARIN would supply a whois service that was designed to be
used with a RESTful API, then it could leave off all the HTML crud that
is there for an interactive viewer and maybe provide the data in XML or
JSON format rather than the RFC 2822/2068 header format.
--Michael Dillon
Current thread:
- RE: Question on 7.0.0.0/8, (continued)
- RE: Question on 7.0.0.0/8 william(at)elan.net (Apr 15)
- RE: Question on 7.0.0.0/8 alex (Apr 15)
- RE: Question on 7.0.0.0/8 michael.dillon (Apr 16)
- RE: Question on 7.0.0.0/8 william(at)elan.net (Apr 15)
- RE: Question on 7.0.0.0/8 michael.dillon (Apr 16)
- Re: Question on 7.0.0.0/8 Iljitsch van Beijnum (Apr 16)
- RE: Question on 7.0.0.0/8 michael.dillon (Apr 16)
- Re: Question on 7.0.0.0/8 Steve Wright (Apr 16)
- Re: Question on 7.0.0.0/8 Leo Vegoda (Apr 16)
- Re: Question on 7.0.0.0/8 Iljitsch van Beijnum (Apr 16)
- RE: Question on 7.0.0.0/8 michael.dillon (Apr 16)
- RE: Question on 7.0.0.0/8 william(at)elan.net (Apr 16)
- Re: Question on 7.0.0.0/8 David Conrad (Apr 16)
- Re: Question on 7.0.0.0/8 Jeroen Massar (Apr 16)
- RE: Question on 7.0.0.0/8 Ray Plzak (Apr 16)
- RE: Question on 7.0.0.0/8 Bruce Campbell (Apr 16)
- RE: Question on 7.0.0.0/8 michael.dillon (Apr 16)
- .uk SLD history (was Re: Question on 7.0.0.0/8) Keith Mitchell (Apr 17)
- Re: Question on 7.0.0.0/8 Jeroen Massar (Apr 14)
- Re: Question on 7.0.0.0/8 Rob Thomas (Apr 14)
- Re: Question on 7.0.0.0/8 David Conrad (Apr 14)
