From b98a20a65788db3b2422c41b92f1d96a17d47a7b Mon Sep 17 00:00:00 2001 From: David Blacka Date: Thu, 12 Jun 2008 21:43:59 -0400 Subject: [PATCH] Documentation updates --- README | 23 ++++++++++++++--------- rwhoisd/config.py | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/README b/README index ea49d73..aaa8895 100644 --- a/README +++ b/README @@ -1,17 +1,19 @@ WHAT IS THIS? -As a programming exercise for learning Python, I wrote a simple rwhois -server (described in RFC 2167). It uses in-memory data structures, -and it intuits the schema based on the data it sees. The server takes -as input a schema file, which for now just describes which attributes -should be indexed (and how), and data files which look much like the C -rwhoisd's data files. +In 2003, as a programming exercise for learning Python, I wrote a +simple rwhois server (described in RFC 2167). It uses in-memory data +structures, and it intuits the schema based on the data it sees. The +server takes as input a schema file, which for now just describes +which attributes should be indexed (and how), and data files which +look much like the C rwhoisd's data files. This version supports a sort of extended query syntax: IP or CIDR queries ending in "**" will result in a "subnet" search, where all of the found subnets at or below the specified network will be returned. Ending a IP or CIDR query with a single "*" will result in a -"supernet" search. +"supernet" search, returning all the networks enclosing the queried +network. (A plain network query will return the closest enclosing +network, including matching networks). It supports (as of v0.4) IPv6 CIDR networks and network blocks, and supports indexing network-block type values. That is, you can index @@ -53,6 +55,10 @@ directory. Voila! You should now have some sort of rwhois server running on port 4321 +You can also give it multiple data files: + +% ./bin/pyrwhoisd sample_data/example_schema sample_data/*_data & + CONFIGURING IT Edit rwhoisd/config.py. @@ -71,8 +77,7 @@ following differences, however: * These files may have records separated by blank lines instead of dashes. -* They are not sensitive to trailing separators (whitespace or - dashes) +* They are not sensitive to trailing separators (whitespace or dashes) * They do not have to be arranged in any special manner. That is, the C rwhoisd forces (or at least encourages) you to arrange your data diff --git a/rwhoisd/config.py b/rwhoisd/config.py index 5447ca2..d4fb5d2 100644 --- a/rwhoisd/config.py +++ b/rwhoisd/config.py @@ -48,7 +48,7 @@ verbose = False #### END Editable Configuration Options -version = "0.2" +version = "0.4" banner_string = "%%rwhois V-1.5 %s (python-rwhoisd %s)" % \ (server_hostname, version) -- 2.36.6