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").
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
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.
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 |
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.
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
Source
|
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:
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
Solaris
Source
|
The following tips and patches are available for Swhoisd:
If you are interested, contact me using my web form.
The following tasks are in progress:
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:
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. |
Copyright © 1997-2006 Dan Anderson.
All rights reserved.
Last updated
25 May 2018 11:21.
http://www.dan.drydog.com/swhoisd/