NAME
    BW whois - A whois client by Bill Weinman

SYNOPSIS
    whois [*options*] (*request*[@*host*[:*port*]]) [ ... ]

DESCRIPTION
    Designed to work with the new-mangled whois system introduced 1 Dec
    1999.

    Under the new domain-name regime the whois system is now distributed
    amongst the various domain-police^H^H^H^H^H^H^H^H^H^H registrars,
    thereby requiring that we make at least two separate requests (to two
    separate servers) for each whois record.

    This program will first go to the "root" whois server and ask for a
    record. If found, the root server will tell us where to go get the
    actual record, and then we go get it.

    The request can be a domain name, (e.g. whois bw.org) or any other
    entity that the given host can resolve (e.g. whois
    !ww104@whois.networksolutions.com).

    If host is specified, the request will be sent literally to the
    specified host.

    If both host and port are specified, the request will be sent to that
    host using the specified port instead of the normal whois port (43).

    Multiple requests on a single command line are supported.

  Automatic CGI Support

    BW whois works as a CGI program without modification. You can create
    your own look by using an external HTML file named whois.html, but that
    is completely optional. It works fine as-is.

    The external HTML file will need a few simple "placeholders" in it. The
    placeholders are replaced at runtime with the various values which make
    this work. These placeholders are represented by text enclosed in '$'
    signs like this: $PLACEHOLDER$

    The placeholders are described here:

    $SELF$
        The URI path of the program on your web server, taken from the value
        of the SCRIPT_NAME environment variable.

    $DOMAIN$
        The domain that was last looked up, if any.

    $RESULT$
        The result of the whois query from BW whois.

    To supress the disclaimer text in the output (like --stripheader) add a
    hidden field named stripheadere like this:

     `<input type=hidden name=stripheader value=1>'

    To supress progress text in the output (like --quiet) add a hidden field
    named quiet like this:

     `<input type=hidden name=quiet value=1>'

    To allow japanese output from whois.nic.ad.jp (like --jpokay) add a
    hidden field named jpokay like this:

     `<input type=hidden name=jpokay value=1>'

    You can get an example file from the program with:

     `whois --makehtml > whois.html'

  Optional TLD Table Support

    You can use an optional TLD table to find whois servers for TLDs (Top
    Level Domains) besides .COM, .NET, and .ORG. If this table is installed
    at /etc/tld.conf the program will look there for the whois server for a
    given TLD. It skips that lookup for .COM, .NET, and .ORG. There is an
    example table included with the program.

    The format of the tld.conf file is as follows:

        Lines that begin with '#' are ignored. 

        Token lines are like: 
          token  token  optional comments

        The first token is the TLD, the leading '.' is required.

        The second token is the fully-qualified domain name for the 
        whois server that responds to requests for the given TLD. 

        The two tokens can be separated by spaces and/or tabs

        Anything on the line after the second token is ignored.

        A leading '#' for in-line comments is not required, but 
        may be in the future. 

        The file is searched sequentially, so it's important to have 
        2nd-level domains earlier in the file than corresponding 
        top-level domains. (e.g. .net.au before .au).

  Netblock Referrals

    This program attempts to find netblock requests. If a request is
    entirely numeric (e.g. 123.234), the program first checks with
    whois.arin.net (ARIN). If an ARIN record contains a referral to another
    whois system, (e.g. RIPE or APNIC) the program will attempt to detect
    that and snatch the record from the referened whois system. Note: ARIN's
    records are very inconsistent in their formatting, so this may not
    always do something intelligent.

OPTIONS
    --help
        Print a usage message.

    --version
        Print the version information and exit.

    --host=*host*, -h *host*
        Specify a specific host.

    --port=*port*, -p *port*
        Specify an alternate port.

    --quiet, -q
        Be wery, wery quiet. I'm hunting wabbits.

    --stripheader, -s
        Sets the stripheader mode. The program makes an attempt to strip off
        those inane disclaimers that so many registries are starting to
        prepend to their whois records.

    --makehtml
        Writes a sample HTML file (for CGI mode use) to standard out.

    --jpokay
        Allow japanese output from nic.ad.jp.

ENVIRONMENT
    The environment variable BW_WHOIS is checked for default values at
    startup. The following values are supported:

    stripheader
        Sets the stripheader mode. The program makes an attempt to strip off
        those inane disclaimers that so many registries are starting to
        prepend to their whois records.

    quiet
        Puts the program in quiet mode.

    tld=/path/to/other/location/for/tld.conf
        Allows you to specify a location for the tld.conf file. Useful if
        you don't have access to the /etc directory.

    jpokay
        Allow japanese output from whois.nic.ad.jp servers.

    You can specify more than one option in the BW_WHOIS variable. For
    example:

     `BW_WHOIS="stripheader quiet tld=/home/myhome/tld.conf"'

CAVEATS
    Not all whois servers comply with RFC 954, unfortunately that lack of
    compliance is so inconsistent that the same commands can produce wildly
    different results from server to server.

    This client deals with the situation by sending fully-qualified requests
    only to NSI's servers, and the simplest form of request to other
    servers. This tactic is not entirely reliable.

SEE ALSO
    RFC 954: NICNAME/WHOIS
        http://www.ietf.org/rfc/rfc0954.txt

FILES
    /etc/tld.conf
        An optional table of TLDs and associated whois servers.

    NOTE: The format of the tld.conf file changed in version 2.7. Please be
    sure your file has leading dots (e.g. .au) if you are using this version
    of BW whois.

HISTORY
    The whois command first appeared in 4.3BSD. The BW Whois command first
    appeard 2 December 1999.

    See the HISTORY file for more detail about the history of BW Whois.

AUTHOR
    Bill Weinman <http://bw.org/>

    You can find the latest version of BW Whois at <http://bw.org/whois/>.

    You can send email to Bill Weinman using the web form at
    <http://bw.org/email/>.

COPYRIGHT
    Copyright 1999-2000 William E. Weinman

    This program is free software. You may modify and distribute it under
    the same terms as perl itself.

