Compare commits

..

20 Commits

Author SHA1 Message Date
Marco d'Itri
64c3426493
Debian changelog for 5.6.5 2025-10-13 03:37:26 +02:00
Marco d'Itri
8624550e4a
make_version_h.pl: ignore the salsa CI tags
These version numbers do not appear in any archive but are used
internally by the Salsa CI pipeline.
2025-10-13 03:37:03 +02:00
Marco d'Itri
9f37990fed
make_version_h.pl: refactoring 2025-10-13 03:37:03 +02:00
Marco d'Itri
a2bbd90c40
Enable the standard Salsa CI pipeline 2025-10-13 03:29:13 +02:00
Marco d'Itri
f5d4f95d76
Remove some leftovers of 6bone referral handling
The rest was removed in commit 3364fe47f2bc408c1faa2e3209448320cb928423.
2025-10-13 03:18:08 +02:00
Steven Maddox
173808dd26
Update the second level .uk TLD servers
Removed these as although they're registered directly by Nominet
they're not second level domains:
- .bl.uk
- .british-library.uk
- .nls.uk

Removed this as it has just been a normal registered domain since 2014
when direct .uk registrations opened up:
- .icnet.uk

Removed these as whilst not directly registered by Nominet and they do
pre-date the 2014 direct .uk registrations, they're also not second
level domains:
- .jet.uk
- .police.uk

Added this which was missing:
- .mil.uk
2025-10-13 03:12:08 +02:00
Marco d'Itri
5967760f56
Remove 1 new gTLD which is no longer active 2025-10-13 02:56:37 +02:00
Marco d'Itri
45dde46468
Add some large KRNIC networks
These networks have more specific records only in the KRNIC whois
database.
2025-10-13 02:46:08 +02:00
Marco d'Itri
71c87b5e30
Update the .co TLD server
The old server does not exist anymore.
2025-10-12 02:06:39 +02:00
Marco d'Itri
e0d2550f93
Remove the .pro TLD server 2025-09-22 00:55:29 +02:00
Marco d'Itri
24363dc033
Debian changelog for 5.6.4 2025-08-02 01:14:39 +02:00
Marco d'Itri
3364fe47f2
Remove referral handling for whois.6bone.net
6bone has been shut down 20 years ago and this specific referrals format
does not appear to be used anywhere else.
2025-08-02 00:52:12 +02:00
Marco d'Itri
4171b62cf9
data.h: remove the reference to the obsolete whois.ra.net 2025-08-02 00:41:15 +02:00
Marco d'Itri
6a5dc397fd
Update the .to TLD server
The old server does not work anymore.
2025-08-02 00:33:30 +02:00
Marco d'Itri
64ace856ec
Update the .cm TLD server
New alias of the same server.
2025-07-22 00:23:02 +02:00
Marco d'Itri
39900059a5
Move the repository to salsa 2025-07-22 00:12:57 +02:00
Marco d'Itri
434e384f32
Debian changelog for 5.6.3 2025-07-17 05:29:32 +02:00
Marco d'Itri
87296ebc30
Add the .мон (.xn--l1acc, Mongolia) TLD server 2025-07-05 01:18:55 +02:00
Marco d'Itri
5ec6843896
Add the .sr TLD server
Closes GitHub #190
2025-07-05 01:18:52 +02:00
Marco d'Itri
6e74da05d1
mkpasswd: use readpassphrase(3) if available 2025-06-21 01:34:43 +02:00
12 changed files with 68 additions and 52 deletions

View File

