9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] iwhois and ndb for fun and profit
Date: Mon, 28 Apr 2008 15:08:55 -0400	[thread overview]
Message-ID: <1b19038afdb7c809e1e99e4335acb139@quanstro.net> (raw)

whois is kind of a gnarly problem.  there are no standards.
referral isn't requires so you need a list of machines to start
with.  (hoping that they will refer you.)  and you need to know
which character set each machine returns.  remember, no standards.
and finally, the query isn't really standard, so that needs to
depend on the whois server as well.

but it turns out that ndb has all the tools that one needs to
build such an ad-hoc database.  it's trivial to associate tlds to
whois servers.  it's trivial to associate those with character sets,
query transformations and deboilerplating functions.  and
ipquery knows how to match cidr ranges so that given an association
of cidr blocks to machines and an ip, the correct whois server
can be determined for ip4 and ip6 queries.

the source is here: /n/sources/contrib/quanstro/src/iwhois.
it's a ~130 line rc script and 500 lines of ndb rules.

i'd be happy to know of any fixes or database updates.

- erik



                 reply	other threads:[~2008-04-28 19:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b19038afdb7c809e1e99e4335acb139@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).