mirror of
https://github.com/rfc1036/whois.git
synced 2026-04-03 06:40:52 +00:00
Compare commits
No commits in common. "next" and "v5.6.2" have entirely different histories.
9
COPYING
9
COPYING
@ -2,7 +2,7 @@
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
<https://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@ -304,7 +304,8 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@ -328,8 +329,8 @@ necessary. Here is a sample; alter the names:
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Moe Ghoul>, 1 April 1989
|
||||
Moe Ghoul, President of Vice
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
|
||||
6
config.h
6
config.h
@ -26,17 +26,12 @@
|
||||
/* which versions? */
|
||||
# define HAVE_GETOPT_LONG
|
||||
# define HAVE_GETADDRINFO
|
||||
# define HAVE_READPASSPHRASE
|
||||
# define ENABLE_NLS
|
||||
# ifndef LOCALEDIR
|
||||
# define LOCALEDIR "/usr/local/share/locale"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined OpenBSD
|
||||
# define HAVE_READPASSPHRASE
|
||||
#endif
|
||||
|
||||
/* needs unistd.h */
|
||||
#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L
|
||||
# define HAVE_GETADDRINFO
|
||||
@ -46,7 +41,6 @@
|
||||
#if defined __APPLE__ && defined __MACH__
|
||||
# define HAVE_GETOPT_LONG
|
||||
# define HAVE_GETADDRINFO
|
||||
# define HAVE_READPASSPHRASE
|
||||
# define HAVE_BSDICRYPT
|
||||
#endif
|
||||
|
||||
|
||||
2
data.h
2
data.h
@ -17,6 +17,7 @@ const char *ripe_servers[] = {
|
||||
"whois.ripn.net",
|
||||
"whois.register.si",
|
||||
"whois.nic.ir",
|
||||
"whois.ra.net",
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -26,6 +27,7 @@ struct server_referral_handler {
|
||||
};
|
||||
|
||||
const struct server_referral_handler server_referral_handlers[] = {
|
||||
{ "whois.6bone.net", find_referral_server_6bone },
|
||||
{ "whois.apnic.net", find_referral_server_apnic },
|
||||
{ "whois.arin.net", find_referral_server_arin },
|
||||
{ "whois.iana.org", find_referral_server_iana },
|
||||
|
||||
34
debian/changelog
vendored
34
debian/changelog
vendored
@ -1,37 +1,3 @@
|
||||
whois (5.6.6) unstable; urgency=medium
|
||||
|
||||
* Added the .mc TLD server.
|
||||
* Updated the .ps TLD server.
|
||||
* Removed the .info, .mobi, .travel and .فلسطين (.xn--ygbi2ammx,
|
||||
Palestinian Territory) TLD servers.
|
||||
* Removed 3 new gTLDs which are no longer active.
|
||||
* mkpasswd: added support the Chinese SM3-based hashing algorithms.
|
||||
|
||||
-- Marco d'Itri <md@linux.it> Mon, 16 Feb 2026 02:46:51 +0100
|
||||
|
||||
whois (5.6.5) unstable; urgency=medium
|
||||
|
||||
* Updated the .co TLD server.
|
||||
* Added some large KRNIC networks.
|
||||
* Updated the second level .uk TLD servers.
|
||||
* Removed the .pro TLD server.
|
||||
* Removed 1 new gTLD which is no longer active.
|
||||
|
||||
-- Marco d'Itri <md@linux.it> Mon, 13 Oct 2025 03:37:20 +0200
|
||||
|
||||
whois (5.6.4) unstable; urgency=medium
|
||||
|
||||
* Updated the .cm and .to TLD servers.
|
||||
|
||||
-- Marco d'Itri <md@linux.it> Sat, 02 Aug 2025 01:13:07 +0200
|
||||
|
||||
whois (5.6.3) unstable; urgency=medium
|
||||
|
||||
* Added the .sr and .мон (.xn--l1acc, Mongolia) TLD servers.
|
||||
* Use readpassphrase(3) on OpenBSD and FreeBSD.
|
||||
|
||||
-- Marco d'Itri <md@linux.it> Thu, 17 Jul 2025 05:15:53 +0200
|
||||
|
||||
whois (5.6.2) unstable; urgency=medium
|
||||
|
||||
* Updated the .post and .in (and related IDN TLDs) TLD servers.
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@ -8,8 +8,8 @@ Build-Depends: debhelper-compat (= 13), gettext, pkgconf,
|
||||
bash-completion,
|
||||
libcrypt-dev,
|
||||
libidn2-dev,
|
||||
Vcs-Git: https://salsa.debian.org/md/whois.git
|
||||
Vcs-Browser: https://salsa.debian.org/md/whois
|
||||
Vcs-Git: https://github.com/rfc1036/whois.git
|
||||
Vcs-Browser: https://github.com/rfc1036/whois
|
||||
|
||||
Package: whois
|
||||
Architecture: any
|
||||
|
||||
6
debian/salsa-ci.yml
vendored
6
debian/salsa-ci.yml
vendored
@ -1,6 +0,0 @@
|
||||
---
|
||||
include:
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
|
||||
|
||||
variables:
|
||||
SALSA_CI_IGNORED_BRANCHES: '^next$'
|
||||
@ -10,20 +10,16 @@
|
||||
1.0.0.0/8 apnic
|
||||
2.0.0.0/8 ripe
|
||||
5.0.0.0/8 ripe
|
||||
14.64.0.0/11 whois.nic.or.kr
|
||||
14.0.0.0/8 apnic
|
||||
24.132.0.0/14 ripe
|
||||
27.176.0.0/13 whois.nic.or.kr
|
||||
27.0.0.0/8 apnic
|
||||
31.0.0.0/8 ripe
|
||||
36.0.0.0/8 apnic
|
||||
37.0.0.0/8 ripe
|
||||
39.0.0.0/8 apnic
|
||||
41.0.0.0/8 afrinic
|
||||
42.32.0.0/12 whois.nic.or.kr
|
||||
42.0.0.0/7 apnic
|
||||
46.0.0.0/8 ripe
|
||||
49.8.0.0/14 whois.nic.or.kr
|
||||
49.0.0.0/8 apnic
|
||||
51.0.0.0/8 ripe
|
||||
# whois -r -K -h whois.apnic.net -i admin-c IM76-AP
|
||||
|
||||
@ -14,17 +14,12 @@ close($fh);
|
||||
my ($ver) = $line =~ /^whois \s+ \( ( [^\)]+ ) \) \s+ \S+/x;
|
||||
die "Version number not found in $changelog!\n" if not $ver;
|
||||
|
||||
$ver =~ s/ (
|
||||
build\d+
|
||||
| ubuntu\d+
|
||||
| ~\S+
|
||||
| \+\S+
|
||||
) $//x;
|
||||
$ver =~ s/ ( ~bpo\d+\+\d+ | \+b\d+ | ~deb\d+.* | ubuntu\d+ | build\d+ | \+dyson\d+ ) $//x;
|
||||
|
||||
# The version number must not deviate from this format or the -V option
|
||||
# to RIPE-like servers will break. If needed, update the previous regexp.
|
||||
# This may not be true anymore in 2019.
|
||||
die "Invalid version number in $changelog: '$ver'!\n"
|
||||
die "Invalid version number in $changelog!\n"
|
||||
unless $ver =~ /^ \d+\.\d+ ( \.\d+ )? $/x;
|
||||
|
||||
# This is the version number used in the help messages.
|
||||
|
||||
28
mkpasswd.c
28
mkpasswd.c
@ -12,7 +12,8 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
@ -46,9 +47,6 @@
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_READPASSPHRASE
|
||||
#include <readpassphrase.h>
|
||||
#endif
|
||||
|
||||
/* Application-specific */
|
||||
#include "version.h"
|
||||
@ -102,6 +100,9 @@ static const struct crypt_method methods[] = {
|
||||
{ "md5", "$1$", 8, 8, 0, NULL },
|
||||
#if defined XCRYPT_VERSION_NUM
|
||||
{ "yescrypt", "$y$", 0, 0, 1, "Yescrypt" },
|
||||
#if XCRYPT_VERSION_NUM >= ((4 << 16) | 4)
|
||||
{ "gost-yescrypt", "$gy$", 0, 0, 1, "GOST Yescrypt" },
|
||||
#endif
|
||||
{ "scrypt", "$7$", 0, 0, 1, "scrypt" },
|
||||
#endif
|
||||
#ifdef HAVE_BCRYPT_OBSOLETE
|
||||
@ -110,7 +111,7 @@ static const struct crypt_method methods[] = {
|
||||
#endif
|
||||
#ifdef HAVE_BCRYPT
|
||||
{ "bcrypt", "$2b$", 22, 22, 2, "bcrypt" },
|
||||
{ "bcrypt_a", "$2a$", 22, 22, 2, "bcrypt (obsolete $2a$ version)" },
|
||||
{ "bcrypt-a", "$2a$", 22, 22, 2, "bcrypt (obsolete $2a$ version)" },
|
||||
#endif
|
||||
#if defined HAVE_SHA_CRYPT
|
||||
/* http://people.redhat.com/drepper/SHA-crypt.txt */
|
||||
@ -137,13 +138,6 @@ static const struct crypt_method methods[] = {
|
||||
#endif
|
||||
{ "descrypt", "", 2, 2, 0,
|
||||
N_("standard 56 bit DES-based crypt(3)") },
|
||||
#if XCRYPT_VERSION_NUM >= ((4 << 16) | 5)
|
||||
{ "sm3crypt", "$sm3$", 0, 0, 1, "ShangMi 3" },
|
||||
{ "sm3_yescrypt", "$sm3y$", 0, 0, 1, "ShangMi 3 Yescrypt" },
|
||||
#endif
|
||||
#if XCRYPT_VERSION_NUM >= ((4 << 16) | 4)
|
||||
{ "gost_yescrypt", "$gy$", 0, 0, 1, "GOST Yescrypt" },
|
||||
#endif
|
||||
#if defined FreeBSD || defined XCRYPT_VERSION_NUM
|
||||
{ "nt", "$3$", 0, 0, 0, "NT-Hash" },
|
||||
#endif
|
||||
@ -393,21 +387,11 @@ int main(int argc, char *argv[])
|
||||
exit(2);
|
||||
}
|
||||
} else {
|
||||
#ifdef HAVE_READPASSPHRASE
|
||||
const size_t size = 128;
|
||||
|
||||
password = NOFAIL(malloc(size));
|
||||
if (!readpassphrase(_("Password: "), password, size, 0)) {
|
||||
perror("readpassphrase");
|
||||
exit(2);
|
||||
}
|
||||
#else
|
||||
password = getpass(_("Password: "));
|
||||
if (!password) {
|
||||
perror("getpass");
|
||||
exit(2);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@ -282,6 +282,7 @@ download
|
||||
drive
|
||||
dtv
|
||||
dubai
|
||||
dunlop
|
||||
dupont
|
||||
durban
|
||||
dvag
|
||||
@ -398,6 +399,7 @@ godaddy
|
||||
gold
|
||||
goldpoint
|
||||
golf
|
||||
goo
|
||||
goodyear
|
||||
goog
|
||||
google
|
||||
@ -742,6 +744,7 @@ realtor
|
||||
realty
|
||||
recipes
|
||||
red
|
||||
redstone
|
||||
redumbrella
|
||||
rehab
|
||||
reise
|
||||
@ -990,6 +993,7 @@ windows
|
||||
wine
|
||||
winners
|
||||
wme
|
||||
wolterskluwer
|
||||
woodside
|
||||
work
|
||||
works
|
||||
|
||||
90
ripe-mail
Normal file
90
ripe-mail
Normal file
@ -0,0 +1,90 @@
|
||||
From ripe-dbm@ripe.net Mon Jan 27 10:09:59 2003
|
||||
Return-Path: <ripe-dbm@ripe.net>
|
||||
Delivered-To: md@wonderland.linux.it
|
||||
Received: from attila.bofh.it (localhost [127.0.0.1])
|
||||
by wonderland.linux.it (Postfix/Md) with ESMTP id 582BA33CD5
|
||||
for <md@wonderland.linux.it>; Mon, 27 Jan 2003 10:09:59 +0100 (CET)
|
||||
Received: from picard.linux.it (picard.linux.it [::ffff:62.177.1.107])
|
||||
by attila.bofh.it (Postfix) with ESMTP id 46AE15F966
|
||||
for <md@wonderland.linux.it>; Mon, 27 Jan 2003 09:03:25 +0100 (CET)
|
||||
Received: from birch.ripe.net (birch.ripe.net [::ffff:193.0.1.96])
|
||||
by picard.linux.it (Postfix) with ESMTP id 4A76942B2
|
||||
for <md@Linux.IT>; Mon, 27 Jan 2003 09:05:01 +0100 (CET)
|
||||
Received: from x24.ripe.net (x24.ripe.net [193.0.1.24])
|
||||
by birch.ripe.net (8.12.5/8.11.6) with ESMTP id h0R83NAq030231;
|
||||
Mon, 27 Jan 2003 09:03:23 +0100
|
||||
Received: (from ripe-dbm@localhost)
|
||||
by x24.ripe.net (8.12.4/8.12.6) id h0R83M5k002263;
|
||||
Mon, 27 Jan 2003 09:03:22 +0100
|
||||
Message-Id: <200301270803.h0R83M5k002263@x24.ripe.net>
|
||||
From: RIPE Database Administration <ripe-dbm@ripe.net>
|
||||
Cc: Can Bican <can@ripe.net>
|
||||
To: md@Linux.IT
|
||||
FCC: cur
|
||||
Subject: Re: NCC#2003013332 Re: [db-wg] IPv6 Whois update
|
||||
Reply-To: ripe-dbm@ripe.net
|
||||
X-Organization: RIPE Network Coordination Centre
|
||||
X-Phone: +31 20 535 4444
|
||||
X-Fax: +31 20 535 4341
|
||||
X-Mailer: BaT/0.67
|
||||
Sender: RIPE Database Manager <ripe-dbm@ripe.net>
|
||||
Date: Mon, 27 Jan 2003 09:03:21 +0100
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Spam-Status: No, hits=0.6 required=5.0
|
||||
tests=DEAR_SOMEBODY,QUOTED_EMAIL_TEXT,SIGNATURE_SHORT_DENSE,
|
||||
SPAM_PHRASE_05_08
|
||||
version=2.43
|
||||
X-Spam-Level:
|
||||
Status: RO
|
||||
Content-Length: 1239
|
||||
Lines: 46
|
||||
|
||||
|
||||
Dear Marco d'Itri,
|
||||
|
||||
For the month October, 2002:
|
||||
We had 55 milion queries, 4.3 milion done with your client.
|
||||
|
||||
This number is probably not the best indicator as some IPs do a lot of
|
||||
queries so here are also the statistics for different IP addresses using
|
||||
your client:
|
||||
31364 (of 853385) different IP addresses used your client.
|
||||
|
||||
If you have any more questions, please contact <ripe-dbm@ripe.net>.
|
||||
|
||||
Regards,
|
||||
|
||||
Tiago Antao
|
||||
____________________________
|
||||
RIPE Database Administration.
|
||||
|
||||
|
||||
|
||||
Original message follows:
|
||||
------------------------
|
||||
|
||||
On Thursday 23 January 2003 18:52, Marco d'Itri wrote:
|
||||
> On Jan 23, Can Bican <can@ripe.net> wrote:
|
||||
> >This is a feature we supported, and we'll keep supporting it. It's a
|
||||
> > mistake on our side that we'll change promptly, so please don't change
|
||||
> > the behaviour. We'll make the proxy accept -V switches of these types.
|
||||
>
|
||||
> Thank you for your prompt reply.
|
||||
> BTW, is any statistics about -V arguments available? I wonder how many
|
||||
> queries are made with my client (i.e. the -V argument matches /^Md/).
|
||||
|
||||
I have forwarded your request to ripe-dbm@ripe.net. You can contact that
|
||||
address if you'd like more/less specific requirements about the counts.
|
||||
|
||||
Regards,
|
||||
|
||||
--
|
||||
Can Bican
|
||||
DB Group
|
||||
RIPE NCC
|
||||
|
||||
|
||||
|
||||
|
||||
@ -15,7 +15,8 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
@ -59,15 +59,15 @@
|
||||
.biz whois.nic.biz
|
||||
.cat whois.nic.cat
|
||||
.coop whois.nic.coop
|
||||
.info NONE
|
||||
.info RECURSIVE whois.nic.info # whois.identitydigital.services
|
||||
.jobs NONE
|
||||
.mobi NONE
|
||||
.mobi RECURSIVE whois.nic.mobi # whois.identitydigital.services
|
||||
.museum whois.nic.museum
|
||||
.name whois.nic.name
|
||||
.post whois.nic.post
|
||||
.pro NONE
|
||||
.pro whois.nic.pro
|
||||
.tel whois.nic.tel
|
||||
.travel NONE
|
||||
.travel whois.nic.travel
|
||||
.xxx whois.nic.xxx
|
||||
|
||||
.ac whois.nic.ac
|
||||
@ -120,11 +120,11 @@
|
||||
.ci whois.nic.ci
|
||||
.ck NONE
|
||||
.cl whois.nic.cl
|
||||
.cm whois.nic.cm
|
||||
.cm whois.netcom.cm
|
||||
.edu.cn whois.edu.cn
|
||||
.cn whois.cnnic.cn
|
||||
.uk.co whois.uk.co
|
||||
.co whois.registry.co
|
||||
.co whois.nic.co
|
||||
.cr whois.nic.cr
|
||||
.cu WEB https://www.nic.cu/
|
||||
.cv whois.nic.cv
|
||||
@ -214,7 +214,7 @@
|
||||
.lv whois.nic.lv
|
||||
.ly whois.nic.ly
|
||||
.ma whois.registre.ma
|
||||
.mc whois.nic.mc
|
||||
.mc NONE # www.nic.mc
|
||||
.md whois.nic.md
|
||||
.me RECURSIVE whois.nic.me # whois.identitydigital.services
|
||||
#.mf
|
||||
@ -262,7 +262,7 @@
|
||||
.pm whois.nic.pm
|
||||
.pn WEB https://www.nic.pn/
|
||||
.pr RECURSIVE whois.nic.pr # whois.identitydigital.services
|
||||
.ps WEB https://www.pnina.ps/
|
||||
.ps whois.pnina.ps
|
||||
.pt whois.dns.pt
|
||||
.pw whois.nic.pw
|
||||
.py WEB https://www.nic.py/consultdompy.php
|
||||
@ -295,7 +295,7 @@
|
||||
.sm whois.nic.sm
|
||||
.sn whois.nic.sn
|
||||
.so whois.nic.so
|
||||
.sr whois.sr # https://isp.datasur.sr/
|
||||
.sr NONE # https://isp.datasur.sr/
|
||||
.ss whois.nic.ss
|
||||
.st whois.nic.st
|
||||
.msk.su whois.flexireg.net
|
||||
@ -316,7 +316,7 @@
|
||||
.tl whois.nic.tl
|
||||
.tm whois.nic.tm
|
||||
.tn whois.ati.tn
|
||||
.to whois.tonicregistry.to
|
||||
.to whois.tonic.to
|
||||
.tr whois.trabis.gov.tr
|
||||
.tt WEB https://www.nic.tt/cgi-bin/search.pl
|
||||
.tv RECURSIVE whois.nic.tv
|
||||
@ -328,11 +328,16 @@
|
||||
.ua whois.ua
|
||||
.ug whois.co.ug
|
||||
.ac.uk whois.nic.ac.uk
|
||||
.bl.uk NONE
|
||||
.british-library.uk NONE
|
||||
.gov.uk whois.gov.uk
|
||||
.mil.uk NONE
|
||||
.icnet.uk NONE
|
||||
.jet.uk NONE
|
||||
.mod.uk NONE
|
||||
.nhs.uk NONE
|
||||
.nls.uk NONE
|
||||
.parliament.uk NONE
|
||||
.police.uk NONE
|
||||
.uk whois.nic.uk
|
||||
#.um
|
||||
.fed.us whois.nic.gov
|
||||
@ -392,7 +397,7 @@
|
||||
.xn--j6w193g whois.hkirc.hk # Hong Kong
|
||||
.xn--kprw13d whois.twnic.net.tw # Taiwan, Simplified Chinese
|
||||
.xn--kpry57d whois.twnic.net.tw # Taiwan, Traditional Chinese
|
||||
.xn--l1acc whois.mn # Mongolia
|
||||
.xn--l1acc NONE # Mongolia
|
||||
.xn--lgbbat1ad8j whois.nic.dz # Algeria
|
||||
.xn--mgb9awbf whois.registry.om # Oman
|
||||
.xn--mgba3a4f16a whois.nic.ir # Iran
|
||||
@ -426,4 +431,4 @@
|
||||
.xn--xkc2dl3a5ee0h whois.nixiregistry.in # India, Tamil
|
||||
.xn--y9a3aq whois.amnic.net # Armenia
|
||||
.xn--yfro4i67o whois.zh.sgnic.sg # Singapore, Chinese
|
||||
.xn--ygbi2ammx NONE # Palestinian Territory
|
||||
.xn--ygbi2ammx whois.pnina.ps # Palestinian Territory
|
||||
|
||||
3
utils.c
3
utils.c
@ -16,7 +16,8 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
29
whois.c
29
whois.c
@ -6,14 +6,6 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
@ -49,6 +41,7 @@
|
||||
#endif
|
||||
|
||||
/* prototypes referenced in data.h */
|
||||
static void find_referral_server_6bone(char **, const char *);
|
||||
static void find_referral_server_apnic(char **, const char *);
|
||||
static void find_referral_server_arin(char **, const char *);
|
||||
static void find_referral_server_iana(char **, const char *);
|
||||
@ -804,6 +797,26 @@ int hide_line(int *hiding, const char *const line)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void find_referral_server_6bone(char **referral_server, const char *buf)
|
||||
{
|
||||
char nh[256], np[16], nq[1024];
|
||||
|
||||
if (*referral_server)
|
||||
return;
|
||||
|
||||
/* 6bone-style referral:
|
||||
* % referto: whois -h whois.arin.net -p 43 as 1
|
||||
*/
|
||||
if (!strneq(buf, "% referto:", 10))
|
||||
return;
|
||||
|
||||
if (sscanf(buf, REFERTO_FORMAT, nh, np, nq) == 3) {
|
||||
/* XXX we are ignoring the new query string */
|
||||
*referral_server = malloc(strlen(nh) + 1 + strlen(np) + 1);
|
||||
sprintf(*referral_server, "%s:%s", nh, np);
|
||||
}
|
||||
}
|
||||
|
||||
static void find_referral_server_apnic(char **referral_server, const char *buf)
|
||||
{
|
||||
/* Possible states of this FSM:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user