Simple Whois Daemon: swhoisd

[ Introduction | Example | Setup | Features | Internationalization/Localization | Download | Tips and Patches | Help Wanted | License | References ]

[Earth] Swhoisd Introduction

Swhoisd, Simple WHOIS Daemon, provides the standard Internet whois directory service It is much simpler to setup and administrator than the other whois daemons available, such as RIPE whois or the original SRC whois. This is because it uses a flat-text file, /etc/swhoisd.conf, instead of a complex database. This whois server is recommended only for small databases (preferably under 100 records and no more than 1000).

This daemon conforms to RFC 834 and uses TCP port 43 (service "whois").

[Earth] Swhoisd Example Output

Swhoisd may be accessed by any whois client. For example:

$ whois -h localhost fred
SWHOIS Daemon Release 2.0
Searching for fred. Found 1 record(s) matching fred.

Person:                 (Handle FF1-DRYDOG)
Name:                   Fred Flintstone
Email address:          fred@drydog.com
Address:                3990 Rock Bottom Dr., San Diego, CA 92111
Country:                US
Telephone:              858-853-1212
FAX No:                 630-555-0654
Last Updated:           Sat Jun 23 18:31:55 PDT 2001

To single out one record, look it up with "!XXX", where XXX is the handle.

Note: for the fwhois client, the command line syntax varies slightly. For example, fwhois fred@localhost

[Earth] Swhoisd Setup

After installing swhoisd, you need to edit file /etc/swhoisd.conf and add your directory information.

To enable the daemon, add a line to your /etc/inetd.conf similar to the following (depending on where you installed the daemon):

  whois   stream  tcp nowait root /usr/local/sbin/in.swhoisd in.swhoisd

For RedHat Linux, file /etc/xinetd.d/whois is created for use by xinetd:

service whois
{
	socket_type     = stream
	wait            = no
	user            = nobody
	server          = /usr/sbin/in.swhoisd
	disable         = no
#       log_type        = FILE /var/log/swhoisd.log
}

Make sure you have inetd (or xinetd) reread it's configuration files by kill -HUP (or by restarting [x]inetd).

For whose who have Apache and PHP, here's a PHP script to query the whois server

For details, see file INSTALL that comes bundled with the package or source.

[Earth] Swhoisd Features

[Earth] Swhoisd Internationalization and Localization

Swhoisd has been internationalized (I18N). That means, with the proper localized (L18N) message text file, swhoisd can display messages in your local language ("localized"). For example, for Spanish (Español), with LANG=es_MX, the above example would appear as follows:

$ whois -h localhost fred
SWHOIS Daemon Release 2.0
Buscando fred. Se encontraron 1 archivo(s) que corresponde con fred.

Persona:                 (Manija FF-DRYDOG)
Nombre:                  Fred Flintstone
Dirección de correo-e:   fred@drydog.com
Dirección:               3990 Rock Bottom Dr., San Diego, CA 92111
Pais:                    US
Teléfono:                858-853-1212
Numero del Facsímile:    630-555-0654
Actualizado pasado:      Sat Jun 23 18:31:55 PDT 2001

Para seleccionar un expediente, busquelo con "!XXX", usando XXX como manija.

