(jonas@gnu.org)
JWHOIS is an Internet Whois client that contains an extensible configuration file which defines its operation. The client supports queries to foreign hosts either through the RFC 954 - NICNAME/WHOIS protocol, the RFC 2167 - Referral Whois 1.5 protocol, or HTTP using an external browser.
Upon execution, JWHOIS searches through the its configuration to find the most specific whois server to query. Depending upon the reply from that whois server, JWHOIS can assume the query was successfull and display the result to the user, or optionally redirect the query to another server to find more specific information.
JWHOIS uses the following command-line options:
The query can optionally contain the character `@' followed by a host name to direct the search to that host. This works exactly like specifying the host with `--host' or `-h'.
JWHOIS is configurable via its configuration file, normally called `jwhois.conf'. This file is looked for in the sysconfdir that was specified when compiling the program (default is `/usr/local/etc/' on most systems).
If no configuration file can be found, JWHOIS will default all queries
to whois.internic.net.
An example configuration file that includes most known Whois servers can be
found in the example subdirectory of the official distribution.
This example configuration also contains a lot of well used options
that should be suitable for most setups.
The configuration file is split into a number of blocks. Each block can contain a number of different options which are explained in the sections below. You can also get an overview of the syntax by looking at the example configuration file included in the distribution.
The global options of JWHOIS configure some basic facilities that are to be used for all hosts and queries made.
whois-servers.net domain for every known
top-level domain, pointing to the appropriate whois
server.
When querying for `wildebeest.se' for example,
JWHOIS would look for an address se.whois-servers.net
and query the appropriate server based on that information.
If you wish to make whois-servers.net-style queries
using another domain name than whois-servers.net, you
can change this option to the domain name you want.
Examples:
cachefile = "/var/lib/jwhois.db"; cacheexpire = 168; browser-pathname = "/usr/bin/lynx"; browser-stdarg = "-dump"; browser-postarg = "-post_data";
When making a query, JWHOIS looks at the @option{whois-servers} block to determine which host to send the query to. This block consists of a number of rules. Each rule is evaluated in turn, starting with the first one in @option{whois-servers}. A rule consists of a key and a value. The key can be either a special option, or a CIDR block or regular expression that is matched against the query that the user specified.
The special option @option{type} takes one value, either @option{cidr} or @option{regex}. This defines the current blocks matching. Each block can match either with CIDR blocks or regular expressions, never both.
If the key is a regular expression, the value can take on of two forms. Either a single string containing the hostname of the appropriate whois-server, optionally postfixed with a colon and a port number, or a block.
If the value of the regular expression is a block, it can contain any number of options. The options @option{whois-server} and @option{query-format} are supported today.
@option{whois-server} specifies the hostname of the whois server to send a query to, optionally postfixed with a colon and a port number, just as if the value had been a single string containing the whois server hostname.
@option{query-format} rewrites queries matching this rule according to the contents of the options value. The special characters `$*' are replaced with the original query. If a @option{query-format} is specified both on an individual rule and on a server option, the most @option{query-format} for the individual rule will be used since it is most specific.
Examples:
whois-servers {
type = regex;
"\\([0-9]+\\.\\)+[0-9]+" = "struct cidr-blocks";
".*-[A-Z]+$" = "struct handles";
".*" = "whois.internic.net";
};
handles {
type = regex;
".*-RIPE$" = "whois.ripe.net";
};
cidr {
type = cidr;
"61.0.0.0/8" {
whois-server = "whois.apnic.net";
query-format = "$* /e";
}
default = "whois.arin.net";
};
The @option{server-options} block defines a number of parameters that are specific to each host.
Examples:
server-options {
"rwhois\\.nic\\.ve" {
rwhois = true;
rwhois-display = "dump";
rwhois-limit = 10;
}
"whois\\.crsnic\\.net" {
whois-redirect = ".*Whois Server: \\(.*\\)";
}
"whois\\.ncst\\.ernet\\.in" {
query-format = "domain $*";
}
"www\\.nic-se\\.se" {
http = true;
http-method = "GET";
http-action = "/cgi-bin/whois/www-to-whois";
form-element = "domain";
}
}
RIPE (Réseaux IP Européens) has defined a number of options that can be
used against a RIPE-compatible whois server (ripe.net, apnic.net and
others). Unfortunately, there is really no way of telling whether a
host we are connecting to is RIPE-compatible or not. RIPE extensions
are therefore not directly incorporated into the JWHOIS client.
A list of the options can be found in RIPE Document 157 which you can get
from the RIPE ftp server, ftp://ftp.ripe.net/ripe/docs/.
It is possible to use these options together with JWHOIS by changing the format of the query slightly. If you were to search for all entries in the RIPE database which lists the admin-c, tech-c or zone-c as CO19-RIPE, you could use the following command syntax:
$ jwhois -h whois.ripe.net -- -i admin-c,tech-c,zone-c CO19-RIPE
`--' is used to separate the RIPE options from the jwhois options.
Email bug reports to bug-jwhois@gnu.org.
This document was generated on 7 September 2001 using the texi2html translator version 1.54.