@ -26,12 +26,17 @@
/* 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
@ -41,6 +46,7 @@
#if defined __APPLE__ && defined __MACH__
# define HAVE_GETOPT_LONG
# define HAVE_GETADDRINFO
# define HAVE_READPASSPHRASE
# define HAVE_BSDICRYPT
#endif

2
data.h
View File

@ -17,7 +17,6 @@ const char *ripe_servers[] = {
"whois.ripn.net",
"whois.register.si",
"whois.nic.ir",
"whois.ra.net",
NULL
};
@ -27,7 +26,6 @@ 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 },

29
debian/changelog vendored
View File

@ -1,8 +1,25 @@
whois (5.6.2~bpo12+1) bookworm-backports; urgency=medium
whois (5.6.5) unstable; urgency=medium
* Rebuild for bookworm-backports.
* 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> Sat, 21 Jun 2025 01:07:12 +0200
-- 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
@ -12,12 +29,6 @@ whois (5.6.2) unstable; urgency=medium
-- Marco d'Itri <md@linux.it> Fri, 06 Jun 2025 18:22:04 +0200
whois (5.6.1~bpo12+1) bookworm-backports; urgency=medium
* Rebuild for bookworm-backports.
-- Marco d'Itri <md@linux.it> Sat, 24 May 2025 18:42:54 +0200
whois (5.6.1) unstable; urgency=medium
* Added the .pg TLD server.

4
debian/control vendored
View File

@ -8,8 +8,8 @@ Build-Depends: debhelper-compat (= 13), gettext, pkgconf,
bash-completion,
libcrypt-dev,
libidn2-dev,
Vcs-Git: https://github.com/rfc1036/whois.git
Vcs-Browser: https://github.com/rfc1036/whois
Vcs-Git: https://salsa.debian.org/md/whois.git
Vcs-Browser: https://salsa.debian.org/md/whois
Package: whois
Architecture: any

6
debian/salsa-ci.yml vendored Normal file
View File

@ -0,0 +1,6 @@
---
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
variables:
SALSA_CI_IGNORED_BRANCHES: '^next$'

View File

@ -10,16 +10,20 @@
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

View File

@ -14,12 +14,20 @@ close($fh);
my ($ver) = $line =~ /^whois \s+ \( ( [^\)]+ ) \) \s+ \S+/x;
die "Version number not found in $changelog!\n" if not $ver;
$ver =~ s/ ( ~bpo\d+\+\d+ | \+b\d+ | ~deb\d+.* | ubuntu\d+ | build\d+ | \+dyson\d+ ) $//x;
$ver =~ s/ (
build\d+
| ubuntu\d+
| ~bpo\d+\+\d+
| ~deb\d+.*
| \+b\d+
| \+dyson\d+
| \+salsaci\+.+
) $//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!\n"
die "Invalid version number in $changelog: '$ver'!\n"
unless $ver =~ /^ \d+\.\d+ ( \.\d+ )? $/x;
# This is the version number used in the help messages.

View File

@ -47,6 +47,9 @@
#ifdef HAVE_GETTIMEOFDAY
#include <sys/time.h>
#endif
#ifdef HAVE_READPASSPHRASE
#include <readpassphrase.h>
#endif
/* Application-specific */
#include "version.h"
@ -387,11 +390,21 @@ 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
}
{

View File

@ -744,7 +744,6 @@ realtor
realty
recipes
red
redstone
redumbrella
rehab
reise

View File

@ -65,7 +65,7 @@
.museum whois.nic.museum
.name whois.nic.name
.post whois.nic.post
.pro whois.nic.pro
.pro NONE
.tel whois.nic.tel
.travel whois.nic.travel
.xxx whois.nic.xxx
@ -120,11 +120,11 @@
.ci whois.nic.ci
.ck NONE
.cl whois.nic.cl
.cm whois.netcom.cm
.cm whois.nic.cm
.edu.cn whois.edu.cn
.cn whois.cnnic.cn
.uk.co whois.uk.co
.co whois.nic.co
.co whois.registry.co
.cr whois.nic.cr
.cu WEB https://www.nic.cu/
.cv whois.nic.cv
@ -295,7 +295,7 @@
.sm whois.nic.sm
.sn whois.nic.sn
.so whois.nic.so
.sr NONE # https://isp.datasur.sr/
.sr whois.sr # 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.tonic.to
.to whois.tonicregistry.to
.tr whois.trabis.gov.tr
.tt WEB https://www.nic.tt/cgi-bin/search.pl
.tv RECURSIVE whois.nic.tv
@ -328,16 +328,11 @@
.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
.icnet.uk NONE
.jet.uk NONE
.mil.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
@ -397,7 +392,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 NONE # Mongolia
.xn--l1acc whois.mn # Mongolia
.xn--lgbbat1ad8j whois.nic.dz # Algeria
.xn--mgb9awbf whois.registry.om # Oman
.xn--mgba3a4f16a whois.nic.ir # Iran

21
whois.c
View File

@ -41,7 +41,6 @@
#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 *);
@ -797,26 +796,6 @@ 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:

View File

@ -1,9 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "utils.h"
/* 6bone referto: extension */
#define REFERTO_FORMAT "%% referto: whois -h %255s -p %15s %1021[^\n\r]"
#define HIDE_TO_THE_END -3
#define HIDE_DISABLED -2
#define HIDE_NOT_STARTED -1