To use a message text file for swhoisd, you should already have your $LANG (or $LC_*) environment variable set to your language and country code (e.g., "es_MX"). Set it your /etc/profile file so the in.swhoisd daemon will read it (RedHat uses /etc/sysconfig/i18n). If you start in.swhoisd with xinetd or inetd, check to see that /etc/init.d/*inetd doesn't unset $LANG or set it to another value. For example, RedHat's xinetd sets "$LANG to "en_US" Comment out lines setting these variables: LANG, LANGUAGE, LC_ALL, and LC_MESSAGES

The following language files are available:

Creating a .po Language File
If you don't have the binary .mo file, you need to convert the text file (.po) to a binary .mo file, To convert a .po file to a .mo file, run:
 msgfmt -o swhoisd.es.mo swhoisd.es.po

Substitute "es" by with your two-letter language code.

Installing a .po Language File
Copy the binary .po file to your locale directory. The location of your locale directory varies according to the value of the first two letters of your $LANG environment variable (an example for $LANG = "es_MX" is shown here):
/usr/share/locale/es/LC_MESSAGES/

For example, for German (Deutsche), LANG=de_DE, on RedHat Linux, run this command to install the file in the proper directory:
cp swhoisd.es.mo /usr/share/locale/de/LC_MESSAGES/swhoisd.mo

Adding New Language Files
To localize, copy and translate text file swhoisd.pot with your favorite editor. Send the file to back to me using my web form. To install the file, convert to a .mo file as above. Here's one example for a German de.po file:
msgid "Email address:         "
msgstr "E-Mail Adresse:        "

File swhoisd.po is provided with the binary swhoisd packages, but is also File available here for your convenience.

If you translate file swhoisd.po to another language, please send the file to back to me using my web form.

[Earth] Download: Packages and Source for swhoisd

RedHat Linux
RedHat i386 RPM: swhoisd-3.0.5-1.i386.rpm:   03 Jan 2004 22:24   (35722 bytes)
RedHat Source RPM: swhoisd-3.0.5-1.src.rpm:   03 Jan 2004 22:24   (260875 bytes)

Solaris
Solaris Intel: swhoisd-3.0-i86pc-solaris5.8.zip:   04 Jul 2001 01:31   (36065 bytes)
Solaris SPARC: swhoisd-3.0-sun4u-solaris5.8.zip:   04 Jul 2001 02:28   (33794 bytes)

Source
Source: swhoisd-3.0.5.tar.gz:   03 Jan 2004 22:23   (255795 bytes)

For a FTP directory listing of all packages and files described here, see ftp://dan.drydog.com/pub/swhoisd/

RPM packages are signed with my GNU Privacy Guard (GPG) Key.

Download and Installation Instructions: If you're new at downloading or installing packages, consult these instructions:

[Earth] Whois Client Sources and Objects

The whois client package is maintained by Marco d'Itri. For source and Debian packages see http://www.linux.it/~md/software/ See also the Freshmeat page at http://freshmeat.net/projects/whois/

RedHat Linux
RedHat i386 RPM: whois-4.5.7-1.i386.rpm:   28 Jun 2001 19:25   (20992 bytes)
RedHat Source: whois-4.5.7-1.src.rpm:   28 Jun 2001 19:25   (31226 bytes)

Debian Linux
Debian packages for whois are at http://packages.debian.org/unstable/net/whois.html or ftp://ftp.debian.org/debian/pool/main/w/whois/

Solaris
Solaris Intel: whois-4.5.7-i86pc-solaris5.8.zip:   29 Jun 2001 22:30   (20159 bytes)

Solaris SPARC: whois-4.5.7-sun4u-solaris5.8.zip:   29 Jun 2001 19:48   (20229 bytes)

Source
Source: whois-4.5.7.tar.gz:   29 Jun 2001 19:48   (49407 bytes)
(includes RedHat and Solaris build files)

[Earth] Swhoisd Tips and Patches

The following tips and patches are available for Swhoisd:

[Earth] Swhoisd Help Wanted

If you are interested, contact me using my web form.

  1. Translate message text to non-English languages (see Localization).
  2. Port to other UNIX systems and to MS Windows. (currently available on RedHat Linux and Solaris (SPARC & Intel))
  3. Make completely GNU autoconf-aware.
  4. Convert from a flat-text "database" (swhoisd.conf) to MySQL
  5. Other useful enhancements you may think of.

The following tasks are in progress:

  1. Implement IPv6 for standalone client (automatic for inetd server mode if [x]inetd supports it)
  2. Implement Legacy IPv4 code for pre-IPv6 systems, such as Solaris 7)

[Earth] License

Swhoisd is covered by the following copyright/license. This license is copied verbatium from the "BSD-style" license as modified by XFree86 to be "GNU license compatible" (i.e., it does not have the "advertising clause"--see http://www.xfree86.org/ and http://www.gnu.org/). It is also consistent with the "Open Source" definition (see http://www.opensource.org/):

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The name of the authors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

[Earth] Swhoisd References





[Home]

[Burn all .gifs] [Blue Ribbon] Copyright © 1997-2006 Dan Anderson. All rights reserved. Last updated 25 May 2018 11:21.

 

If you have questions or comments, please send a message to Dan Anderson.

http://www.dan.drydog.com/swhoisd/