Compare commits

...

214 Commits

Author SHA1 Message Date
barbieri1982
54d60d8eba
Update tld_serv_list with .com.uy URL
correct URL for .com.uy extension:
https://nic.com.uy/consulta-whois
2026-07-25 19:36:51 +02:00
Marco d'Itri
28b04d45c9
Reset the time every time a line is read
This makes whois handle better very slow connections and big responses.
2026-07-25 19:26:35 +02:00
Marco d'Itri
1024386831
Debian changelog for 5.6.6 2026-02-16 02:46:59 +01:00
Marco d'Itri
5fb7fabaf9
whois.c: add the complete GPL notice 2026-02-16 02:46:44 +01:00
Marco d'Itri
59a8760c31
Update the text of the GPL 2026-02-16 02:46:44 +01:00
Marco d'Itri
db1c3e143d
mkpasswd: rename bcrypt-a and gost-yescrypt
Let's use the same names listed in libxcrypt's crypt(5).

I highly doubt that anybody uses these names, so I am not adding
compatibility aliases.
2026-02-16 02:46:44 +01:00
Marco d'Itri
9d8f93b3c2
mkpasswd: support the Chinese algorithms 2026-02-16 02:46:44 +01:00
Marco d'Itri
15883e61b2
mkpasswd: move the "national" algorithms
Keep them around the end of the list because they should never be
selected automatically or preferred.
2026-02-16 02:46:44 +01:00
Marco d'Itri
beb5f19182
Remove the .travel TLD server 2026-02-16 02:46:44 +01:00
Marco d'Itri
a30a99e232
Remove the .mobi TLD server 2026-02-16 02:46:44 +01:00
Marco d'Itri
78480971a3
Remove the .info TLD server 2026-02-16 02:46:44 +01:00
Marco d'Itri
db3ea2fc1a
Remove the .فلسطين (.xn--ygbi2ammx) TLD server
The new server for .ps does not appear to handle queries for this domain
too.
2026-02-16 02:46:44 +01:00
Marco d'Itri
3319487629
Update the .ps TLD server
For months the old server has been rejecting queries with a RST.
2026-02-16 02:46:44 +01:00
Marco d'Itri
431ed02783
Add the .mc TLD server 2026-02-16 02:46:44 +01:00
Marco d'Itri
33235c0517
make_version_h.pl: remove everything after ~ or +
Closes: #1120638
2026-02-16 02:46:31 +01:00
Marco d'Itri
d268ab6f58
Remove 3 new gTLDs which are no longer active 2026-02-16 01:39:05 +01:00
Marco d'Itri
e6bf9a53a1
Remove out of date documentation 2026-02-16 01:38:31 +01:00
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
Marco d'Itri
b64054961d
Debian changelog for 5.6.2 2025-06-06 18:22:11 +02:00
Marco d'Itri
c16055893b
Remove 1 new gTLD which is no longer active 2025-06-06 18:17:41 +02:00
Marco d'Itri
be9c4cfa09
debian/control: Build-Depend on libcrypt-dev
Closes: #1106977
2025-06-02 00:17:24 +02:00
Marco d'Itri
cd6f08d336
debian/control: remove obsolete version constraints 2025-06-02 00:17:13 +02:00
Marco d'Itri
672575a1ae
Update the .in TLD server
And the other related IDN TLDs servers.

The old server is currently broken.
2025-06-02 00:09:16 +02:00
Marco d'Itri
e17d852900
Update the .post TLD server
Same IP, different name.
2025-06-02 00:03:17 +02:00
Marco d'Itri
e36fc3b773
Debian changelog for 5.6.1 2025-05-17 01:30:14 +02:00
Marco d'Itri
cc4b9c48e6
Correct the comment in servers_charset_list
This is about encodings, not character sets.
2025-05-17 01:28:31 +02:00
Marco d'Itri
d3b4365bd8
Add the encoding for whois.apnic.net 2025-05-17 01:28:31 +02:00
Marco d'Itri
aaf0baab25
Add the encoding for whois.afrinic.net 2025-05-17 01:20:16 +02:00
Marco d'Itri
9bb383ea03
Enable the UTF-8 encoding for whois.ripe.net 2025-05-17 01:06:47 +02:00
Marco d'Itri
f240aaf70e
Remove the charset for cwhois.cnnic.cn
Apparently this name has been retired, and is not used anymore by this
client.
2025-05-16 22:30:52 +02:00
Marco d'Itri
b0920c9748
Update the .mu TLD server
Same server, different name.
2025-05-06 01:22:23 +02:00
Marco d'Itri
980539ec23
Update the .gov TLD server
Same server, different name.
2025-05-06 01:21:15 +02:00
Marco d'Itri
d31347a39e
Update the .中國 (.xn--fiqz9s) TLD server
Same server, different name.
2025-05-06 01:21:06 +02:00
Marco d'Itri
f1d74f377f
Update the .中国 (.xn--fiqs8s) TLD server
Same server, different name.
2025-05-06 01:18:42 +02:00
Marco d'Itri
816f7adb8c
Remove the .jobs TLD server
Not accepting TCP connections, not in the IANA database anymore.
2025-05-06 01:15:16 +02:00
Marco d'Itri
f31128ed0d
Make sure to avoid trivial referral loops
In theory loops should not happen for domains, because recursion is
enabled only for the server names listed in server_referral_handlers[],
but better be safe than sorry.
2025-05-06 00:37:23 +02:00
Marco d'Itri
e30931d958
Use the last ReferralServer field found
Because we want to follow the referral for the most specific record
returned.

Closes GitHub #185.
2025-05-05 23:41:19 +02:00
Marco d'Itri
cf5fdb03e5
Add the .pg TLD server
Closes GitHub #184
2025-05-05 11:38:15 +02:00
Marco d'Itri
e7acab9014
Debian changelog for 5.6.0 2025-05-05 02:57:45 +02:00
Marco d'Itri
9b349a9c40
Add more missing SPDX license identifiers 2025-05-05 02:53:51 +02:00
Marco d'Itri
2753190967
Update the supported policy version 2025-05-05 02:53:06 +02:00
Marco d'Itri
b36474fc77
Refactoring 2025-05-05 02:38:03 +02:00
Marco d'Itri
e19e5d9f4f
Refactoring 2025-05-05 02:38:03 +02:00
Marco d'Itri
6ec5b9dd48
Implement following the APNIC pseudo-referrals
Closes GitHub #95
2025-05-05 02:38:03 +02:00
Marco d'Itri
8f5ef792d8
Refactoring 2025-05-05 02:38:03 +02:00
Marco d'Itri
b903b3679b
Refactoring 2025-05-05 02:38:02 +02:00
Marco d'Itri
5211801fe0
Refactoring 2025-05-05 02:38:02 +02:00
Marco d'Itri
c6f7ae9162
Fix some irrelevant memory leaks 2025-05-05 02:38:02 +02:00
Marco d'Itri
4a5357548d
Refactoring 2025-05-05 02:38:02 +02:00
Marco d'Itri
1a148ff7e4
Refactoring 2025-05-05 02:38:02 +02:00
Marco d'Itri
52c9e13eef
Refactoring 2025-05-05 02:38:02 +02:00
Marco d'Itri
b989176918
Accept bare hostnames for ARIN's ReferralServer field
Some networks have just a bare hostname with no protocol scheme
component.
2025-05-05 02:38:02 +02:00
Bjarni Ingi Gislason
cb1ce782a1
Clean up the man pages markup
Closes: #1036826
Closes: #1094208
2025-05-05 02:38:02 +02:00
Marco d'Itri
420fff7ee6
Do not mangle RADB queries with IDN processing 2025-05-04 00:41:16 +02:00
Marco d'Itri
4190279e0e
Add more hiding strings 2025-05-04 00:41:16 +02:00
Marco d'Itri
dc06d9972b
ip6_del_list: add 2410::/12 2025-05-04 00:41:16 +02:00
Marco d'Itri
fcc4958dc3
ip6_del_list: aggregate some entries 2025-05-04 00:41:16 +02:00
Marco d'Itri
f576fdcbff
Remove 7 new gTLDs which are no longer active 2025-05-04 00:41:16 +02:00
Marco d'Itri
8fc981f3c4
tld_serv_list: update some notes 2025-05-04 00:41:16 +02:00
Marco d'Itri
1a269128db
Add the .za TLD server 2025-05-04 00:41:16 +02:00
Marco d'Itri
49a99cbb2d
Add the .ad TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
f11eca950f
Update the .mobi TLD server
Closes GitHub #179
2025-05-04 00:41:15 +02:00
Marco d'Itri
88d18d6c32
Update the .info TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
1197daea75
Update the .vc TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
efd879dd7a
Update the .md TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
e7dcd8171b
Update the .lc TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
f802f15b26
Update the .gi TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
3f784bd664
Update the .ελ (.xn--qxam) TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
8d78134293
Update the .uy TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
efbcad34fa
Update the .pr TLD server
Closes GitHub #178
2025-05-04 00:41:15 +02:00
Marco d'Itri
4c93a190c0
Update the .pn TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
476c701c86
Update the .gw TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
0fa0351141
Update the .gr TLD server 2025-05-04 00:41:15 +02:00
Marco d'Itri
157ef53e06
Update the .gq TLD server
Port 43 always returns an unknown domain error after the demise of
Freenom.
2025-05-04 00:41:15 +02:00
Marco d'Itri
8280d56f16
Update the .bz TLD server
Closes GitHub #179
2025-05-04 00:41:15 +02:00
Marco d'Itri
2f1da4ff84
Update the .ao TLD server 2025-05-03 18:17:45 +02:00
Marco d'Itri
23f2636f88
Update the .გე (.xn--node, Georgia) TLD server
Port 43 does not work anymore.
2025-05-03 18:16:41 +02:00
Marco d'Itri
2c20d77516 Always check the values returned by fdopen(3) 2024-06-18 01:00:57 +02:00
Marco d'Itri
dc588f10ee Debian changelog for 5.5.23 2024-05-12 10:59:59 +02:00
Marco d'Itri
02ca11b4c7 Update the .新加坡 (.xn--yfro4i67o, Singapore) TLD server 2024-05-04 03:12:29 +02:00
Marco d'Itri
bc20dcc7e2 Update the .சிங்கப்பூர் (.xn--clchc0ea0b2g2a9gcd, Singapore) TLD server 2024-05-04 03:12:25 +02:00
Marco d'Itri
7e46b8cd50 Update the .sc TLD server 2024-05-04 03:06:27 +02:00
Marco d'Itri
481b0abe71 Debian changelog for 5.5.22 2024-04-01 20:15:42 +02:00
Marco d'Itri
918755c7c2 Prevent a segmentation fault with --no-recursion 2024-04-01 20:13:12 +02:00
Marco d'Itri
bca6e45ecb Update the .vi TLD server 2024-04-01 20:12:55 +02:00
Marco d'Itri
8fd06d0d8e Update the .bm TLD server
New registrar.
2024-04-01 20:12:31 +02:00
Marco d'Itri
00ca02f758 Remove 2 new gTLDs which are no longer active 2024-04-01 20:07:59 +02:00
Marco d'Itri
ef10478197 Debian changelog for 5.5.21 2024-02-24 19:16:34 +01:00
Marco d'Itri
0e72a60a22 Depend on pkgconf instead of pkg-config 2024-02-24 17:24:29 +01:00
Marco d'Itri
dfd5204451 Update the .sd TLD server
Same server, different domain.
2024-02-24 17:19:41 +01:00
Marco d'Itri
d0b1a41bb7 Update the .cv TLD server 2024-02-24 17:12:10 +01:00
Marco d'Itri
8a3bbc2473 Suppress the "unused parameter" warning in get_random_bytes() 2024-02-24 17:08:17 +01:00
Marco d'Itri
4754721796 Remove 8 new gTLDs which are no longer active 2024-02-24 17:04:16 +01:00
ashamedbit
254d87165e Fix memory leak in whois.c 2024-02-24 17:04:05 +01:00
Sevan Janiyan
9cbbbb9c34 Use __attribute__((malloc(free))) only with GCC >= 11 2023-12-10 12:13:25 +01:00
Marco d'Itri
8079ab6f52 Remove the copyright years from the sources files 2023-12-10 12:08:46 +01:00
Mike Frysinger
63f2a9abde Switch the documentation URLs to https 2023-11-16 22:47:16 +01:00
Marco d'Itri
042c9acf80 Debian changelog for 5.5.20 2023-11-10 15:26:16 +01:00
Marco d'Itri
3ab4353e9e Add a Github workflow to automatically make releases 2023-11-10 15:26:00 +01:00
Marco d'Itri
977d6242d2 Enable getopt_long(3) support on Solaris 2023-11-09 22:04:21 +01:00
Marco d'Itri
edbeda1085 Remove 6 new gTLDs which are no longer active 2023-11-09 22:02:35 +01:00
Marco d'Itri
fc08d2df87 Add the .gn TLD server 2023-11-09 22:01:19 +01:00
Marco d'Itri
bd1c31c597 Use __attribute__((unused)) 2023-11-08 11:38:27 +01:00
Marco d'Itri
e2b38d570b Do not use __attribute__((malloc(free))) with Clang
This extension is not implemented by Clang.
2023-11-08 11:38:27 +01:00
Marco d'Itri
18145364ab Refactoring
Merge the as and as32 data structures, since it is highly unlikely
that using short ints will save any memory.
2023-11-08 11:38:27 +01:00
Marco d'Itri
b433437563 Debian changelog for 5.5.19 2023-10-08 22:58:49 +02:00
Jakub Bogusz
e371b0c101 Update the pl translation 2023-10-08 22:58:27 +02:00
Marco d'Itri
04c8952bee Update the charset for whois.jprs.jp
whois.jprs.jp switched to UTF-8 on January 18, 2015:
https://jprs.jp/whatsnew/notice/2014/20140319-whois.html .
2023-10-08 22:58:27 +02:00
Marco d'Itri
114b9d2fd9 mkpasswd: prevent using two unitialized variables 2023-10-08 22:58:27 +02:00
Marco d'Itri
f01f8d405b Annotate do_nofail() with malloc(free) and returns_nonnull
Or else the compiler will be unable to understand that the NOFAIL()
macro never returns a NULL pointer.
2023-10-08 22:30:54 +02:00
Marco d'Itri
23302dbd1d Do not add again the /e argument to Japanese queries
The /e argument should not be added if it has already been provided by
the user.

Closes: #1050171
2023-10-08 13:07:21 +02:00
Marco d'Itri
adb4af2ddc Refactor the code which detects the ASN names 2023-10-08 13:06:32 +02:00
Marco d'Itri
c0d6e929d9 config.h: fix a missing "if defined" 2023-10-08 13:05:49 +02:00
Marco d'Itri
bedd34e3fe Refactoring 2023-10-08 13:05:49 +02:00
Marco d'Itri
96173f3630 Remove support for the as32 dot notation
It has been deprecated long ago and is not used anymore.
2023-10-08 13:05:49 +02:00
Marco d'Itri
27549ba6cb Remove 3 new gTLDs which are no longer active 2023-10-08 13:05:49 +02:00
Marco d'Itri
8c1db1d4e7 Add the .বাংলা (.xn--54b7fta0cc, Bangladesh) TLD URL 2023-10-08 13:05:49 +02:00
Marco d'Itri
5840287080 Add the .ye TLD server 2023-10-08 13:05:49 +02:00
Marco d'Itri
2b45a9e386 Update the .dk TLD server
Same server, different domain.
2023-10-08 13:05:49 +02:00
Marco d'Itri
a0351beb75 Update the .ml TLD server
The TLD is now managed by a different operator and the old whois server
does not work anymore.
2023-10-08 13:00:14 +02:00
Marco d'Itri
793cf10dfd Update the .uy TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
56c7cc3742 Update the .sv TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
1e3f015bc1 Update the .pn TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
80a0c68f53 Update the .pa TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
eaaa8c6958 Update the .澳門 (.xn--mix891f, Macao) TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
2918d7aae2 Update the .mo TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
2396a5527f Update the .الاردن (.xn--mgbayh7gpa, Jordan) TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
c5d9f92f23 Update the .jo TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
693dd3ac90 Update the .gt TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
a8f98ab9b8 Update the .es TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
992ae08c0a Update the .bb TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
1d0da84a53 Update the .ba TLD URL 2023-10-08 13:00:14 +02:00
Marco d'Itri
da2073bee7 tld_serv_list: upgrade the TLD URLs to HTTPS whenever possible 2023-10-08 13:00:14 +02:00
Marco d'Itri
0073f66601 tld_serv_list: update a comment 2023-10-08 13:00:14 +02:00
Marco d'Itri
13e2720740 Debian changelog for 5.5.18 2023-07-22 17:57:07 +02:00
Marco d'Itri
9a3a2ddb16 debian/control: update the policy version 2023-07-22 17:43:05 +02:00
Marco d'Itri
a0a4e9d7a6 Remove 12 new gTLDs which are no longer active 2023-07-22 17:38:06 +02:00
Bjarni Ingi Gislason
d07771c3df Improve the man page source
Closes: #1040613
2023-07-22 17:38:06 +02:00
Petr Menšík
6761f80395 Add SPDX license identifiers to code files
Change manual pages word to recognize it by licensecheck tool.
2023-07-22 17:38:06 +02:00
Marco d'Itri
881e1d41ec Update the .ga TLD server
Closes: #1037288
2023-07-22 17:36:45 +02:00
Robert Scheck
1e30e42673 Add the -su NIC handles server 2023-07-22 17:35:29 +02:00
Marco d'Itri
c7cec7b1a8 Update the documentation URL for .za 2023-07-22 17:35:29 +02:00
Marco d'Itri
550785c5b6 Add the .edu.za SLD server 2023-07-22 17:35:26 +02:00
Marco d'Itri
139a7a0c14 Update the .alt.za SLD server 2023-07-22 17:34:57 +02:00
Robert Scheck
cf1ae2a001 Add the -ru NIC handles server 2023-05-13 20:40:01 +02:00
Marco d'Itri
d39afe6e42 Update ip_del_recovered.h 2023-05-13 20:29:07 +02:00
Marco d'Itri
113b4cb068 make_ip_del_recovered.pl: skip redundant entries
Makes it ignore the entries for recovered networks which are already
covered by entries in ip_del_list.
2023-05-13 20:27:52 +02:00
Marco d'Itri
c4b9cf8c23 make_ip_del_recovered.pl: refactoring 2023-05-13 20:27:52 +02:00
Marco d'Itri
36720ed8e6 Remove the delegation of 43.0.0.0/8 to JPNIC
All networks up to 43.221.255.255 are allocated to asian cloud operators
or CDNs and regitered in the APINC database.
The two allocations left are mirrored in the APINC database anyway, so
there is no point anymore in querying the JPNIC database for 43/8.
2023-05-13 20:27:52 +02:00
Marco d'Itri
bac7108b01 Debian changelog for 5.5.17 2023-05-03 14:26:39 +02:00
Robert Scheck
08f3a9fefd Add the .cd TLD server 2023-05-03 14:25:50 +02:00
Robert Scheck
9c0d7bffb5 Update the -kg NIC handles server name 2023-05-03 14:25:47 +02:00
Marco d'Itri
61b1a9620f Remove 2 new gTLDs which are no longer active 2023-05-03 14:09:03 +02:00
Marco d'Itri
41b34352ad Debian changelog for 5.5.16 2023-02-28 00:59:54 +01:00
Marco d'Itri
1d0763aeb4 Update the .tr TLD server
.tr is now managed by a new organization.
2023-02-28 00:57:23 +01:00
Marco d'Itri
4203489400 Remove support for -metu NIC handles
Queries for NIC handles are not supported by the new .tr registry.
2023-02-28 00:57:12 +01:00
Marco d'Itri
33ec512561 Delete the generated nic_handles.h 2023-02-28 00:51:41 +01:00
Marco d'Itri
73dd92c69b Build-Depend on bash-completion
To support running "pkg-config bash-completion".
2023-02-28 00:40:38 +01:00
Ville Skyttä
045ffaaafc
Add bash completions 2023-02-28 00:33:41 +01:00
Marco d'Itri
d83bf0dcee Debian changelog for 5.5.15 2022-12-28 20:46:36 +01:00
Marco d'Itri
fe840430b5 Enable Large Files Support 2022-12-28 20:44:03 +01:00
Marco d'Itri
ab184c22ca Properly truncate some strings 2022-12-28 20:43:45 +01:00
Marco d'Itri
c58b75e0a9 Fix some signedness-related warnings 2022-12-28 20:40:13 +01:00
Marco d'Itri
96f8dd873b Add the charset for the servers of British government SLDs 2022-12-28 20:38:26 +01:00
Marco d'Itri
d905700652 Add the .ac.uk and .gov.uk TLD servers
As requested by the registrar (JISC).
2022-12-28 20:36:33 +01:00
Marco d'Itri
2ccecac906 Add the .llyw.cymru, .gov.scot and .gov.wales TLD servers 2022-12-28 20:35:31 +01:00
Marco d'Itri
fd61dfe265 Update the list of new gTLDs
Four IDN generic TLDs assigned in October 2013 were missing from the
list because of a bug of the list maintenance program.
2022-12-28 20:24:58 +01:00
Marco d'Itri
23b380813c Remove 4 new gTLDs which are no longer active 2022-12-28 20:24:43 +01:00
Marco d'Itri
a0b231029c Update the .bd TLD server
Notwithstanding the domain name, the old web site was actually the
one of a registrar.
2022-11-26 02:56:09 +01:00
Marco d'Itri
d0ce5cd9e5 Refactoring 2022-11-22 04:24:40 +01:00
Marco d'Itri
9c9a2591b8 Enable recursion for whois.nic.tv
The output is similar to the one from AFILIAS, so we can reuse the same
code.
2022-11-22 04:17:47 +01:00
Lumito
c5e837a0b1
Update the .tv TLD server 2022-11-22 00:56:00 +01:00
Marco d'Itri
c7e7336da6 Update the .nz TLD server
Same server, different domain.
2022-11-17 23:53:04 +01:00
Temuri Doghonadze
b36c398f10 Add the ka translation 2022-11-01 18:17:50 +01:00
Lauri Nurmi
e20f7df794 Update the fi translation 2022-11-01 18:14:06 +01:00
Ørjan Malde
edc625d0e1
config.h: add support for midipix
Signed-off-by: Ørjan Malde <red@foxi.me>

Signed-off-by: Ørjan Malde <red@foxi.me>
2022-11-01 17:54:18 +01:00
Marco d'Itri
ab10466cf2 Debian changelog for 5.5.14 2022-10-16 22:16:42 +02:00
Marco d'Itri
8489269175 Switch to debhelper compatibility level 13 2022-10-16 22:16:16 +02:00
Fabrice Fontaine
6f8c9f5d85 config.h: fix uclibc builds without NLS
uclibc defines __GLIBC__ but doesn't always have NLS support resulting
in the following build failure:

In file included from whois.h:1,
                 from whois.c:44:
utils.h:38:11: fatal error: libintl.h: No such file or directory
   38 | # include <libintl.h>
      |           ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/a9d1c9076345d94ac2f9a4008b8563c5a34f655e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-10-16 22:09:36 +02:00
Marco d'Itri
d80e41cc9e Rename whois.register.si in the list of RIPE-like servers 2022-10-16 22:00:13 +02:00
Marco d'Itri
d4c27f6dae Remove whois.nic.fr from the list of RIPE-like servers
Closes: #1021110
2022-10-16 22:00:08 +02:00
Cagatay Bal
1b6964cb28 Update the charset for whois.nic.tr
Since 2022-09-14 the .tr TLD has been managed by a different registry
and changed the output encoding.
2022-10-16 22:00:08 +02:00
Marco d'Itri
6171640958 Update the list of new gTLDs 2022-10-16 22:00:08 +02:00
Marco d'Itri
a8647997b8 Update the .py TLD server 2022-09-12 00:48:26 +02:00
Marco d'Itri
dde969c3bf Remove the .gu TLD server 2022-09-12 00:40:31 +02:00
Marco d'Itri
86aa2268f1 Update the .mt TLD server
The web whois service is filtered as well nowadays.
2022-09-12 00:14:39 +02:00
Marco d'Itri
9a5c7051b9 Add the .bf TLD server 2022-09-11 23:55:45 +02:00
Marco d'Itri
2a5108fa07 Update the .pk TLD server 2022-09-11 23:43:11 +02:00
Marco d'Itri
988e752fc9 Update the .fj TLD server 2022-09-11 23:38:39 +02:00
Marco d'Itri
ed64bfb241 Update the .dm TLD server
Same server, different domain.
2022-09-11 23:37:08 +02:00
Marco d'Itri
1b89adf90b Debian changelog for 5.5.13 2022-04-08 01:09:39 +02:00
Marco d'Itri
563a26e287 Switch to debhelper compatibility level 12 2022-04-08 01:08:48 +02:00
Oğuz Ersen
7f1183c5ea Add the tr translation 2022-04-08 01:08:48 +02:00
Marco d'Itri
27732500b1 Update the list of new gTLDs 2022-04-08 00:14:57 +02:00
榆木
f3192340aa New TLD servers: sd 2022-04-07 23:50:25 +02:00
48 changed files with 1886 additions and 898 deletions

18
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Publish a Github release
on:
push:
branches:
- master
tags:
- "v*.*"
jobs:
release:
runs-on: debian-latest
permissions:
contents: write
steps:
- name: Release
uses: softprops/action-gh-release@v1

View File

@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -304,8 +304,7 @@ 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
with this program; if not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@ -329,8 +328,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 Ty Coon>, 1 April 1989
Ty Coon, President of Vice
<signature of Moe Ghoul>, 1 April 1989
Moe Ghoul, 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

View File

@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
prefix = /usr
ifdef DESTDIR
@ -71,6 +72,8 @@ endif
CPPFLAGS += $(DEFS) $(INCLUDES)
BASHCOMPDIR ?= $(shell $(PKG_CONFIG) --variable=completionsdir bash-completion 2>/dev/null || echo /etc/bash_completion.d)
##############################################################################
all: Makefile.depend whois mkpasswd pos
@ -91,9 +94,6 @@ version.h: debian/changelog make_version_h.pl
as_del.h: as_del_list make_as_del.pl
$(PERL) make_as_del.pl < $< > $@
as32_del.h: as32_del_list make_as32_del.pl
$(PERL) make_as32_del.pl < $< > $@
ip_del.h: ip_del_list make_ip_del.pl
$(PERL) make_ip_del.pl < $< > $@
@ -121,7 +121,7 @@ afl-run:
nice afl-fuzz -i ../afl_in -o ../afl_out -- ./whois
##############################################################################
install: install-whois install-mkpasswd install-pos
install: install-whois install-mkpasswd install-pos install-bashcomp
install-whois: whois
$(INSTALL) -d $(BASEDIR)$(prefix)/bin/
@ -140,12 +140,18 @@ install-mkpasswd: mkpasswd
install-pos:
cd po && $(MAKE) install
install-bashcomp:
$(INSTALL) -d $(BASEDIR)$(BASHCOMPDIR)
$(INSTALL) -m 0644 mkpasswd.bash $(BASEDIR)$(BASHCOMPDIR)/mkpasswd
$(INSTALL) -m 0644 whois.bash $(BASEDIR)$(BASHCOMPDIR)/whois
distclean: clean
rm -f version.h po/whois.pot
clean:
rm -f Makefile.depend as_del.h as32_del.h ip_del.h ip6_del.h \
new_gtlds.h tld_serv.h servers_charset.h *.o whois mkpasswd
rm -f Makefile.depend as_del.h ip_del.h ip6_del.h \
nic_handles.h new_gtlds.h tld_serv.h servers_charset.h \
*.o whois mkpasswd
rm -f po/*.mo
pos:

11
README
View File

@ -13,14 +13,13 @@ program, which can be used to encrypt a password with crypt(3).
The canonical distribution point for releases of the program is
http://ftp.debian.org/debian/pool/main/w/whois/ .
https://ftp.debian.org/debian/pool/main/w/whois/ .
Useful information sources:
- http://www.ripe.net/ripe/docs/current-ripe-documents/ripe-database-documents
- http://www.iana.org/domains/root/db/
- http://www.icann.org/en/resources/idn/fast-track/string-evaluation-completion
- http://www.aftld.org/
- https://www.ripe.net/ripe/docs/current-ripe-documents/ripe-database-documents
- https://www.iana.org/domains/root/db/
- https://www.icann.org/en/resources/idn/fast-track/string-evaluation-completion
- https://www.aftld.org/
Marco d'Itri <md@linux.it>

View File

@ -1,19 +0,0 @@
# http://www.iana.org/assignments/as-numbers
# actually I listed here also the unallocated space reserved for each RIR
131077 131086 whois.nic.ad.jp
131092 131101 whois.nic.or.kr
131152 131161 whois.nic.ad.jp
131791 131890 whois.nic.or.kr
131893 131992 whois.nic.ad.jp
2.0 2.65535 apnic
3.0 3.65535 ripe
4.0 4.65535 lacnic
5.0 5.65535 afrinic
6.0 6.65535 arin
# private ASN block
4200000000 4294967294 ripe

View File

@ -1,4 +1,4 @@
# http://www.iana.org/assignments/as-numbers
# https://www.iana.org/assignments/as-numbers
248 251 ripe
306 371 whois.nic.mil
@ -95,3 +95,19 @@
# documentation and private ASN block
64496 65534 ripe
131077 131086 whois.nic.ad.jp
131092 131101 whois.nic.or.kr
131152 131161 whois.nic.ad.jp
131791 131890 whois.nic.or.kr
131893 131992 whois.nic.ad.jp
# actually I listed here also the unallocated space reserved for each RIR
2.0 2.65535 apnic
3.0 3.65535 ripe
4.0 4.65535 lacnic
5.0 5.65535 afrinic
6.0 6.65535 arin
# private ASN block
4200000000 4294967294 ripe

View File

@ -1,4 +1,5 @@
/* Configurable features */
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* Always hide legal disclaimers */
#undef ALWAYS_HIDE_DISCL
@ -13,11 +14,11 @@
/* autoconf in cpp macros */
#if defined __NetBSD__ || __OpenBSD__
#if defined __NetBSD__ || defined __OpenBSD__
# include <sys/param.h>
#endif
#ifdef __GLIBC__
#if defined __GLIBC__ && !defined __UCLIBC__
# define ENABLE_NLS
#endif
@ -25,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
@ -40,9 +46,16 @@
#if defined __APPLE__ && defined __MACH__
# define HAVE_GETOPT_LONG
# define HAVE_GETADDRINFO
# define HAVE_READPASSPHRASE
# define HAVE_BSDICRYPT
#endif
#if defined __midipix__
# define HAVE_GETOPT_LONG
# define HAVE_GETADDRINFO
# define HAVE_SHA_CRYPT
#endif
#if defined __GLIBC__
# define HAVE_GETOPT_LONG
# if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
@ -65,6 +78,7 @@
/* Unknown versions of Solaris */
#if defined __SVR4 && defined __sun
# define HAVE_GETOPT_LONG
# define HAVE_SHA_CRYPT
# define HAVE_CRYPT_H
# define HAVE_SOLARIS_CRYPT_GENSALT
@ -103,7 +117,7 @@
#endif
/* or else getentropy(2) on Linux */
#if defined __GLIBC__ && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 25
#if defined __GLIBC__ && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 25 || defined __midipix__
# define HAVE_GETENTROPY
#endif

39
data.h
View File

@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* RIPE-like servers.
* All of them do not understand -V2.0Md with the exception of RA and RIPN.
@ -9,17 +11,29 @@ const char *ripe_servers[] = {
"whois.apnic.net",
"whois.afrinic.net",
"rr.arin.net", /* does not accept the old syntax */
"whois.nic.fr",
"rr.level3.net", /* 3.0.0a13 */
"rr.ntt.net",
"whois.tcinet.ru",
"whois.ripn.net",
"whois.arnes.si",
"whois.register.si",
"whois.nic.ir",
"whois.ra.net",
NULL
};
struct server_referral_handler {
const char *name;
void (*handler)(char **referral_server, const char *buf);
};
const struct server_referral_handler server_referral_handlers[] = {
{ "whois.apnic.net", find_referral_server_apnic },
{ "whois.arin.net", find_referral_server_arin },
{ "whois.iana.org", find_referral_server_iana },
{ "\x04", find_referral_server_verisign },
{ "\x08", find_referral_server_recursive },
{ NULL, NULL }
};
const char *hide_strings[] = {
"The data in Networksolutions.com's WHOIS database", NULL,
/* Some registrars like .wang copied the first paragraph of this
@ -34,7 +48,7 @@ const char *hide_strings[] = {
"Please register your domains at; http://www.", NULL, /* key-systems.net */
"%% NOTICE: Access to this information is provided", NULL, /* bookmyname.com */
"NOTICE: Access to the domain name's information", NULL, /* CORE */
"The Data in MarkMonitor.com's", NULL, /* MarkMonitor */
"The data in MarkMonitors WHOIS", NULL, /* MarkMonitor */
"Corporation Service Company(c) (CSC) The Trusted Partner", "Register your domain name at", /* CSC */
"The data in Networksolutions.com's", NULL, /* Networksolutions */
"# Welcome to the OVH WHOIS Server", "", /* ovh */
@ -73,8 +87,10 @@ const char *hide_strings[] = {
"Access to .IN WHOIS information", NULL, /* in */
"access to .in whois information", NULL, /* in registar */
"% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal", NULL, /* sx */
"Terms of Use: Access to WHOIS information", NULL, /* vc */
"The Service is provided so that you may look", "We may discontinue",/*vu*/
"NeuStar, Inc., the Registry Administrator for .US", NULL,
"; This data is provided ", NULL, /* whois.1api.net */
NULL, NULL
};
@ -119,8 +135,8 @@ const struct ip6_del ip6_assign[] = {
};
struct as_del {
const unsigned short first;
const unsigned short last;
const unsigned long first;
const unsigned long last;
const char *serv;
};
@ -129,17 +145,6 @@ const struct as_del as_assign[] = {
{ 0, 0, NULL }
};
struct as32_del {
const unsigned long first;
const unsigned long last;
const char *serv;
};
const struct as32_del as32_assign[] = {
#include "as32_del.h"
{ 0, 0, NULL }
};
const char *new_gtlds[] = {
#include "new_gtlds.h"
NULL

193
debian/changelog vendored
View File

@ -1,3 +1,196 @@
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.
* Removed 1 new gTLDs which is no longer active.
* Build-Depend on libcrypt-dev. (Closes: #1106977)
-- Marco d'Itri <md@linux.it> Fri, 06 Jun 2025 18:22:04 +0200
whois (5.6.1) unstable; urgency=medium
* Added the .pg TLD server.
* Updated the .gov, .mu, .中国 (.xn--fiqs8s) and .中國 (.xn--fiqz9s)
TLD servers.
* Removed the .jobs TLD server.
* Added the encodings for whois.afrinic.net and whois.apnic.net.
* Enabled the UTF-8 encoding for whois.ripe.net.
* Use the last ReferralServer returned by the ARIN server instead of
the first, because we want to follow the referral for the most
specific record returned.
* Make sure to avoid trivial referral loops.
-- Marco d'Itri <md@linux.it> Sat, 17 May 2025 01:30:06 +0200
whois (5.6.0) unstable; urgency=medium
* Fixed the mangling of RADB queries with commands.
* Implemented the parsing of more variants of ARIN's ReferralServer
field.
* Implemented following the APNIC pseudo-referrals.
* Added the .ad and .za TLD servers.
* Updated the .ao, .bz, .gi, .gq, .gr, .gw, .lc, .md, .pn, .pr, .uy, .vc,
.info, .mobi, .ελ (.xn--qxam, Greece) and .გე (.xn--node, Georgia) TLD
servers.
* Added 2410::/12.
* Removed 7 new gTLDs which are no longer active.
* Cleaned up the markup of the man pages, courtesy of Bjarni Ingi
Gislason. (Closes: #1036826, #1094208)
-- Marco d'Itri <md@linux.it> Mon, 05 May 2025 02:57:37 +0200
whois (5.5.23) unstable; urgency=medium
* Updated the .sc, .新加坡 (.xn--yfro4i67o, Singapore) and .சிங்கப்பூர்
(.xn--clchc0ea0b2g2a9gcd, Singapore) TLD servers.
-- Marco d'Itri <md@linux.it> Sat, 04 May 2024 03:13:22 +0200
whois (5.5.22) unstable; urgency=medium
* Fixed a segmentation fault with --no-recursion.
* Updated the .bm and .vi TLD servers.
* Removed 4 new gTLDs which are no longer active.
-- Marco d'Itri <md@linux.it> Mon, 01 Apr 2024 20:14:41 +0200
whois (5.5.21) unstable; urgency=medium
* Updated the .cv and .sd TLD servers.
* Remove 4 new gTLDs which are no longer active.
-- Marco d'Itri <md@linux.it> Sat, 24 Feb 2024 17:22:22 +0100
whois (5.5.20) unstable; urgency=medium
* Added the .gn TLD server.
* Removed 6 new gTLDs which are no longer active.
* Enabled getopt_long(3) support on Solaris.
-- Marco d'Itri <md@linux.it> Fri, 10 Nov 2023 15:26:02 +0100
whois (5.5.19) unstable; urgency=medium
* Fixed english support for Japanese queries to not add again the /e
argument if it had already been provided by the user. (Closes: #1050171)
* Added the .ye and .বাংলা (.xn--54b7fta0cc, Bangladesh) TLD servers.
* Updated the .ba, .bb, .dk, .es, .gt, .jo, .ml, .mo, .pa, .pn, .sv,
.uy, .ﺍﻻﺭﺪﻧ (.xn--mgbayh7gpa, Jordan) and .澳門 (.xn--mix891f, Macao)
TLD servers.
* Upgraded the TLD URLs to HTTPS whenever possible.
* Updated the charset for whois.jprs.jp.
* Removed 3 new gTLDs which are no longer active.
* Removed support for the obsolete as32 dot notation.
-- Marco d'Itri <md@linux.it> Sun, 08 Oct 2023 22:58:33 +0200
whois (5.5.18) unstable; urgency=medium
[ Marco d'Itri ]
* Updated the .ga TLD server. (Closes: #1037288)
* Added new recovered IPv4 allocations.
* Removed the delegation of 43.0.0.0/8 to JPNIC.
* Removed 12 new gTLDs which are no longer active.
* Improved the man page source, courtesy of Bjarni Ingi Gislason.
(Closes: #1040613)
[ Robert Scheck ]
* Added the .edu.za SLD server.
* Updated the .alt.za SLD server.
* Added the -ru and -su NIC handles servers.
-- Marco d'Itri <md@linux.it> Sat, 22 Jul 2023 17:56:56 +0200
whois (5.5.17) unstable; urgency=medium
[ Robert Scheck ]
* Added the .cd TLD server.
* Updated the -kg NIC handles server name.
[ Marco d'Itri ]
* Removed 2 new gTLDs which are no longer active.
-- Marco d'Itri <md@linux.it> Wed, 03 May 2023 14:24:37 +0200
whois (5.5.16) unstable; urgency=medium
* Add bash completion support, courtesy of Ville Skyttä.
* Updated the .tr TLD server.
* Removed support for -metu NIC handles.
-- Marco d'Itri <md@linux.it> Tue, 28 Feb 2023 00:58:22 +0100
whois (5.5.15) unstable; urgency=medium
* Updated the .bd, .nz and .tv TLD servers.
* Added the .llyw.cymru, .gov.scot and .gov.wales SLD servers.
* Updated the .ac.uk and .gov.uk SLD servers.
* Recursion has been enabled for whois.nic.tv.
* Updated the list of new gTLDs with four generic TLDs assigned in
October 2013 which were missing due to a bug.
* Removed 4 new gTLDs which are no longer active.
* Added the Georgian translation, contributed by Temuri Doghonadze.
* Updated the Finnish translation, contributed by Lauri Nurmi.
-- Marco d'Itri <md@linux.it> Wed, 28 Dec 2022 20:44:11 +0100
whois (5.5.14) unstable; urgency=medium
* Added the .bf and .sd TLD servers.
* Removed the .gu TLD server.
* Updated the .dm, .fj, .mt and .pk TLD servers.
* Updated the charset for whois.nic.tr.
* Updated the list of new gTLDs.
* Removed whois.nic.fr from the list of RIPE-like servers, because it
is not one anymore. (Closes: #1021110)
* Renamed whois.arnes.si to whois.register.si in the list of RIPE-like
servers.
* Added the hiding string for whois.auda.org.au.
* Fixed uclibc builds, because uclibc does not have NLS support.
-- Marco d'Itri <md@linux.it> Sun, 16 Oct 2022 22:16:34 +0200
whois (5.5.13) unstable; urgency=medium
* Added the .sd TLD server.
* Updated the list of new gTLDs.
* Added the Turkish translation, contributed by Oğuz Ersen.
-- Marco d'Itri <md@linux.it> Fri, 08 Apr 2022 01:08:55 +0200
whois (5.5.12) unstable; urgency=medium
* Updated the .pro TLD server, which was totally broken.

1
debian/compat vendored
View File

@ -1 +0,0 @@
10

11
debian/control vendored
View File

@ -2,11 +2,14 @@ Source: whois
Section: net
Priority: standard
Maintainer: Marco d'Itri <md@linux.it>
Standards-Version: 4.6.0.1
Standards-Version: 4.7.2.0
Rules-Requires-Root: no
Build-Depends: debhelper (>= 10), gettext, pkg-config, libidn2-dev (>= 2.0.3)
Vcs-Git: https://github.com/rfc1036/whois.git
Vcs-Browser: https://github.com/rfc1036/whois
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
Package: whois
Architecture: any

2
debian/rules vendored
View File

@ -1,6 +1,6 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_BUILD_MAINT_OPTIONS=hardening=+all future=+lfs
%:
dh $@

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

@ -1,4 +1,4 @@
# http://www.iana.org/assignments/ipv6-unicast-address-assignments
# https://www.iana.org/assignments/ipv6-unicast-address-assignments
# The parser is very simple-minded and wants the two first components of
# addresses. It does not deal with networks == 0 or > 24 bit.
@ -35,13 +35,12 @@
2003:0000::/18 ripe
2400:0000::/20 whois.nic.or.kr
2400:0000::/12 apnic
2400:0000::/11 apnic
2600:0000::/12 arin
2610:0000::/23 arin
2620:0000::/23 arin
2630:0000::/12 arin
2800:0000::/12 lacnic
2A00:0000::/12 ripe
2A10:0000::/12 ripe
2A00:0000::/11 ripe
2C00:0000::/12 afrinic

View File

@ -4,24 +4,26 @@
# unless they are very big and contains multiple assignments to different
# customers documented in the whois database.
#
# http://www.iana.org/assignments/ipv4-address-space
# https://www.iana.org/assignments/ipv4-address-space
#
0.0.0.0/8 UNKNOWN
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.0.0.0/8 apnic
43.224.0.0/11 apnic
43.0.0.0/8 whois.nic.ad.jp
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

@ -1,25 +1,7 @@
/* 43.224.0.0 - 43.231.255.255 */
{ 736100352UL, 4294443008UL, "whois.apnic.net" },
/* 43.236.0.0 - 43.243.255.255 */
{ 736886784UL, 4294705152UL, "whois.apnic.net" },
{ 737148928UL, 4294705152UL, "whois.apnic.net" },
/* 43.245.0.0 - 43.252.255.255 */
{ 737476608UL, 4294901760UL, "whois.apnic.net" },
{ 737542144UL, 4294836224UL, "whois.apnic.net" },
{ 737673216UL, 4294705152UL, "whois.apnic.net" },
{ 737935360UL, 4294901760UL, "whois.apnic.net" },
/* 43.254.0.0 - 43.255.255.255 */
{ 738066432UL, 4294836224UL, "whois.apnic.net" },
/* 45.2.0.0 - 45.3.255.255 */
{ 755105792UL, 4294836224UL, "whois.arin.net" },
/* 45.4.0.0 - 45.7.255.255 */
{ 755236864UL, 4294705152UL, "whois.lacnic.net" },
/* 45.8.0.0 - 45.15.255.255 */
{ 755499008UL, 4294443008UL, "whois.ripe.net" },
/* 45.16.0.0 - 45.31.255.255 */
{ 756023296UL, 4293918720UL, "whois.arin.net" },
/* 45.32.0.0 - 45.63.255.255 */
{ 757071872UL, 4292870144UL, "whois.arin.net" },
/* 45.64.0.0 - 45.65.15.255 */
{ 759234560UL, 4294963200UL, "whois.apnic.net" },
{ 759169024UL, 4294901760UL, "whois.apnic.net" },
@ -34,8 +16,6 @@
{ 759300096UL, 4294836224UL, "whois.ripe.net" },
/* 45.68.0.0 - 45.71.255.255 */
{ 759431168UL, 4294705152UL, "whois.lacnic.net" },
/* 45.72.0.0 - 45.79.255.255 */
{ 759693312UL, 4294443008UL, "whois.arin.net" },
/* 45.80.0.0 - 45.95.255.255 */
{ 760217600UL, 4293918720UL, "whois.ripe.net" },
/* 45.96.0.0 - 45.111.255.255 */
@ -52,22 +32,16 @@
{ 769130496UL, 4294705152UL, "whois.afrinic.net" },
{ 769392640UL, 4294836224UL, "whois.afrinic.net" },
{ 769523712UL, 4294901760UL, "whois.afrinic.net" },
/* 45.223.0.0 - 45.223.255.255 */
{ 769589248UL, 4294901760UL, "whois.arin.net" },
/* 45.224.0.0 - 45.239.255.255 */
{ 769654784UL, 4293918720UL, "whois.lacnic.net" },
/* 45.240.0.0 - 45.247.255.255 */
{ 770703360UL, 4294443008UL, "whois.afrinic.net" },
/* 45.248.0.0 - 45.255.255.255 */
{ 771227648UL, 4294443008UL, "whois.apnic.net" },
/* 66.218.132.0 - 66.218.133.255 */
{ 1121616896UL, 4294966784UL, "whois.arin.net" },
/* 66.251.128.0 - 66.251.191.255 */
{ 1123778560UL, 4294950912UL, "whois.afrinic.net" },
/* 72.44.16.0 - 72.44.31.255 */
{ 1210847232UL, 4294963200UL, "whois.lacnic.net" },
/* 74.91.48.0 - 74.91.63.255 */
{ 1247490048UL, 4294963200UL, "whois.arin.net" },
/* 128.201.0.0 - 128.201.255.255 */
{ 2160656384UL, 4294901760UL, "whois.lacnic.net" },
/* 131.196.0.0 - 131.196.255.255 */
@ -78,12 +52,8 @@
{ 2332360704UL, 4294901760UL, "whois.apnic.net" },
/* 139.26.0.0 - 139.26.255.255 */
{ 2333736960UL, 4294901760UL, "whois.afrinic.net" },
/* 139.28.0.0 - 139.28.255.255 */
{ 2333868032UL, 4294901760UL, "whois.ripe.net" },
/* 144.48.0.0 - 144.48.255.255 */
{ 2419064832UL, 4294901760UL, "whois.apnic.net" },
/* 144.168.0.0 - 144.168.255.255 */
{ 2426929152UL, 4294901760UL, "whois.arin.net" },
/* 146.196.32.0 - 146.196.127.255 */
{ 2462326784UL, 4294959104UL, "whois.apnic.net" },
{ 2462334976UL, 4294950912UL, "whois.apnic.net" },
@ -93,24 +63,12 @@
{ 2471362560UL, 4294901760UL, "whois.ripe.net" },
/* 149.248.0.0 - 149.248.255.255 */
{ 2516058112UL, 4294901760UL, "whois.arin.net" },
/* 150.107.0.0 - 150.107.255.255 */
{ 2523594752UL, 4294901760UL, "whois.apnic.net" },
/* 150.129.0.0 - 150.129.255.255 */
{ 2525036544UL, 4294901760UL, "whois.apnic.net" },
/* 150.242.0.0 - 150.242.255.255 */
{ 2532442112UL, 4294901760UL, "whois.apnic.net" },
/* 152.89.0.0 - 152.89.255.255 */
{ 2555969536UL, 4294901760UL, "whois.ripe.net" },
/* 154.16.0.0 - 154.16.255.255 */
{ 2584739840UL, 4294901760UL, "whois.afrinic.net" },
/* 157.119.0.0 - 157.119.255.255 */
{ 2641821696UL, 4294901760UL, "whois.apnic.net" },
/* 160.19.0.0 - 160.19.15.255 */
{ 2685599744UL, 4294963200UL, "whois.arin.net" },
/* 160.19.20.0 - 160.19.23.255 */
{ 2685604864UL, 4294966272UL, "whois.apnic.net" },
/* 160.19.24.0 - 160.19.31.255 */
{ 2685605888UL, 4294965248UL, "whois.arin.net" },
/* 160.19.36.0 - 160.19.39.255 */
{ 2685608960UL, 4294966272UL, "whois.afrinic.net" },
/* 160.19.44.0 - 160.19.47.255 */
@ -125,15 +83,11 @@
{ 2685623296UL, 4294966272UL, "whois.ripe.net" },
/* 160.19.96.0 - 160.19.103.255 */
{ 2685624320UL, 4294965248UL, "whois.afrinic.net" },
/* 160.19.104.0 - 160.19.107.255 */
{ 2685626368UL, 4294966272UL, "whois.arin.net" },
/* 160.19.112.0 - 160.19.143.255 */
{ 2685628416UL, 4294963200UL, "whois.afrinic.net" },
{ 2685632512UL, 4294963200UL, "whois.afrinic.net" },
/* 160.19.152.0 - 160.19.155.255 */
{ 2685638656UL, 4294966272UL, "whois.afrinic.net" },
/* 160.19.160.0 - 160.19.163.255 */
{ 2685640704UL, 4294966272UL, "whois.arin.net" },
/* 160.19.168.0 - 160.19.175.255 */
{ 2685642752UL, 4294965248UL, "whois.lacnic.net" },
/* 160.19.180.0 - 160.19.183.255 */
@ -181,8 +135,6 @@
/* 160.20.160.0 - 160.20.207.255 */
{ 2685706240UL, 4294959104UL, "whois.lacnic.net" },
{ 2685714432UL, 4294963200UL, "whois.lacnic.net" },
/* 160.20.208.0 - 160.20.211.255 */
{ 2685718528UL, 4294966272UL, "whois.arin.net" },
/* 160.20.213.0 - 160.20.213.255 */
{ 2685719808UL, 4294967040UL, "whois.afrinic.net" },
/* 160.20.214.0 - 160.20.215.255 */
@ -201,18 +153,12 @@
{ 2685723136UL, 4294966784UL, "whois.afrinic.net" },
/* 160.20.229.0 - 160.20.229.255 */
{ 2685723904UL, 4294967040UL, "whois.ripe.net" },
/* 160.20.230.0 - 160.20.231.255 */
{ 2685724160UL, 4294966784UL, "whois.arin.net" },
/* 160.20.232.0 - 160.20.239.255 */
{ 2685724672UL, 4294965248UL, "whois.arin.net" },
/* 160.20.242.0 - 160.20.243.255 */
{ 2685727232UL, 4294966784UL, "whois.lacnic.net" },
/* 160.20.246.0 - 160.20.247.255 */
{ 2685728256UL, 4294966784UL, "whois.lacnic.net" },
/* 160.20.248.0 - 160.20.249.255 */
{ 2685728768UL, 4294966784UL, "whois.ripe.net" },
/* 160.20.251.0 - 160.20.251.255 */
{ 2685729536UL, 4294967040UL, "whois.arin.net" },
/* 160.20.252.0 - 160.20.255.255 */
{ 2685729792UL, 4294966272UL, "whois.afrinic.net" },
/* 160.202.8.0 - 160.202.15.255 */
@ -221,8 +167,6 @@
{ 2697596928UL, 4294963200UL, "whois.ripe.net" },
/* 160.202.32.0 - 160.202.63.255 */
{ 2697601024UL, 4294959104UL, "whois.apnic.net" },
/* 160.202.64.0 - 160.202.127.255 */
{ 2697609216UL, 4294950912UL, "whois.arin.net" },
/* 160.202.128.0 - 160.202.255.255 */
{ 2697625600UL, 4294934528UL, "whois.apnic.net" },
/* 160.238.0.0 - 160.238.0.255 */
@ -234,24 +178,15 @@
{ 2699956224UL, 4294966272UL, "whois.apnic.net" },
/* 160.238.21.0 - 160.238.21.255 */
{ 2699957504UL, 4294967040UL, "whois.ripe.net" },
/* 160.238.22.0 - 160.238.23.255 */
{ 2699957760UL, 4294966784UL, "whois.arin.net" },
/* 160.238.24.0 - 160.238.29.255 */
{ 2699958272UL, 4294966272UL, "whois.lacnic.net" },
{ 2699959296UL, 4294966784UL, "whois.lacnic.net" },
/* 160.238.31.0 - 160.238.31.255 */
{ 2699960064UL, 4294967040UL, "whois.arin.net" },
/* 160.238.33.0 - 160.238.33.255 */
{ 2699960576UL, 4294967040UL, "whois.apnic.net" },
/* 160.238.34.0 - 160.238.35.255 */
{ 2699960832UL, 4294966784UL, "whois.apnic.net" },
/* 160.238.36.0 - 160.238.39.255 */
{ 2699961344UL, 4294966272UL, "whois.ripe.net" },
/* 160.238.41.0 - 160.238.41.255 */
{ 2699962624UL, 4294967040UL, "whois.arin.net" },
/* 160.238.42.0 - 160.238.47.255 */
{ 2699962880UL, 4294966784UL, "whois.arin.net" },
{ 2699963392UL, 4294966272UL, "whois.arin.net" },
/* 160.238.48.0 - 160.238.49.255 */
{ 2699964416UL, 4294966784UL, "whois.afrinic.net" },
/* 160.238.50.0 - 160.238.50.255 */
@ -272,8 +207,6 @@
{ 2699976704UL, 4294966272UL, "whois.ripe.net" },
/* 160.238.101.0 - 160.238.101.255 */
{ 2699977984UL, 4294967040UL, "whois.afrinic.net" },
/* 160.238.102.0 - 160.238.103.255 */
{ 2699978240UL, 4294966784UL, "whois.arin.net" },
/* 160.238.104.0 - 160.238.111.255 */
{ 2699978752UL, 4294965248UL, "whois.lacnic.net" },
/* 160.238.112.0 - 160.238.127.255 */
@ -288,31 +221,8 @@
{ 2718746624UL, 4294965248UL, "whois.ripe.net" },
/* 162.12.208.0 - 162.12.215.255 */
{ 2718748672UL, 4294965248UL, "whois.apnic.net" },
/* 162.12.216.0 - 162.12.219.255 */
{ 2718750720UL, 4294966272UL, "whois.arin.net" },
/* 162.12.224.0 - 162.12.235.255 */
{ 2718752768UL, 4294965248UL, "whois.arin.net" },
{ 2718754816UL, 4294966272UL, "whois.arin.net" },
/* 162.12.240.0 - 162.12.247.255 */
{ 2718756864UL, 4294965248UL, "whois.apnic.net" },
/* 163.47.4.0 - 163.47.18.255 */
{ 2737767424UL, 4294966272UL, "whois.apnic.net" },
{ 2737768448UL, 4294965248UL, "whois.apnic.net" },
{ 2737770496UL, 4294966784UL, "whois.apnic.net" },
{ 2737771008UL, 4294967040UL, "whois.apnic.net" },
/* 163.47.20.0 - 163.47.21.255 */
{ 2737771520UL, 4294966784UL, "whois.apnic.net" },
/* 163.47.32.0 - 163.47.45.255 */
{ 2737774592UL, 4294965248UL, "whois.apnic.net" },
{ 2737776640UL, 4294966272UL, "whois.apnic.net" },
{ 2737777664UL, 4294966784UL, "whois.apnic.net" },
/* 163.47.47.0 - 163.47.255.255 */
{ 2737778432UL, 4294967040UL, "whois.apnic.net" },
{ 2737778688UL, 4294963200UL, "whois.apnic.net" },
{ 2737782784UL, 4294950912UL, "whois.apnic.net" },
{ 2737799168UL, 4294934528UL, "whois.apnic.net" },
/* 163.53.0.0 - 163.53.255.255 */
{ 2738159616UL, 4294901760UL, "whois.apnic.net" },
/* 164.160.0.0 - 164.160.255.255 */
{ 2761949184UL, 4294901760UL, "whois.afrinic.net" },
/* 164.163.0.0 - 164.163.255.255 */
@ -365,14 +275,8 @@
{ 3227254272UL, 4294967040UL, "whois.lacnic.net" },
/* 192.92.154.0 - 192.92.154.255 */
{ 3227294208UL, 4294967040UL, "whois.lacnic.net" },
/* 192.94.77.0 - 192.94.77.255 */
{ 3227405568UL, 4294967040UL, "whois.arin.net" },
/* 192.94.78.0 - 192.94.78.255 */
{ 3227405824UL, 4294967040UL, "whois.ripe.net" },
/* 192.107.1.0 - 192.107.1.255 */
{ 3228238080UL, 4294967040UL, "whois.arin.net" },
/* 192.133.103.0 - 192.133.103.255 */
{ 3229968128UL, 4294967040UL, "whois.arin.net" },
/* 192.135.90.0 - 192.135.91.255 */
{ 3230095872UL, 4294966784UL, "whois.apnic.net" },
/* 192.135.95.0 - 192.135.95.255 */
@ -387,8 +291,6 @@
{ 3230400768UL, 4294967040UL, "whois.lacnic.net" },
/* 192.140.2.0 - 192.140.3.255 */
{ 3230401024UL, 4294966784UL, "whois.ripe.net" },
/* 192.140.4.0 - 192.140.7.255 */
{ 3230401536UL, 4294966272UL, "whois.arin.net" },
/* 192.140.8.0 - 192.140.15.255 */
{ 3230402560UL, 4294965248UL, "whois.lacnic.net" },
/* 192.140.16.0 - 192.140.127.255 */
@ -415,8 +317,6 @@
{ 3230683136UL, 4294963200UL, "whois.apnic.net" },
/* 192.144.96.0 - 192.144.127.255 */
{ 3230687232UL, 4294959104UL, "whois.lacnic.net" },
/* 192.144.128.0 - 192.144.255.255 */
{ 3230695424UL, 4294934528UL, "whois.arin.net" },
/* 192.145.0.0 - 192.145.127.255 */
{ 3230728192UL, 4294934528UL, "whois.ripe.net" },
/* 192.145.128.0 - 192.145.191.255 */
@ -429,34 +329,22 @@
{ 3230786560UL, 4294966784UL, "whois.apnic.net" },
/* 192.145.230.0 - 192.145.230.255 */
{ 3230787072UL, 4294967040UL, "whois.afrinic.net" },
/* 192.147.11.0 - 192.147.11.255 */
{ 3230862080UL, 4294967040UL, "whois.arin.net" },
/* 192.153.12.0 - 192.153.12.255 */
{ 3231255552UL, 4294967040UL, "whois.lacnic.net" },
/* 192.156.144.0 - 192.156.144.255 */
{ 3231485952UL, 4294967040UL, "whois.apnic.net" },
/* 192.156.202.0 - 192.156.202.255 */
{ 3231500800UL, 4294967040UL, "whois.arin.net" },
/* 192.156.220.0 - 192.156.220.255 */
{ 3231505408UL, 4294967040UL, "whois.apnic.net" },
/* 192.172.232.0 - 192.172.232.255 */
{ 3232557056UL, 4294967040UL, "whois.ripe.net" },
/* 192.172.244.0 - 192.172.244.255 */
{ 3232560128UL, 4294967040UL, "whois.arin.net" },
/* 192.188.81.0 - 192.188.81.255 */
{ 3233566976UL, 4294967040UL, "whois.arin.net" },
/* 192.188.82.0 - 192.188.83.255 */
{ 3233567232UL, 4294966784UL, "whois.apnic.net" },
/* 192.188.248.0 - 192.188.248.255 */
{ 3233609728UL, 4294967040UL, "whois.ripe.net" },
/* 192.197.113.0 - 192.197.113.255 */
{ 3234164992UL, 4294967040UL, "whois.apnic.net" },
/* 192.231.238.0 - 192.231.238.255 */
{ 3236425216UL, 4294967040UL, "whois.arin.net" },
/* 192.251.230.0 - 192.251.230.255 */
{ 3237733888UL, 4294967040UL, "whois.ripe.net" },
/* 198.17.79.0 - 198.17.79.255 */
{ 3323023104UL, 4294967040UL, "whois.arin.net" },
/* 198.97.38.0 - 198.97.38.255 */
{ 3328255488UL, 4294967040UL, "whois.lacnic.net" },
/* 199.21.172.0 - 199.21.175.255 */
@ -475,14 +363,8 @@
{ 3437308416UL, 4294966784UL, "whois.lacnic.net" },
/* 205.211.83.0 - 205.211.83.255 */
{ 3453178624UL, 4294967040UL, "whois.ripe.net" },
/* 207.115.112.0 - 207.115.127.255 */
{ 3480449024UL, 4294963200UL, "whois.arin.net" },
/* 208.73.240.0 - 208.73.243.255 */
{ 3494506496UL, 4294966272UL, "whois.arin.net" },
/* 208.85.156.0 - 208.85.159.255 */
{ 3495271424UL, 4294966272UL, "whois.afrinic.net" },
/* 209.107.128.0 - 209.107.191.255 */
{ 3513483264UL, 4294950912UL, "whois.arin.net" },
/* 216.98.208.0 - 216.98.223.255 */
{ 3630354432UL, 4294963200UL, "whois.lacnic.net" },
/* 216.250.96.0 - 216.250.111.255 */

View File

@ -1,27 +0,0 @@
#!/usr/bin/perl
use warnings;
use strict;
while (<>) {
chomp;
s/#.*$//;
s/^\s+//; s/\s+$//;
next if /^$/;
my ($fh, $fl, $lh, $ll, $s, $f, $l);
if (($fh, $fl, $lh, $ll, $s) =
/^(\d+)\.(\d+)\s+(\d+)\.(\d+)\s+([\w\.-]+)$/) {
$f = ($fh << 16) + $fl;
$l = ($lh << 16) + $ll;
my $server = ($s =~ /\./) ? $s : "whois.$s.net";
print qq|{ ${f}u, ${l}u,\t"$server" },\t/* $fh.$fl $lh.$ll */\n|;
} elsif (($f, $l, $s) = /^(\d+)\s+(\d+)\s+([\w\.-]+)$/) {
my $server = ($s =~ /\./) ? $s : "whois.$s.net";
print qq|{ ${f}u, ${l}u,\t"$server" },\n|;
} else {
die "format error: $_";
}
}

View File

@ -1,4 +1,5 @@
#!/usr/bin/perl
# SPDX-License-Identifier: GPL-2.0-or-later
use warnings;
use strict;
@ -11,18 +12,22 @@ while (<>) {
s/^\s+//; s/\s+$//;
next if /^$/;
die "format error: $_" if not (/^([\d\.]+)\s+([\d\.]+)\s+([\w\.]+)$/);
my $f = $1; my $l = $2; my $s = $3;
my ($fh, $fl, $lh, $ll, $s, $f, $l);
my $comment = '';
if (($fh, $fl, $lh, $ll, $s) =
/^(\d+)\.(\d+)\s+(\d+)\.(\d+)\s+([\w\.-]+)$/) {
$f = ($fh << 16) + $fl;
$l = ($lh << 16) + $ll;
$comment = qq|\t/* $fh.$fl $lh.$ll */|;
} elsif (($f, $l, $s) = /^(\d+)\s+(\d+)\s+([\w\.-]+)$/) {
} else {
die "format error: $_";
}
die "constraint violated: $l < $last_l" if $l < $last_l;
$last_l = $l;
print "{ ${f}, ${l}, \"";
if ($s =~ /\./) {
print "$s";
} else {
print "whois.$s.net";
}
print qq(" },\n);
my $server = ($s =~ /\./) ? $s : "whois.$s.net";
print qq|{ ${f}u, ${l}u,\t"$server" },$comment\n|;
}

View File

@ -1,4 +1,5 @@
#!/usr/bin/perl
# SPDX-License-Identifier: GPL-2.0-or-later
use warnings;
use strict;

View File

@ -6,10 +6,12 @@ use strict;
use autodie;
use Text::CSV;
use Net::Patricia;
use Net::CIDR;
use Net::IP;
my $csv = Text::CSV->new;
my $pt = parse_ip_del('ip_del_list');
open(my $in, '<', 'ipv4-recovered-address-space-2.csv');
open(my $out, '>', 'ip_del_recovered.h');
@ -17,18 +19,51 @@ open(my $out, '>', 'ip_del_recovered.h');
while (my $row = $csv->getline($in)) {
next if $row->[0] eq 'Start address';
next if $row->[5] ne 'ALLOCATED';
my ($first_ip, $last_ip, undef, undef, $server) = @$row;
print $out '/* ' . $row->[0] . ' - ' . $row->[1] . " */\n";
my @networks =
grep {
my $server_recovered = $pt->match_string($_->ip);
$server_recovered and $server_recovered ne $server;
}
map { Net::IP->new($_) }
Net::CIDR::range2cidr($row->[0] . '-' . $row->[1]);
Net::CIDR::range2cidr($first_ip . '-' . $last_ip);
next if not @networks;
print $out "/* $first_ip - $last_ip */\n";
print $out sprintf(qq|{ %sUL, %sUL, "%s" },\n|,
$_->intip,
((~(0xffffffff >> $_->prefixlen)) & 0xffffffff),
$row->[4]
$server
) foreach @networks;
}
close($in);
close($out);
exit;
sub parse_ip_del {
my ($file) = @_;
my $pt = new Net::Patricia;
open(my $in, '<', $file);
while (<$in>) {
# this code is copied from make_ip_del.pl
chomp;
s/#.*$//;
s/^\s+//; s/\s+$//;
next if /^$/;
die "format error: $_" if not /^([\d\.]+)\/(\d+)\s+([\w\.]+)$/;
my $network = "$1/$2";
my $server = $3;
$server = "whois.$server.net" if $server !~ /\./;
$pt->add_string($network, $server) or die;
}
return $pt;
}

View File

@ -1,4 +1,5 @@
#!/usr/bin/perl
# SPDX-License-Identifier: GPL-2.0-or-later
use warnings;
use strict;

View File

@ -1,4 +1,5 @@
#!/usr/bin/perl
# SPDX-License-Identifier: GPL-2.0-or-later
use warnings;
use strict;

View File

@ -1,4 +1,5 @@
#!/usr/bin/perl
# SPDX-License-Identifier: GPL-2.0-or-later
use warnings;
use strict;

View File

@ -1,4 +1,5 @@
#!/usr/bin/perl
# SPDX-License-Identifier: GPL-2.0-or-later
use warnings;
use strict;
@ -15,9 +16,9 @@ while (<>) {
$b =~ s/^W(?:EB)?\s+/\\x01/;
$b =~ s/^VERISIGN\s+/\\x04" "/;
$b = "\\x03" if $b eq 'NONE';
$b = "\\x08whois.afilias-grs.info" if $b eq 'AFILIAS';
$b =~ s/^RECURSIVE\s+/\\x08" "/;
$b = "\\x08$b" if $b eq 'whois.flexireg.net';
$b = "\\x08$b" if $b eq 'whois.registry.in';
$b = "\\x08$b" if $b eq 'whois.nixiregistry.in';
$b = "\\x0C" if $b eq 'ARPA';
$b = "\\x0D" if $b eq 'IP6';
print qq| "$a",\t"$b",\n|;

View File

@ -1,4 +1,5 @@
#!/usr/bin/perl
# SPDX-License-Identifier: GPL-2.0-or-later
use warnings;
use strict;
@ -13,12 +14,17 @@ 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+
| ~\S+
| \+\S+
) $//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

@ -12,28 +12,28 @@ encrypts the given password with the
libc function, using the given salt.
.SH OPTIONS
.TP
.BR \-S ", "\c
.BI \-\-salt= STRING
.BR \-S " STRING\fR, \fP" \-\-salt= \fISTRING\fP
Use the
.I STRING
as salt. If it begins with
as salt.
If it begins with
.I $
then it will be passed straight to
.BR crypt (3)
without any checks.
.TP
.BR \-R ", "\c
.BI \-\-rounds= NUMBER
.BR \-R " NUMBER\fR, \fP" \-\-rounds= \fINUMBER\fP
Use
.I NUMBER
rounds. This argument is ignored if the method chosen
does not support variable rounds. For the OpenBSD Blowfish method this is
rounds.
This argument is ignored if the method chosen
does not support variable rounds.
For the OpenBSD Blowfish method this is
the logarithm of the number of rounds.
The behavior is undefined if this option is used without
.IR \-\-method .
.TP
.BR \-m ", "\c
.BI \-\-method= TYPE
.BR \-m " TYPE\fR, \fP" \-\-method= \fITYPE\fP
Compute the password using the
.I TYPE
method.
@ -47,20 +47,18 @@ If
begins and end with
.I $
characters then the string is passed to
.IR crypt_gensalt (3)
.BR crypt_gensalt (3)
as-is.
.TP
.B -5
.B \-5
Like
.IR \-\-method=md5crypt .
.TP
.B \-P \c
.IR NUM ", "\c
.BI \-\-password-fd= NUM
.BI \-P " NUM\fR, \fP" \-\-password-fd= NUM
Read the password from file descriptor
.I NUM
instead of using
.IR getpass (3).
.BR getpass (3).
If the file descriptor is not connected to a tty then no other text
than the hashed password is printed on stdout.
.TP
@ -79,15 +77,16 @@ characters may not be read correctly.
.P
This program suffers of a bad case of featuritis.
.SH "SEE ALSO"
.IR passwd (1),
.IR passwd (5),
.IR crypt (3),
.IR crypt (5),
.IR crypt_gensalt (3),
.IR getpass (3).
.BR passwd (1),
.BR passwd (5),
.BR crypt (3),
.BR crypt (5),
.BR crypt_gensalt (3),
.BR getpass (3).
.SH AUTHOR
.B mkpasswd
and this man page were written by Marco d'Itri
.RI < md@linux.it >
and are licensed under the terms of the GNU General Public License,
version 2 or higher.
version 2 or later.
.\" SPDX-License-Identifier: GPL-2.0-or-later

33
mkpasswd.bash Normal file
View File

@ -0,0 +1,33 @@
_mkpasswd() {
case $3 in
--help | --version | --salt | --rounds | --password-fd | -[hVSRP])
return 0
;;
--method | -m)
COMPREPLY=($(compgen -W '$(
LC_ALL=C "$1" --method=help 2>/dev/null |
while read -r method _; do
[[ $method == Available ]] ||
printf "%s\n" "$method"
done
)'))
return 0
;;
esac
if [[ $2 == -* ]]; then
COMPREPLY=($(compgen -W '
--method
-5
--salt
--rounds
--password-fd
--stdin
--help
--version
' -- "$2"))
return 0
fi
} && complete -F _mkpasswd mkpasswd

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2001-2021 Marco d'Itri <md@linux.it>.
* Copyright (C) Marco d'Itri <md@linux.it>.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -12,8 +12,9 @@
* 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* with this program; if not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
/* for crypt, snprintf and strcasecmp */
@ -45,6 +46,9 @@
#ifdef HAVE_GETTIMEOFDAY
#include <sys/time.h>
#endif
#ifdef HAVE_READPASSPHRASE
#include <readpassphrase.h>
#endif
/* Application-specific */
#include "version.h"
@ -98,9 +102,6 @@ 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
@ -109,7 +110,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 */
@ -136,6 +137,13 @@ 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
@ -271,6 +279,7 @@ int main(int argc, char *argv[])
if (!salt_prefix) {
/* NULL means that crypt_gensalt will choose one later */
rounds_str[0] = '\0';
} else if (rounds_support == 2) {
/* bcrypt strings always contain the rounds number */
if (rounds <= 5)
@ -323,6 +332,8 @@ int main(int argc, char *argv[])
* Build the actual argument to crypt(3) by concatenating the
* method prefix, the rounds metadata (if any) and the salt string.
*/
if (!salt_prefix)
salt_prefix = "";
salt = NOFAIL(malloc(strlen(salt_prefix) + strlen(rounds_str)
+ strlen(salt_arg) + 1));
*salt = '\0';
@ -382,11 +393,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
}
{
@ -419,6 +440,7 @@ int main(int argc, char *argv[])
*/
inline void *get_random_bytes(const unsigned int count)
{
(void)(count); /* suppress the "unused parameter" warning */
return NULL;
}
@ -537,7 +559,7 @@ void NORETURN display_help(int error)
void display_version(void)
{
printf("mkpasswd %s\n\n", VERSION);
puts("Copyright (C) 2001-2021 Marco d'Itri\n"
puts("Copyright (C) Marco d'Itri\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
}
@ -553,7 +575,7 @@ void display_methods(void)
}
char *read_line(FILE *fp) {
int size = 128;
size_t size = 128;
int ch;
size_t pos = 0;
char *password;

View File

@ -6,7 +6,6 @@
aaa
aarp
abarth
abb
abbott
abbvie
@ -20,7 +19,6 @@ accountant
accountants
aco
actor
adac
ads
adult
aeg
@ -34,7 +32,6 @@ airbus
airforce
airtel
akdn
alfaromeo
alibaba
alipay
allfinanz
@ -76,14 +73,12 @@ auspost
author
auto
autos
avianca
aws
axa
azure
baby
baidu
banamex
bananarepublic
band
bank
bar
@ -104,7 +99,6 @@ bcn
beats
beauty
beer
bentley
berlin
best
bestbuy
@ -145,7 +139,6 @@ broadway
broker
brother
brussels
bugatti
build
builders
business
@ -160,7 +153,6 @@ calvinklein
cam
camera
camp
cancerresearch
canon
capetown
capital
@ -181,7 +173,6 @@ catholic
cba
cbn
cbre
cbs
center
ceo
cern
@ -204,7 +195,6 @@ citadel
citi
citic
city
cityeats
claims
cleaning
click
@ -219,7 +209,6 @@ codes
coffee
college
cologne
comcast
commbank
community
company
@ -232,7 +221,6 @@ consulting
contact
contractors
cooking
cookingchannel
cool
corsica
country
@ -251,7 +239,6 @@ cruises
cuisinella
cymru
cyou
dabur
dad
dance
data
@ -295,7 +282,6 @@ download
drive
dtv
dubai
dunlop
dupont
durban
dvag
@ -317,7 +303,6 @@ ericsson
erni
esq
estate
etisalat
eurovision
eus
events
@ -341,7 +326,6 @@ fedex
feedback
ferrari
ferrero
fiat
fidelity
fido
film
@ -363,7 +347,6 @@ flowers
fly
foo
food
foodnetwork
football
ford
forex
@ -375,7 +358,6 @@ free
fresenius
frl
frogans
frontdoor
frontier
ftr
fujitsu
@ -416,7 +398,6 @@ godaddy
gold
goldpoint
golf
goo
goodyear
goog
google
@ -429,7 +410,6 @@ green
gripe
grocery
group
guardian
gucci
guge
guide
@ -448,7 +428,6 @@ help
helsinki
here
hermes
hgtv
hiphop
hisamitsu
hitachi
@ -467,7 +446,6 @@ hospital
host
hosting
hot
hoteles
hotels
hotmail
house
@ -525,12 +503,11 @@ juniper
kaufen
kddi
kerryhotels
kerrylogistics
kerryproperties
kfh
kia
kids
kim
kinder
kindle
kitchen
kiwi
@ -546,8 +523,6 @@ kyoto
lacaixa
lamborghini
lamer
lancaster
lancia
land
landrover
lanxess
@ -575,9 +550,7 @@ lilly
limited
limo
lincoln
linde
link
lipsy
live
living
llc
@ -586,7 +559,6 @@ loan
loans
locker
locus
loft
lol
london
lotte
@ -599,7 +571,6 @@ ltda
lundbeck
luxe
luxury
macys
madrid
maif
maison
@ -613,7 +584,6 @@ marketing
markets
marriott
marshalls
maserati
mattel
mba
mckinsey
@ -654,10 +624,8 @@ msd
mtn
mtr
music
mutual
nab
nagoya
natura
navy
nba
nec
@ -680,7 +648,6 @@ ninja
nissan
nissay
nokia
northwesternmutual
norton
now
nowruz
@ -695,7 +662,6 @@ office
okinawa
olayan
olayangroup
oldnavy
ollo
omega
one
@ -719,7 +685,6 @@ pars
partners
parts
party
passagens
pay
pccw
pet
@ -751,7 +716,6 @@ pohl
poker
politie
porn
pramerica
praxi
press
prime
@ -778,7 +742,6 @@ realtor
realty
recipes
red
redstone
redumbrella
rehab
reise
@ -802,7 +765,6 @@ ricoh
ril
rio
rip
rocher
rocks
rodeo
rogers
@ -831,7 +793,6 @@ save
saxo
sbi
sbs
sca
scb
schaeffler
schmidt
@ -849,7 +810,6 @@ seek
select
sener
services
ses
seven
sew
sex
@ -857,7 +817,6 @@ sexy
sfr
shangrila
sharp
shaw
shell
shia
shiksha
@ -866,7 +825,6 @@ shop
shopping
shouji
show
showtime
silk
sina
singles
@ -943,7 +901,6 @@ theatre
tiaa
tickets
tienda
tiffany
tips
tires
tirol
@ -965,7 +922,6 @@ toys
trade
trading
training
travelchannel
travelers
travelersinsurance
trust
@ -1004,13 +960,11 @@ viva
vivo
vlaanderen
vodka
volkswagen
volvo
vote
voting
voto
voyage
vuelos
wales
walmart
walter
@ -1036,7 +990,6 @@ windows
wine
winners
wme
wolterskluwer
woodside
work
works
@ -1046,7 +999,6 @@ wtc
wtf
xbox
xerox
xfinity
xihuan
xin
xn--11b4c3d
@ -1067,6 +1019,8 @@ xn--6frz82g
xn--6qq986b3xl
xn--80adxhks
xn--80aqecdr1a
xn--80asehdb
xn--80aswg
xn--8y0a063a
xn--9dbq2a
xn--9et52u
@ -1100,19 +1054,18 @@ xn--imr513n
xn--io0a7i
xn--j1aef
xn--jlq480n2rg
xn--jlq61u9w7b
xn--jvr189m
xn--kcrx77d1x4a
xn--kput3i
xn--mgba3a3ejt
xn--mgba7c0bbn0a
xn--mgbaakc7dvf
xn--mgbab2bd
xn--mgbca7dzdo
xn--mgbi4ecexp
xn--mgbt3dhd
xn--mk1bu44c
xn--mxtq1m
xn--ngbc5azd
xn--ngbe9e0a
xn--ngbrx
xn--nqv7f
@ -1129,6 +1082,7 @@ xn--ses554g
xn--t60b56a
xn--tckwe
xn--tiq49xqyj
xn--unup4y
xn--vermgensberater-ctb
xn--vermgensberatung-pwb
xn--vhquv

View File

@ -5,14 +5,13 @@
-afrinic whois.afrinic.net
-ap whois.apnic.net
-cznic whois.nic.cz
-dk whois.dk-hostmaster.dk
-dk whois.punktum.dk
-il whois.isoc.org.il
-is whois.isnic.is
-kg whois.domain.kg
-kg whois.kg
-coop whois.nic.coop
-frnic whois.nic.fr
-lrms whois.afilias.info
-metu whois.nic.tr
-nicat whois.nic.at
-nicci whois.nic.ci
-irnic whois.nic.ir
@ -22,3 +21,5 @@
-sixxs whois.sixxs.net
-uanic whois.ua
-bzh whois.nic.bzh
-ru whois.tcinet.ru
-su whois.tcinet.ru

View File

@ -10,7 +10,7 @@ INSTALLNLSDIR=$(BASEDIR)$(prefix)/share/locale
PACKAGE = whois
CATALOGS = cs.mo da.mo de.mo el.mo es.mo eu.mo fi.mo fr.mo it.mo ja.mo pl.mo pt_BR.mo ru.mo zh_CN.mo
CATALOGS = cs.mo da.mo de.mo el.mo es.mo eu.mo fi.mo fr.mo it.mo ja.mo ka.mo pl.mo pt_BR.mo ru.mo tr.mo zh_CN.mo
POTFILES=../whois.c ../mkpasswd.c

View File

@ -20,13 +20,13 @@
# los siguientes documentos:
#
# - El proyecto de traducción de Debian al español
# http://www.debian.org/intl/spanish/
# https://www.debian.org/intl/spanish/
# especialmente las notas y normas de traducción en
# http://www.debian.org/intl/spanish/notas
# https://www.debian.org/intl/spanish/notas
#
# - La guía de traducción de po's de debconf:
# /usr/share/doc/po-debconf/README-trans
# o http://www.debian.org/intl/l10n/po-debconf/README-trans
# o https://www.debian.org/intl/l10n/po-debconf/README-trans
#
msgid ""
msgstr ""

164
po/fi.po
View File

@ -1,21 +1,22 @@
# Finnish translation for whois.
# Copyright (C) 2008- Sami Kerola <kerolasa@iki.fi>
# Copyright (C) 2022 Lauri Nurmi <lanurmi@iki.fi>
#
#
msgid ""
msgstr ""
"Project-Id-Version: whois 5.0.1\n"
"Project-Id-Version: whois 5.5.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-03 17:52+0100\n"
"PO-Revision-Date: 2019-06-28 08:56+0100\n"
"Last-Translator: Sami Kerola <kerolasa@iki.fi>\n"
"POT-Creation-Date: 2022-10-29 11:48+0300\n"
"PO-Revision-Date: 2022-10-30 00:27+0300\n"
"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
"Language-Team: \n"
"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 2.2.1\n"
"X-Generator: Poedit 3.2\n"
#: ../whois.c:240
#, c-format
@ -30,15 +31,17 @@ msgstr ""
#: ../whois.c:329
msgid "This TLD has no whois server, but you can access the whois database at"
msgstr "Tälla TLD:llä ei ole whois palvelinta, voit hakea tiedot osoitteesta"
msgstr ""
"Tällä TLD:llä ei ole whois-palvelinta, mutta voit käyttää whois-tietokantaa "
"osoitteessa"
#: ../whois.c:334
msgid "This TLD has no whois server."
msgstr "Tälla TLD:llä ei ole whois palvelinta."
msgstr "Tällä TLD:llä ei ole whois-palvelinta."
#: ../whois.c:337
msgid "No whois server is known for this kind of object."
msgstr "Mikään whois palvelu ei tiedä kysyttyä tietoa."
msgstr "Tällaiselle objektille ei ole tiedossa whois-palvelinta."
#: ../whois.c:340
msgid "Unknown AS number or IP network. Please upgrade this program."
@ -57,7 +60,7 @@ msgid ""
"\n"
msgstr ""
"\n"
"Kysytään IPv4 ulostuloa %s IPv6:n IPv4 avaruudesta.\n"
"Kysellään IPv4-päätetepistettä %s 6to4-IPv6-osoitteelle.\n"
"\n"
#: ../whois.c:369
@ -68,7 +71,7 @@ msgid ""
"\n"
msgstr ""
"\n"
"Kysytään IPv4 ulostuloa %s Teredo IPv6 tunneliosoitetta.\n"
"Kysellään IPv4-päätetepistettä %s Teredo-IPv6-osoitteelle.\n"
"\n"
#: ../whois.c:406
@ -77,7 +80,7 @@ msgid ""
"Query string: \"%s\"\n"
"\n"
msgstr ""
"Kysely: \"%s\"\n"
"Kysely: ”%s”\n"
"\n"
#: ../whois.c:416
@ -96,19 +99,20 @@ msgstr ""
#: ../whois.c:458 ../whois.c:461
#, c-format
msgid "Cannot parse this line: %s"
msgstr "Ohjelma ei ymmärrä riviä: %s"
msgstr "Tätä riviä ei voi jäsentää: %s"
#: ../whois.c:650
msgid "Warning: RIPE flags used with a traditional server."
msgstr "Varoitus: käytät RIPE valitsimia perinteiseen palvelimeen."
msgstr "Varoitus: RIPE-valitsimia käytetään perinteiseen palvelimeen."
#: ../whois.c:823 ../whois.c:939
msgid ""
"Catastrophic error: disclaimer text has been changed.\n"
"Please upgrade this program.\n"
msgstr ""
"Katastrofaalinen virhe: lisenssiteksti on muuttunut.\n"
"Päivita ohjelma.\n"
"Katastrofaalinen virhe: vastuuvapauslausekkeen teksti\n"
"on muuttunut.\n"
"Päivitä tämä ohjelma.\n"
#: ../whois.c:1040
#, c-format
@ -141,24 +145,26 @@ msgid ""
msgstr ""
"Käyttö: whois [VALITSIN]... OBJEKTI...\n"
"\n"
"-h PALVELIN, --host PALVELIN ota yhteys PALVELIMEEN\n"
"-p PORTTI, --port PORTTI käytä PORTTIA\n"
"-I ota yhteys whois.iana.org ja seuraa "
"viittausta\n"
"-H piilota ilmoitukset\n"
"-h PALV, --host PALV ota yhteys PALVelimeen\n"
"-p PORT, --port PORT käytä PORTtia\n"
"-I kysele whois.iana.org:ilta ja seuraa viittausta\n"
"-H piilota vastuuvapauslausekkeet\n"
#: ../whois.c:1506
#, fuzzy, c-format
#, c-format
msgid ""
" --verbose explain what is being done\n"
" --no-recursion disable recursion from registry to registrar servers\n"
" --no-recursion disable recursion from registry to registrar "
"servers\n"
" --help display this help and exit\n"
" --version output version information and exit\n"
"\n"
msgstr ""
" --verbose näytä mitä on tekeillä\n"
" --help näytä tämä teksti\n"
" --version näytä versio\n"
" --verbose kerro mitä on tekeillä\n"
" --no-recursion älä käytä rekursiota rekisteristä\n"
" verkkotunnusvälittäjän palvelimille\n"
" --help näytä tämä ohje ja poistu\n"
" --version näytä versiotiedot ja poistu\n"
#: ../whois.c:1513
#, c-format
@ -169,11 +175,12 @@ msgid ""
"-m find all one level more specific matches\n"
"-M find all levels of more specific matches\n"
msgstr ""
"Seuraavat optiot ovat tuettuja whois.ripe.net palvelimella:\n"
"-l etsi välittömiä tietueita\n"
"-L etsi kaikkia vastaavia tietueita\n"
"-m etsi kaikki samantasoiset tai erityisemmät tietueet\n"
"-M etsi kaikkien tasojen erityiset tietueet\n"
"Seuraavat liput toimivat whois.ripe.net- ja joillakin RIPEn\n"
"kaltaisilla palvelimilla:\n"
"-l etsi yhden tason vähemmän tarkka osuma\n"
"-L etsi kaikkien tasojen vähemmän tarkat osumat\n"
"-m etsi kaikki yhden tason tarkemmat osumat\n"
"-M etsi kaikkien tasojen tarkemmat osumat\n"
#: ../whois.c:1520
#, c-format
@ -183,9 +190,9 @@ msgid ""
"-x exact match\n"
"-b return brief IP address ranges with abuse contact\n"
msgstr ""
"-c etsi vähin osuma joka liittyy mnt-irt atribuuttiin\n"
"-c etsi vähin osuma, jolla on mnt-irt-attribuutti\n"
"-x täysosuma\n"
"-b palauta lyhyt osoiteavaruus ja abuse-tietue\n"
"-b palauta lyhyesti IP-osoiteavaruudet ja abuse-tieto\n"
#: ../whois.c:1525
#, c-format
@ -194,10 +201,9 @@ msgid ""
"-G turn off grouping of associated objects\n"
"-d return DNS reverse delegation objects too\n"
msgstr ""
"-B poista objektifiltteröinti (näytä "
"sähköpostiosoitteet)\n"
"-B poista objektisuodatus (näytä sähköpostiosoitteet)\n"
"-G poista objektien ryhmittely\n"
"-d näytä DNS delekointiobjektit\n"
"-d palauta myös DNS-delegointiobjektit\n"
#: ../whois.c:1530
#, c-format
@ -207,10 +213,10 @@ msgid ""
"-K only primary keys are returned\n"
"-r turn off recursive look-ups for contact information\n"
msgstr ""
"-i ATTR[,ATTR]... tee käänteishaku käyttäen ATTRbuutteja\n"
"-T TYYP[,TYYP]... hae ainoastaan tietyn TYYPisiä objekteja\n"
"-K palauta ainoastaan pääavain\n"
"-r älä käytä rekursiota kontaktitiedoille\n"
"-i ATTR[,ATTR]... tee käänteishaku käyttäen ATTRibuutteja\n"
"-T TYYP[,TYYP]... hae ainoastaan tietyn TYYPpisiä objekteja\n"
"-K vain pääavaimet palautetaan\n"
"-r älä käytä rekursiivisia hakuja yhteystiedoille\n"
#: ../whois.c:1536
#, c-format
@ -223,10 +229,11 @@ msgid ""
msgstr ""
"-R pakota näyttämään paikallinen objekti vaikka se\n"
" sisältäisi viitteen\n"
"-a etsi myös tietokantakopioista\n"
"-s KOP[,KOP]... käytä KOPioita\n"
"-g KOP:EKA-VIKA hae päivityksiä KOPioista sarjoista EKAsta VIKAaan\n"
"-a etsi myös kaikista peilatuista tietokannoista\n"
"-s LÄHDE[,LÄHDE]... käytä LÄHTEestä peilattua tietokantaa\n"
"-g LÄHDE:ALKU-LOPPU hae päivityksiä LÄHTEestä sarjasta ALKU-LOPPU\n"
# version|sources|types ovat kirjaimellisesti sitä mitä käyttäjän kuuluu syöttää, niitä ei saa suomentaa.
#: ../whois.c:1543
#, c-format
msgid ""
@ -234,85 +241,85 @@ msgid ""
"-v TYPE request verbose template for object of TYPE\n"
"-q [version|sources|types] query specified server info\n"
msgstr ""
"-t TYYPPI hae mallinne objektille TYYPPI\n"
"-v TYYPPI hae pitkämallinne objektille TYYPPI\n"
"-q [versio|lähde|tyyppi] hae erityisiä palvelin tietoja\n"
"-t TYYPPI hae malline TYYPPIä olevalle objektille\n"
"-v TYYPPI hae laaja malline TYYPPIä olevalle objektille\n"
"-q [version|sources|types] kysele annettua palvelintietoa\n"
#: ../mkpasswd.c:135
msgid "BSDI extended DES-based crypt(3)"
msgstr "BSDI laajennettu DES-salaus, katso crypt(3)"
msgstr "BSDI-laajennettu DES-salaus, crypt(3)"
#: ../mkpasswd.c:138
msgid "standard 56 bit DES-based crypt(3)"
msgstr "standardi 56-bittinen DES-salaus katso crypt(3)"
msgstr "standardi 56-bittinen DES-salaus, crypt(3)"
#: ../mkpasswd.c:207
#, c-format
msgid "Invalid method '%s'.\n"
msgstr "Kelvoton metodi '%s'.\n"
msgstr "Kelvoton menetelmä ”%s”.\n"
#: ../mkpasswd.c:216 ../mkpasswd.c:228
#, c-format
msgid "Invalid number '%s'.\n"
msgstr "Kelvoton numero '%s'.\n"
msgstr "Kelvoton lukuarvo ”%s”.\n"
#: ../mkpasswd.c:246
#, c-format
msgid "Try '%s --help' for more information.\n"
msgstr "Käytä valitsinta '%s --help' lisätietojen saamiseen.\n"
msgstr "Komento ”%s --help” antaa lisää tietoa.\n"
#: ../mkpasswd.c:292
#: ../mkpasswd.c:302
#, c-format
msgid "Wrong salt length: %d byte when %d expected.\n"
msgid_plural "Wrong salt length: %d bytes when %d expected.\n"
msgstr[0] "Väärä suolan pituus: %d tavu, kun %d odotettiin.\n"
msgstr[1] "Väärä suolan pituus: %d tavua, kun %d odotettiin.\n"
msgstr[0] "Väärä suolan pituus: %d tavu, odotettiin %d.\n"
msgstr[1] "Väärä suolan pituus: %d tavua, odotettiin %d.\n"
#: ../mkpasswd.c:297
#: ../mkpasswd.c:307
#, c-format
msgid "Wrong salt length: %d byte when %d <= n <= %d expected.\n"
msgid_plural "Wrong salt length: %d bytes when %d <= n <= %d expected.\n"
msgstr[0] "Väärä suolan pituus: %d tavu, kun %d <= n <= %d odotettiin.\n"
msgstr[1] "Väärä suolan pituus: %d tavua, kun %d <= n <= %d odotettiin.\n"
msgstr[0] "Väärä suolan pituus: %d tavu, odotettiin %d <= n <= %d.\n"
msgstr[1] "Väärä suolan pituus: %d tavua, odotettiin kun %d <= n <= %d.\n"
#: ../mkpasswd.c:306
#: ../mkpasswd.c:316
#, c-format
msgid "Illegal salt character '%c'.\n"
msgstr "Laiton merkki suolassa '%c'.\n"
msgstr "Kielletty suolamerkki %c.\n"
#: ../mkpasswd.c:357 ../mkpasswd.c:370
#: ../mkpasswd.c:372 ../mkpasswd.c:385
#, c-format
msgid "Password: "
msgstr "Salasana: "
#: ../mkpasswd.c:389
#: ../mkpasswd.c:404
#, c-format
msgid "Method not supported by crypt(3).\n"
msgstr "Functio crypt(3) ei tue toimintoa.\n"
msgstr "crypt(3)-funktio ei tue menetelmää.\n"
#: ../mkpasswd.c:497
#: ../mkpasswd.c:512
#, c-format
msgid ""
"Usage: mkpasswd [OPTIONS]... [PASSWORD [SALT]]\n"
"Crypts the PASSWORD using crypt(3).\n"
"\n"
msgstr ""
"Käyttö: mkpasswd [OPTIO] ... [SALASANA] [SUOLA]]\n"
"Salaa SALASANA crypt(3) funktiolla.\n"
"Käyttö: mkpasswd [VALITSIMET] ... [SALASANA] [SUOLA]]\n"
"Salaa SALASANAn crypt(3)-funktiolla.\n"
"\n"
#: ../mkpasswd.c:500
#: ../mkpasswd.c:515
#, c-format
msgid ""
" -m, --method=TYPE select method TYPE\n"
" -5 like --method=md5crypt\n"
" -S, --salt=SALT use the specified SALT\n"
msgstr ""
" -m, --method=TYPE valitse toiminto TYPE\n"
" -m, --method=TYYPPI valitse menetelmä TYYPPI\n"
" -5 sama kuin --method=md5crypt\n"
" -S, --salt=SUOLA suolan valinta\n"
#: ../mkpasswd.c:505
#: ../mkpasswd.c:520
#, c-format
msgid ""
" -R, --rounds=NUMBER use the specified NUMBER of rounds\n"
@ -320,12 +327,12 @@ msgid ""
" instead of /dev/tty\n"
" -s, --stdin like --password-fd=0\n"
msgstr ""
" -R, --rounds=NUMERO pyöristä numeroon\n"
" -P, --password-fd=NUM lue salasana avoimesta tiedostosta NUM\n"
" äläkä terminaalista /dev/tty\n"
" -R, --rounds=MÄÄRÄ käytä annettua kierrosMÄÄRÄä\n"
" -P, --password-fd=NUM lue salasana tiedostokahvasta NUM\n"
" eikä terminaalista /dev/tty\n"
" -s, --stdin sama kuin --password-fd=0\n"
#: ../mkpasswd.c:511
#: ../mkpasswd.c:526
#, c-format
msgid ""
" -h, --help display this help and exit\n"
@ -337,16 +344,17 @@ msgid ""
"\n"
"Report bugs to %s.\n"
msgstr ""
" -h, --help tulosta tämä ruutu\n"
" -V, --version tulosta versio\n"
" -h, --help näytä tämä ohje ja poistu\n"
" -V, --version tulosta versiotiedot ja poistu\n"
"\n"
"Ellei salasanaa määritetä se kysytään.\n"
"Ellei suolaa määritetä käytetään satunnaista.\n"
"Jos tyyppi on 'help', tulostetaan toiminnot.\n"
"Jos SALASANA puuttuu, sitä kysytään vuorovaikutteisesti.\n"
"Jos SUOLAa ei anneta, luodaan satunnainen.\n"
"Jos TYYPPI on ”help”, käytettävissä olevat menetelmät\n"
"tulostetaan.\n"
"\n"
"Lähetä bugiraportit osoitteeseen %s.\n"
#: ../mkpasswd.c:534
#: ../mkpasswd.c:549
#, c-format
msgid "Available methods:\n"
msgstr "Käytettävissä olevat toiminnot:\n"
msgstr "Käytettävissä olevat menetelmät:\n"

371
po/ka.po Normal file
View File

@ -0,0 +1,371 @@
# Georgian translation for whois.
# Copyright (C) 2022 whois authors
# This file is distributed under the same license as the whois package.
# Temuri Doghonadze <temuri.doghonadze@gmail.com>, 2022.
#
msgid ""
msgstr ""
"Project-Id-Version: whois\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-20 04:31+0200\n"
"PO-Revision-Date: 2022-10-20 05:41+0200\n"
"Last-Translator: Temuri Doghonadze <temuri.doghonadze@gmail.com>\n"
"Language-Team: \n"
"Language: ka\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.1.1\n"
#: ../whois.c:240
#, c-format
msgid ""
"Version %s.\n"
"\n"
"Report bugs to %s.\n"
msgstr ""
"ვერსია %s\n"
"\n"
"შეცდომები მიიწერეთ მისამართზე %s.\n"
#: ../whois.c:329
msgid "This TLD has no whois server, but you can access the whois database at"
msgstr ""
"ამ TLD-ს whois სერვერი არ გააჩნია. მაგრამ whois-ის ბაზასთან წვდომა გაქვთ "
"მისამართზე"
#: ../whois.c:334
msgid "This TLD has no whois server."
msgstr "ამ TLD-ს whois სერვერი არ გააჩნია."
#: ../whois.c:337
msgid "No whois server is known for this kind of object."
msgstr "ამ ტიპის ობიექტისთვის whois სერვერი ცნობილი არაა."
#: ../whois.c:340
msgid "Unknown AS number or IP network. Please upgrade this program."
msgstr "უცნობი AS რიცხვი ან IP ქსელი. განაახლეთ ეს პროგრამა."
#: ../whois.c:344 ../whois.c:353 ../whois.c:388 ../whois.c:405
#, c-format
msgid "Using server %s.\n"
msgstr "ვიყენებ სერვერს: %s.\n"
#: ../whois.c:362
#, c-format
msgid ""
"\n"
"Querying for the IPv4 endpoint %s of a 6to4 IPv6 address.\n"
"\n"
msgstr ""
"\n"
"6to4 IPv6 მისამართის IPv4 ბოლო წერტილის (%s) გამოთხოვა.\n"
"\n"
#: ../whois.c:369
#, c-format
msgid ""
"\n"
"Querying for the IPv4 endpoint %s of a Teredo IPv6 address.\n"
"\n"
msgstr ""
"\n"
"Teredo IPv6 მისამართის IPv4 ბოლო წერტილის (%s) გამოთხოვა.\n"
"\n"
#: ../whois.c:406
#, c-format
msgid ""
"Query string: \"%s\"\n"
"\n"
msgstr ""
"მოთხოვნის სტრიქონი: \"%s\"\n"
"\n"
#: ../whois.c:416
#, c-format
msgid ""
"\n"
"\n"
"Found a referral to %s.\n"
"\n"
msgstr ""
"\n"
"\n"
"ნაპოვნია მიმართვა %s-ზე.\n"
"\n"
#: ../whois.c:458 ../whois.c:461
#, c-format
msgid "Cannot parse this line: %s"
msgstr "ამ ხაზის დამუშავება შეუძლებელია: %s"
#: ../whois.c:650
msgid "Warning: RIPE flags used with a traditional server."
msgstr "გაფრთხილება. RIPE-ის ალმები ტრადიციულ სერვერთან ერთად გამოიყენება."
#: ../whois.c:823 ../whois.c:939
msgid ""
"Catastrophic error: disclaimer text has been changed.\n"
"Please upgrade this program.\n"
msgstr ""
"კატასტროფული შეცდომა: შეიცვალა პასუხისმგებლობების ტექსტი.\n"
"საჭიროა ამ პროგრამის განახლება.\n"
#: ../whois.c:1040
#, c-format
msgid "Host %s not found."
msgstr "ჰოსტი %s ვერ ვიპოვე."
#: ../whois.c:1050
#, c-format
msgid "%s/tcp: unknown service"
msgstr "%s/tcp: უცნობი სერვისი"
#: ../whois.c:1125
msgid "Timeout."
msgstr "ლოდინის ვადა გავიდა."
#: ../whois.c:1131
#, c-format
msgid "Interrupted by signal %d..."
msgstr "შეწყდა სიგნალით %d..."
#: ../whois.c:1499
#, c-format
msgid ""
"Usage: whois [OPTION]... OBJECT...\n"
"\n"
"-h HOST, --host HOST connect to server HOST\n"
"-p PORT, --port PORT connect to PORT\n"
"-I query whois.iana.org and follow its referral\n"
"-H hide legal disclaimers\n"
msgstr ""
"გამოყენება: whois [პარამეტრები]... ობიექტი...\n"
"\n"
"-h ჰოსტი, --host ჰოსტი მითითებულ ჰოსტთან მიერთება\n"
"-p პორტი, --port პორტი მითითებულ პორტზე მიერთება\n"
"-I whois.iana.org-ის მოთხოვნა და პასუხის მიყოლა\n"
"-H იურიდიული ტექსტების დამალვა\n"
#: ../whois.c:1506
#, c-format
msgid ""
" --verbose explain what is being done\n"
" --no-recursion disable recursion from registry to registrar "
"servers\n"
" --help display this help and exit\n"
" --version output version information and exit\n"
"\n"
msgstr ""
" --verbose ქმედებების ახსნა მიმდინარე დროში\n"
" --no-recursion რეკურსიის გამორთვა რეესტრის სერვერბს შორის\n"
" --help ამ დახმარების ჩვენება და გასვლა\n"
" --version ვერსიის ინფორმაციის გამოტანა და გასვლა\n"
"\n"
#: ../whois.c:1513
#, c-format
msgid ""
"These flags are supported by whois.ripe.net and some RIPE-like servers:\n"
"-l find the one level less specific match\n"
"-L find all levels less specific matches\n"
"-m find all one level more specific matches\n"
"-M find all levels of more specific matches\n"
msgstr ""
"ეს ალმები მხარდაჭერილია whois.ripe.net-ის და ზოგიერთი RIPE-ის მსგავსი "
"სერვერების მიერ:\n"
"-l ერთდონიანი მინიმალური ძებნა\n"
"-L ყველაფრის მოძებნა მინიმალური დამთხვევებით\n"
"-m მაქსიმალური მითითებული დამთხვევების პირველი დონის "
"მოძებნა\n"
"-M ყველაფრის მოძებნა მაქსიმალური დამთხვევებით\n"
#: ../whois.c:1520
#, c-format
msgid ""
"-c find the smallest match containing a mnt-irt "
"attribute\n"
"-x exact match\n"
"-b return brief IP address ranges with abuse contact\n"
msgstr ""
"-c mnt-irt ატრიბუტის შემცველი უმცირესი დამთხვევის "
"მოძებნა\n"
"-x ზუსტი დამთხვევა\n"
"-b კანონდარღვევს კონტაქტთან ერთად IP მისამართების "
"დიაპაზონების მოკლე სიის დაბრუნება\n"
#: ../whois.c:1525
#, c-format
msgid ""
"-B turn off object filtering (show email addresses)\n"
"-G turn off grouping of associated objects\n"
"-d return DNS reverse delegation objects too\n"
msgstr ""
"-B ობიექტების ფილტრაციის გამორთვა (ელფოსტის "
"მისამართების ჩვენება)\n"
"-G ასოცირებული ობიექტების დაჯგუფების გამორთვა\n"
"-d დაბრუნდება DNS სევერსის დელეგაციის ობექტებიც\n"
#: ../whois.c:1530
#, c-format
msgid ""
"-i ATTR[,ATTR]... do an inverse look-up for specified ATTRibutes\n"
"-T TYPE[,TYPE]... only look for objects of TYPE\n"
"-K only primary keys are returned\n"
"-r turn off recursive look-ups for contact information\n"
msgstr ""
"-i ATTR[,ATTR]... მითითებული ატრბუტების ინვერსიული ძებნა\n"
"-T TYPE[,TYPE]... მხოლოდ მითითებული ტიპის ობიექტების ძებნა\n"
"-K მხოლოდ ძირითადი გასაღებები დაბრუნდება\n"
"-r საკონტაქტო ინფორმაციის რეკურსიული ძებნის გამორთვა\n"
#: ../whois.c:1536
#, c-format
msgid ""
"-R force to show local copy of the domain object even\n"
" if it contains referral\n"
"-a also search all the mirrored databases\n"
"-s SOURCE[,SOURCE]... search the database mirrored from SOURCE\n"
"-g SOURCE:FIRST-LAST find updates from SOURCE from serial FIRST to LAST\n"
msgstr ""
"-R დომენის ობიექტის ლოკალური ასლის ჩვენება მაშინაც კი,\n"
" როცა ის ბმებს შეიცავს\n"
"-a ძებნა სარკულ ბაზებშიაც\n"
"-s SOURCE[,SOURCE]... მითითებული წყაროდან კოპირებულ ბაზაში ძებნა\n"
"-g SOURCE:FIRST-LAST განახლებების ძებნა წყაროდან სერიულად პირველიდან "
"ჩანაწერიდან, ბოლომდე\n"
#: ../whois.c:1543
#, c-format
msgid ""
"-t TYPE request template for object of TYPE\n"
"-v TYPE request verbose template for object of TYPE\n"
"-q [version|sources|types] query specified server info\n"
msgstr ""
"-t TYPE მითითებული ტიპის ობიექტისთვის შაბლონს მოთხოვნა\n"
"-v TYPE მითითებული ტიპის ობიექტისთვის დამატებითი შაბლონის "
"მოთხოვნა\n"
"-q [version(ვერსია)|sources(წყაროები)|types(ტიპები)] სერვერის მითითებული "
"ინფორმაციის მოთხოვნა\n"
#: ../mkpasswd.c:135
msgid "BSDI extended DES-based crypt(3)"
msgstr "BSDI გაფართოებული DES-ზე ბაზირებული crypt(3)"
#: ../mkpasswd.c:138
msgid "standard 56 bit DES-based crypt(3)"
msgstr "სტანდარტული 56 ბიტიანი DES-ზე ბაზირებული crypt(3)"
#: ../mkpasswd.c:207
#, c-format
msgid "Invalid method '%s'.\n"
msgstr "არასწორი მეტოდი '%s'.\n"
#: ../mkpasswd.c:216 ../mkpasswd.c:228
#, c-format
msgid "Invalid number '%s'.\n"
msgstr "არასწორი რიცხვი '%s'.\n"
#: ../mkpasswd.c:246
#, c-format
msgid "Try '%s --help' for more information.\n"
msgstr "მეტი ინფორმაციისთვის სცადეთ '%s --help'\n"
#: ../mkpasswd.c:302
#, c-format
msgid "Wrong salt length: %d byte when %d expected.\n"
msgid_plural "Wrong salt length: %d bytes when %d expected.\n"
msgstr[0] ""
"მარილის არასწორი სიგრძე: %d ბაიტი მაშინ, როცა მოსალოდნელი იყო %d ბაიტი.\n"
msgstr[1] ""
"მარილის არასწორი სიგრძე: %d ბაიტი მაშინ, როცა მოსალოდნელი იყო %d ბაიტი.\n"
#: ../mkpasswd.c:307
#, c-format
msgid "Wrong salt length: %d byte when %d <= n <= %d expected.\n"
msgid_plural "Wrong salt length: %d bytes when %d <= n <= %d expected.\n"
msgstr[0] ""
"მარილის არასწორი სიგრძე: %d ბაიტი მაშინ, როცა მოსალოდნელი იყო %d <= n <= %d "
"ბაიტი.\n"
msgstr[1] ""
"მარილის არასწორი სიგრძე: %d ბაიტი მაშინ, როცა მოსალოდნელი იყო %d <= n <= %d "
"ბაიტი.\n"
#: ../mkpasswd.c:316
#, c-format
msgid "Illegal salt character '%c'.\n"
msgstr "მარილიას დაუშვებელი სიმბოლო: '%c'.\n"
#: ../mkpasswd.c:372 ../mkpasswd.c:385
#, c-format
msgid "Password: "
msgstr "პაროლი: "
#: ../mkpasswd.c:404
#, c-format
msgid "Method not supported by crypt(3).\n"
msgstr "მეთოდი crypt(3)-ის მიერ მხარდაუჭერელია.\n"
#: ../mkpasswd.c:512
#, c-format
msgid ""
"Usage: mkpasswd [OPTIONS]... [PASSWORD [SALT]]\n"
"Crypts the PASSWORD using crypt(3).\n"
"\n"
msgstr ""
"გამოყენება: mkpasswd [პარამეტრები]... [პაროლი [მარილი]]\n"
"მითითებული პაროლის crypt(3)-ით დაშიფვრა.\n"
"\n"
#: ../mkpasswd.c:515
#, c-format
msgid ""
" -m, --method=TYPE select method TYPE\n"
" -5 like --method=md5crypt\n"
" -S, --salt=SALT use the specified SALT\n"
msgstr ""
" -m, --method=ტიპი მითითებული ტიპის მეთოდის გამოყენება\n"
" -5 იგივე, რაც --method=md5crypt\n"
" -S, --salt=მარილი მითითებული მარილის გამოყენება\n"
#: ../mkpasswd.c:520
#, c-format
msgid ""
" -R, --rounds=NUMBER use the specified NUMBER of rounds\n"
" -P, --password-fd=NUM read the password from file descriptor NUM\n"
" instead of /dev/tty\n"
" -s, --stdin like --password-fd=0\n"
msgstr ""
" -R, --rounds=რიცხვი მითითებული რაოდენობის რაუნდების გამოყენება\n"
" -P, --password-fd=რცხვ პაროლების /dev/tty-ის მაგიერ მითითებული "
"ფაილის\n"
" დესკრიპტორიდან წაკითხვა\n"
" -s, --stdin იგივე, რაც --password-fd=0\n"
#: ../mkpasswd.c:526
#, c-format
msgid ""
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n"
"\n"
"If PASSWORD is missing then it is asked interactively.\n"
"If no SALT is specified, a random one is generated.\n"
"If TYPE is 'help', available methods are printed.\n"
"\n"
"Report bugs to %s.\n"
msgstr ""
" -h, --help ამ დახმარების გამოტანა და გასვლა\n"
" -V, --version ვერსიის ინფორმაციის გამოტანა და გასვლა\n"
"\n"
"თუ პაროლი მითითებული არაა, მას ინტერაქტიურად გკითხავთ.\n"
"თუ მარილი მითითებული არაა, ის შემთხვევითობის წესით დაგენერირდება.\n"
" თუ ტიპი 'help'-ა, ეკრანზე იქნება ნაჩვენები ხელმისაწვდომი მეთოდები.\n"
"\n"
"შეცდომების შესახებ მიწერეთ: %s.\n"
#: ../mkpasswd.c:549
#, c-format
msgid "Available methods:\n"
msgstr "ხელმისაწვდომი მეთოდები:\n"

View File

@ -1,14 +1,14 @@
# Polish translation for whois.
# Michał 'CeFeK' Nazarewicz <cefek@career.pl>, 1999
# Przemysław Knycz <djrzulf@pld.org.pl>, 2003
# Jakub Bogusz <qboosh@pld-linux.org>, 2003-2019
# Jakub Bogusz <qboosh@pld-linux.org>, 2003-2023
#
msgid ""
msgstr ""
"Project-Id-Version: whois 5.5.1\n"
"Project-Id-Version: whois 5.5.18\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-03 17:52+0100\n"
"PO-Revision-Date: 2019-08-28 18:02+0200\n"
"PO-Revision-Date: 2023-10-05 21:30+0200\n"
"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
"Language: pl\n"
@ -149,7 +149,7 @@ msgstr ""
"-H ukrycie oświadczeń prawnych\n"
#: ../whois.c:1506
#, fuzzy, c-format
#, c-format
msgid ""
" --verbose explain what is being done\n"
" --no-recursion disable recursion from registry to registrar servers\n"
@ -158,6 +158,7 @@ msgid ""
"\n"
msgstr ""
" --verbose wyjaśnianie, co się dzieje\n"
" --no-recursion wyłączenie rekurencji z serwerów rejestru do rejestratorów\n"
" --help wyświetlenie tego opisu i zakończenie działania\n"
" --version wyświetlenie informacji o wersji i zakończenie "
"działania\n"

357
po/tr.po Normal file
View File

@ -0,0 +1,357 @@
# translation of whois to Turkish
# Copyright (C) 2022
# This file is distributed under the same license as the whois package.
# Oğuz Ersen <oguz@ersen.moe>, 2022.
#
msgid ""
msgstr ""
"Project-Id-Version: whois\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-01 22:10+0300\n"
"PO-Revision-Date: 2022-04-01 23:06+0300\n"
"Last-Translator: Oğuz Ersen <oguz@ersen.moe>\n"
"Language-Team: \n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
#: ../whois.c:240
#, c-format
msgid ""
"Version %s.\n"
"\n"
"Report bugs to %s.\n"
msgstr ""
"Sürüm %s.\n"
"\n"
"Hataları %s adresine bildirin.\n"
#: ../whois.c:329
msgid "This TLD has no whois server, but you can access the whois database at"
msgstr ""
"Bu TLD'nin whois sunucusu yok, ancak whois veri tabanına şu adresten "
"erişebilirsiniz"
#: ../whois.c:334
msgid "This TLD has no whois server."
msgstr "Bu TLD'nin whois sunucusu yok."
#: ../whois.c:337
msgid "No whois server is known for this kind of object."
msgstr "Bu tür nesneler için bilinen bir whois sunucusu yok."
#: ../whois.c:340
msgid "Unknown AS number or IP network. Please upgrade this program."
msgstr "Bilinmeyen AS numarası veya IP ağı. Lütfen bu programı güncelleyin."
#: ../whois.c:344 ../whois.c:353 ../whois.c:388 ../whois.c:405
#, c-format
msgid "Using server %s.\n"
msgstr "%s sunucusu kullanılıyor.\n"
#: ../whois.c:362
#, c-format
msgid ""
"\n"
"Querying for the IPv4 endpoint %s of a 6to4 IPv6 address.\n"
"\n"
msgstr ""
"\n"
"6to4 IPv6 adresinin IPv4 uç noktası %s sorgulanıyor.\n"
"\n"
#: ../whois.c:369
#, c-format
msgid ""
"\n"
"Querying for the IPv4 endpoint %s of a Teredo IPv6 address.\n"
"\n"
msgstr ""
"\n"
"Teredo IPv6 adresinin IPv4 uç noktası %s sorgulanıyor.\n"
"\n"
#: ../whois.c:406
#, c-format
msgid ""
"Query string: \"%s\"\n"
"\n"
msgstr ""
"Sorgu dizgesi: \"%s\"\n"
"\n"
#: ../whois.c:416
#, c-format
msgid ""
"\n"
"\n"
"Found a referral to %s.\n"
"\n"
msgstr ""
"\n"
"\n"
"%s için bir yönlendirme bulundu.\n"
"\n"
#: ../whois.c:458 ../whois.c:461
#, c-format
msgid "Cannot parse this line: %s"
msgstr "Bu satır ayrıştırılamıyor: %s"
#: ../whois.c:650
msgid "Warning: RIPE flags used with a traditional server."
msgstr "Uyarı: Geleneksel bir sunucuyla RIPE bayrakları kullanıldı."
#: ../whois.c:823 ../whois.c:939
msgid ""
"Catastrophic error: disclaimer text has been changed.\n"
"Please upgrade this program.\n"
msgstr ""
"Önemli hata: sorumluluk reddi metni değiştirildi.\n"
"Lütfen bu programı güncelleyin.\n"
#: ../whois.c:1040
#, c-format
msgid "Host %s not found."
msgstr "%s sunucusu bulunamadı."
#: ../whois.c:1050
#, c-format
msgid "%s/tcp: unknown service"
msgstr "%s/tcp: bilinmeyen hizmet"
#: ../whois.c:1125
msgid "Timeout."
msgstr "Zaman aşımı."
#: ../whois.c:1131
#, c-format
msgid "Interrupted by signal %d..."
msgstr "%d sinyali tarafından kesildi..."
#: ../whois.c:1499
#, c-format
msgid ""
"Usage: whois [OPTION]... OBJECT...\n"
"\n"
"-h HOST, --host HOST connect to server HOST\n"
"-p PORT, --port PORT connect to PORT\n"
"-I query whois.iana.org and follow its referral\n"
"-H hide legal disclaimers\n"
msgstr ""
"Kullanım: whois [SEÇENEK]... NESNE...\n"
"\n"
"-h HOST, --host HOST HOST sunucusuna bağlan\n"
"-p PORT, --port PORT PORT bağlantı noktasına bağlan\n"
"-I whois.iana.org'u sorgula ve yönlendirmesini takip et\n"
"-H yasal uyarıları gizle\n"
#: ../whois.c:1506
#, c-format
msgid ""
" --verbose explain what is being done\n"
" --no-recursion disable recursion from registry to registrar servers\n"
" --help display this help and exit\n"
" --version output version information and exit\n"
"\n"
msgstr ""
" --verbose ne yapıldığınııkla\n"
" --no-recursion kayıt defterinden kayıt sunucularına özyinelemeyi "
"devre dışı bırak\n"
" --help bu yardımı görüntüle ve çık\n"
" --version sürüm bilgisini yazdır ve çık\n"
"\n"
#: ../whois.c:1513
#, c-format
msgid ""
"These flags are supported by whois.ripe.net and some RIPE-like servers:\n"
"-l find the one level less specific match\n"
"-L find all levels less specific matches\n"
"-m find all one level more specific matches\n"
"-M find all levels of more specific matches\n"
msgstr ""
"Bu bayraklar whois.ripe.net ve bazı RIPE benzeri sunucular tarafından "
"desteklenmektedir:\n"
"-l bir seviye daha az özel eşleşmeyi bul\n"
"-L tüm seviyelerde daha az özel eşleşmeleri bul\n"
"-m tüm bir seviye daha özel eşleşmeleri bul\n"
"-M tüm seviyelerde daha özel eşleşmeleri bul\n"
#: ../whois.c:1520
#, c-format
msgid ""
"-c find the smallest match containing a mnt-irt "
"attribute\n"
"-x exact match\n"
"-b return brief IP address ranges with abuse contact\n"
msgstr ""
"-c mnt-irt özniteliği içeren en küçük eşleşmeyi bul\n"
"-x tam olarak eşleş\n"
"-b kötüye kullanım irtibatıyla kısa IP adresi "
"aralıklarını döndür\n"
#: ../whois.c:1525
#, c-format
msgid ""
"-B turn off object filtering (show email addresses)\n"
"-G turn off grouping of associated objects\n"
"-d return DNS reverse delegation objects too\n"
msgstr ""
"-B nesne filtrelemeyi kapat (e-posta adreslerini "
"göster)\n"
"-G ilişkili nesnelerin gruplandırılmasını kapat\n"
"-d DNS ters yetki nesnelerini de döndür\n"
#: ../whois.c:1530
#, c-format
msgid ""
"-i ATTR[,ATTR]... do an inverse look-up for specified ATTRibutes\n"
"-T TYPE[,TYPE]... only look for objects of TYPE\n"
"-K only primary keys are returned\n"
"-r turn off recursive look-ups for contact information\n"
msgstr ""
"-i ÖZNİ[,ÖZNİ]... belirtilen ÖZNİtelikler için ters arama yap\n"
"-T TÜR[,TÜR]... yalnızca TÜR nesnelerini ara\n"
"-K yalnızca birincil anahtarları döndür\n"
"-r iletişim bilgileri için özyinelemeli aramaları kapat\n"
#: ../whois.c:1536
#, c-format
msgid ""
"-R force to show local copy of the domain object even\n"
" if it contains referral\n"
"-a also search all the mirrored databases\n"
"-s SOURCE[,SOURCE]... search the database mirrored from SOURCE\n"
"-g SOURCE:FIRST-LAST find updates from SOURCE from serial FIRST to LAST\n"
msgstr ""
"-R yönlendirme içerse bile etki alanı nesnesinin yerel\n"
" kopyasını göstermeye zorla\n"
"-a ayrıca tüm yansıtılmış veri tabanlarında arama yap\n"
"-s KAYNAK[,KAYNAK]... KAYNAK'tan yansıtılan veri tabanında arama yap\n"
"-g KAYNAK:İLK-SON KAYNAK'tan İLK'ten SON'a kadar olan güncellemeleri "
"bul\n"
#: ../whois.c:1543
#, c-format
msgid ""
"-t TYPE request template for object of TYPE\n"
"-v TYPE request verbose template for object of TYPE\n"
"-q [version|sources|types] query specified server info\n"
msgstr ""
"-t TÜR TÜR nesnesi için şablon iste\n"
"-v TÜR TÜR nesnesi için ayrıntılı şablon iste\n"
"-q [version|sources|types] belirtilen sunucu bilgilerini sorgula\n"
#: ../mkpasswd.c:135
msgid "BSDI extended DES-based crypt(3)"
msgstr "BSDI genişletilmiş DES tabanlı crypt(3)"
#: ../mkpasswd.c:138
msgid "standard 56 bit DES-based crypt(3)"
msgstr "standart 56 bit DES tabanlı crypt(3)"
#: ../mkpasswd.c:207
#, c-format
msgid "Invalid method '%s'.\n"
msgstr "Geçersiz yöntem '%s'.\n"
#: ../mkpasswd.c:216 ../mkpasswd.c:228
#, c-format
msgid "Invalid number '%s'.\n"
msgstr "Geçersiz sayı '%s'.\n"
#: ../mkpasswd.c:246
#, c-format
msgid "Try '%s --help' for more information.\n"
msgstr "Daha fazla bilgi için '%s --help' komutunu deneyin.\n"
#: ../mkpasswd.c:302
#, c-format
msgid "Wrong salt length: %d byte when %d expected.\n"
msgid_plural "Wrong salt length: %d bytes when %d expected.\n"
msgstr[0] "Yanlış salt uzunluğu: %d bayt, beklenen: %d.\n"
#: ../mkpasswd.c:307
#, c-format
msgid "Wrong salt length: %d byte when %d <= n <= %d expected.\n"
msgid_plural "Wrong salt length: %d bytes when %d <= n <= %d expected.\n"
msgstr[0] "Yanlış salt uzunluğu: %d bayt, beklenen: %d <= n <= %d.\n"
#: ../mkpasswd.c:316
#, c-format
msgid "Illegal salt character '%c'.\n"
msgstr "Geçersiz salt karakteri '%c'.\n"
#: ../mkpasswd.c:372 ../mkpasswd.c:385
#, c-format
msgid "Password: "
msgstr "Parola: "
#: ../mkpasswd.c:404
#, c-format
msgid "Method not supported by crypt(3).\n"
msgstr "Yöntem crypt(3) tarafından desteklenmiyor.\n"
#: ../mkpasswd.c:512
#, c-format
msgid ""
"Usage: mkpasswd [OPTIONS]... [PASSWORD [SALT]]\n"
"Crypts the PASSWORD using crypt(3).\n"
"\n"
msgstr ""
"Kullanım: mkpasswd [SEÇENEKLER]... [PAROLA [SALT]]\n"
"PAROLA değerini crypt(3) kullanarak şifreler.\n"
"\n"
#: ../mkpasswd.c:515
#, c-format
msgid ""
" -m, --method=TYPE select method TYPE\n"
" -5 like --method=md5crypt\n"
" -S, --salt=SALT use the specified SALT\n"
msgstr ""
" -m, --method=TÜR TÜR yöntemini seç\n"
" -5 --method=md5crypt ile aynı\n"
" -S, --salt=SALT belirtilen SALT değerini kullan\n"
#: ../mkpasswd.c:520
#, c-format
msgid ""
" -R, --rounds=NUMBER use the specified NUMBER of rounds\n"
" -P, --password-fd=NUM read the password from file descriptor NUM\n"
" instead of /dev/tty\n"
" -s, --stdin like --password-fd=0\n"
msgstr ""
" -R, --rounds=SAYI belirtilen SAYI kadar tur kullan\n"
" -P, --password-fd=NUM parolayı /dev/tty yerine NUM dosya\n"
" tanıtıcısından oku\n"
" -s, --stdin --password-fd=0 ile aynı\n"
#: ../mkpasswd.c:526
#, c-format
msgid ""
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n"
"\n"
"If PASSWORD is missing then it is asked interactively.\n"
"If no SALT is specified, a random one is generated.\n"
"If TYPE is 'help', available methods are printed.\n"
"\n"
"Report bugs to %s.\n"
msgstr ""
" -h, --help bu yardımı görüntüle ve çık\n"
" -V, --version sürüm bilgisini yazdır ve çık\n"
"\n"
"PAROLA eksikse etkileşimli olarak sorulur.\n"
"SALT belirtilmezse, rastgele bir tane oluşturulur.\n"
"TÜR 'help' ise kullanılabilir yöntemler yazdırılır.\n"
"\n"
"Hataları %s adresine bildirin.\n"
#: ../mkpasswd.c:549
#, c-format
msgid "Available methods:\n"
msgstr "Kullanılabilir yöntemler:\n"

View File

@ -1,90 +0,0 @@
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

View File

@ -1,4 +1,6 @@
# server name charset optional parameters
# server name encoding optional parameters
whois.afrinic.net utf-8
whois.apnic.net iso-8859-1
whois.cat utf-8 -C UTF-8
whois.conac.cn utf-8
whois.corenic.net utf-8 -C UTF-8
@ -6,7 +8,11 @@ whois.online.rs.corenic.net utf-8 -C UTF-8
whois.site.rs.corenic.net utf-8 -C UTF-8
whois.lacnic.net utf-8
whois.museum utf-8 -C UTF-8
whois.ripe.net iso-8859-1
whois.ripe.net utf-8 --charset UTF-8
whois.nic.llyw.cymru utf-8
whois.nic.gov.scot utf-8
whois.nic.gov.wales utf-8
whois.aeda.net.ae utf-8
whois.nic.ar utf-8
@ -16,11 +22,11 @@ whois.cira.ca utf-8
whois.nic.ch utf-8
whois.nic.cl utf-8
whois.cnnic.cn utf-8
cwhois.cnnic.cn utf-8
whois.nic.cz utf-8
whois.denic.de utf-8
whois.enum.denic.de utf-8
whois.dk-hostmaster.dk utf-8 --charset=utf-8
whois.punktum.dk utf-8 --charset=utf-8
whois.tld.ee utf-8
whois.eu utf-8
whois.fi iso-8859-1
@ -32,9 +38,9 @@ whois.nic.hu iso-8859-1
whois.nic.ir utf-8
whois.isnic.is iso-8859-1
whois.nic.it utf-8
whois.jprs.jp iso-2022-jp
whois.jprs.jp utf-8
whois.nic.ad.jp iso-2022-jp
whois.domain.kg cp1251
whois.kg cp1251
whois.nic.or.kr utf-8
whois.kr utf-8
whois.nic.kz utf-8
@ -57,8 +63,10 @@ whois.sgnic.sg utf-8
whois.tld.sy utf-8
whois.thains.co.th utf-8
whois.ati.tn utf-8
whois.nic.tr iso-8859-9
whois.trabis.gov.tr utf-8
whois.twnic.net.tw utf-8
whois.nic.ac.uk utf-8
whois.gov.uk utf-8
whois.biz.ua utf-8
whois.co.ua utf-8
whois.pp.ua utf-8

View File

@ -1,5 +1,5 @@
/*
* Copyright 2009 by Marco d'Itri <md@linux.it>.
* Copyright (C) by Marco d'Itri <md@linux.it>.
*
* simple_recode was inspired by a similar function found in Simon
* Josefsson's libidn.
@ -15,8 +15,9 @@
* 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* with this program; if not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <stdlib.h>
@ -72,7 +73,7 @@ char *simple_recode(const iconv_t handle, const char *str)
size_t err = iconv(handle, &inp, &inbytes_remaining, &outp,
&outbytes_remaining);
if (err != -1)
if (err != (size_t) -1)
break; /* success */
switch (errno) {

View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef SIMPLE_RECODE_H
#define SIMPLE_RECODE_H

View File

@ -1,4 +1,4 @@
# http://www.iana.org/domains/root/db/
# https://www.iana.org/domains/root/db/
#
# Domain names MUST be lowercase and MUST begin with "." or "-".
# First match wins.
@ -37,8 +37,15 @@
.za.org whois.za.org
.org whois.pir.org
# Technically these are SLDs of new gTLDs (hence listed in new_gtlds_list),
# but the registrar (JISC) asked to add the servers for these
# government-related domains.
.llyw.cymru whois.nic.llyw.cymru
.gov.scot whois.nic.gov.scot
.gov.wales whois.nic.gov.wales
.edu whois.educause.edu
.gov whois.dotgov.gov
.gov whois.nic.gov
.int whois.iana.org
.mil NONE
@ -52,26 +59,26 @@
.biz whois.nic.biz
.cat whois.nic.cat
.coop whois.nic.coop
.info whois.afilias.net
.jobs whois.nic.jobs
.mobi whois.afilias.net
.info NONE
.jobs NONE
.mobi NONE
.museum whois.nic.museum
.name whois.nic.name
.post whois.dotpostregistry.net
.pro whois.nic.pro
.post whois.nic.post
.pro NONE
.tel whois.nic.tel
.travel whois.nic.travel
.travel NONE
.xxx whois.nic.xxx
.ac whois.nic.ac
.ad NONE # www.nic.ad
.ad whois.nic.ad
.ae whois.aeda.net.ae
.af whois.nic.af
.ag whois.nic.ag
.ai whois.nic.ai
.al NONE # www.akep.al
.am whois.amnic.net
.ao WEB https://www.dns.ao/ao/gca/index.php?id=19 # www.dns.ao
.ao WEB https://www.dns.ao/ao/whois/ # www.dns.ao
.aq NONE # 2day.com
.ar whois.nic.ar
.as whois.nic.as
@ -81,18 +88,18 @@
.aw whois.nic.aw
.ax whois.ax # www.ax
.gov.az WEB https://www.gov.az/
.az WEB http://whois.az/
.ba WEB http://www.nic.ba/stream/whois/
.bb WEB http://whois.telecoms.gov.bb/search_domain.php
.bd WEB http://www.registry.com.bd/whois.php
.az WEB https://whois.az/
.ba WEB https://nic.ba/
.bb WEB https://whois.telecoms.gov.bb/
.bd WEB https://bdia.btcl.com.bd/
.be whois.dns.be
.bf NONE # http://www.arce.bf/ http://www.onatel.bf/internet/domaine.htm
.bf whois.registre.bf # http://www.arcep.bf/noms-de-domaine/
.bg whois.register.bg
.bh whois.nic.bh
.bi whois1.nic.bi
.bj whois.nic.bj
#.bl
.bm whois.afilias-srs.net
.bm whois.nic.bm
.bn whois.bnnic.bn
.bo whois.nic.bo
#.bq
@ -102,67 +109,67 @@
.bv NONE # http://www.norid.no/domenenavnbaser/bv-sj.html
.by whois.cctld.by
.bw whois.nic.net.bw
.bz AFILIAS
.bz RECURSIVE whois.identitydigital.services
.co.ca whois.co.ca
.ca whois.cira.ca
.cc VERISIGN ccwhois.verisign-grs.com
.cd NONE
.cd whois.nic.cd
.cf NONE
.cg NONE # www.nic.cg
.ch whois.nic.ch
.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 http://www.nic.cu/
.cv WEB http://www.dns.cv/
.cu WEB https://www.nic.cu/
.cv whois.nic.cv
.cw NONE # https://www.uoc.cw/cw-registry
.cx whois.nic.cx
.cy WEB https://www.nic.cy/cy-ui/home
.cz whois.nic.cz
.de whois.denic.de
.dj NONE # http://www.dj/
.dk whois.dk-hostmaster.dk
.dm whois.nic.dm
.dk whois.punktum.dk
.dm whois.dmdomains.dm
.do whois.nic.do
.dz whois.nic.dz
.ec whois.nic.ec
.ee whois.tld.ee
.eg NONE # http://lookup.egregistry.eg/english.aspx
.eg NONE # https://domain.eg/
#.eh
.er NONE # http://www.afridns.org/er/tld_er.txt
.es WEB https://www.nic.es/
.es WEB https://www.dominios.es/en
.et NONE # http://www.ethionet.et/
.eu whois.eu
.fi whois.fi
.fj whois.usp.ac.fj
.fj www.whois.fj
.fk NONE # http://www.fidc.co.fk/
.fm whois.nic.fm
.fo whois.nic.fo
.fr whois.nic.fr
.ga WEB http://www.my.ga/en/whois.html
.ga whois.nic.ga
.gb NONE
.gd whois.nic.gd
.ge whois.nic.ge
.gf whois.mediaserv.net
.gg whois.gg
.gh whois.nic.gh
.gi whois2.afilias-grs.net
.gi whois.identitydigital.services
.gl whois.nic.gl
.gm WEB http://www.nic.gm/htmlpages/whois.htm
.gn NONE # http://www.psg.com/dns/gn/
.gn whois.ande.gov.gn
.gp whois.nic.gp
.gq whois.dominio.gq
.gr WEB https://grweb.ics.forth.gr/public/whois
.gq WEB http://www.dominio.gq/en/whois.html
.gr WEB https://grweb.ics.forth.gr/public/whois?lang=en
.gs whois.nic.gs
.gt WEB http://www.gt/
.gu WEB http://gadao.gov.gu/domainsearch.htm
.gw WEB http://nic.gw/en/whois/
.gt WEB https://www.gt/sitio/?lang=en
.gu NONE
.gw WEB https://registar.nic.gw/en/whois/
.gy whois.registry.gy
.hk whois.hkirc.hk
.hm whois.registry.hm
@ -174,7 +181,7 @@
.ie whois.weare.ie
.il whois.isoc.org.il
.im whois.nic.im
.in whois.registry.in
.in whois.nixiregistry.in
.io whois.nic.io
.iq whois.cmc.iq # http://www.cmc.iq/en/iq.html
.ir whois.nic.ir
@ -182,7 +189,7 @@
.it whois.nic.it
.je whois.je
.jm NONE # http://myspot.mona.uwi.edu/mits/
.jo WEB https://www.dns.jo/en.aspx
.jo WEB https://www.domain.jo/FirstPageen.aspx
.jp whois.jprs.jp
.ke whois.kenic.or.ke
.kg whois.kg
@ -197,7 +204,7 @@
.kz whois.nic.kz
.la whois.nic.la
.lb whois.lbdr.org.lb
.lc whois2.afilias-grs.net
.lc RECURSIVE whois.identitydigital.services
.li whois.nic.li
.lk whois.nic.lk
.lr NONE # http://www.psg.com/dns/lr/
@ -207,23 +214,23 @@
.lv whois.nic.lv
.ly whois.nic.ly
.ma whois.registre.ma
.mc NONE # www.nic.mc
.mc whois.nic.mc
.md whois.nic.md
.me whois.nic.me # afilias
.me RECURSIVE whois.nic.me # whois.identitydigital.services
#.mf
.mg whois.nic.mg
.mh NONE # www.nic.net.mh
.mk whois.marnet.mk
.ml whois.dot.ml # www.point.ml
.ml whois.nic.ml
.mm whois.registry.gov.mm
.mn whois.nic.mn
.mo WEB http://www.monic.mo/ # whois.monic.mo is restricted
.mo WEB https://www.monic.mo/monic/faces/whois # whois.monic.mo is restricted
.mp NONE # get.mp
.mq whois.mediaserv.net
.mr whois.nic.mr
.ms whois.nic.ms
.mt WEB https://www.nic.org.mt/dotmt/ # whois.nic.org.mt is restricted
.mu whois.nic.mu
.mt whois.nic.org.mt
.mu whois.tld.mu
.mv NONE # NIC? www.dhiraagu.com.mv
.mw whois.nic.mw
.mx whois.mx
@ -234,31 +241,31 @@
.ne NONE # NIC? http://www.intnet.ne
.nf whois.nic.nf
.ng whois.nic.net.ng
.ni WEB http://www.nic.ni/
.ni WEB https://www.nic.ni/
.nl whois.domain-registry.nl
.no whois.norid.no
.np WEB https://register.com.np/whois-lookup
.nr WEB http://www.cenpac.net.nr/dns/whois.html
.nr WEB https://www.cenpac.net.nr/dns/whois.html
.nu whois.iis.nu
.nz whois.srs.net.nz
.nz whois.irs.net.nz
.om whois.registry.om
.pa WEB http://www.nic.pa/
.pa WEB http://www.nic.pa/en
.pe kero.yachay.pe
.pf whois.registry.pf
.pg NONE # http://www.unitech.ac.pg/
.edu.ph WEB http://services.ph.net/dns/query.pl
.pg whois.nic.pg # https://www.unitech.ac.pg/icts-dns/
.edu.ph WEB https://services.ph.net/dnshosting/dnshostingquery.pl
.gov.ph NONE # http://dns.gov.ph/
.ph WEB https://whois.dot.ph/
.pk WEB http://www.pknic.net.pk/
.pk whois.pknic.net.pk
.co.pl whois.co.pl # "unofficial" SLD
.pl whois.dns.pl
.pm whois.nic.pm
.pn WEB http://www.pitcairn.pn/PnRegistry/
.pr whois.afilias-srs.net
.ps whois.pnina.ps
.pn WEB https://www.nic.pn/
.pr RECURSIVE whois.nic.pr # whois.identitydigital.services
.ps WEB https://www.pnina.ps/
.pt whois.dns.pt
.pw whois.nic.pw
.py WEB http://www.nic.py/consulta-datos.php
.py WEB https://www.nic.py/consultdompy.php
.qa whois.registry.qa
.re whois.nic.re
.ro whois.rotld.ro
@ -276,8 +283,8 @@
.rw whois.ricta.org.rw # http://www.ricta.org.rw/
.sa whois.nic.net.sa
.sb whois.nic.net.sb
.sc whois2.afilias-grs.net # www.nic.sc
.sd NONE
.sc whois.nic.sc
.sd whois.nic.sd
.se whois.iis.se
.sg whois.sgnic.sg
.sh whois.nic.sh
@ -288,14 +295,14 @@
.sm whois.nic.sm
.sn whois.nic.sn
.so whois.nic.so
.sr NONE # www.register.sr
.sr whois.sr # https://isp.datasur.sr/
.ss whois.nic.ss
.st whois.nic.st
.msk.su whois.flexireg.net
.nov.su whois.flexireg.net
.spb.su whois.flexireg.net
.su whois.tcinet.ru
.sv WEB http://www.svnet.org.sv/
.sv WEB https://svnet.sv/
.sx whois.sx
.sy whois.tld.sy
.sz NONE # http://www.sispa.org.sz/
@ -309,10 +316,10 @@
.tl whois.nic.tl
.tm whois.nic.tm
.tn whois.ati.tn
.to whois.tonic.to
.tr whois.nic.tr
.tt WEB http://www.nic.tt/cgi-bin/search.pl
.tv VERISIGN tvwhois.verisign-grs.com
.to whois.tonicregistry.to
.tr whois.trabis.gov.tr
.tt WEB https://www.nic.tt/cgi-bin/search.pl
.tv RECURSIVE whois.nic.tv
.tw whois.twnic.net.tw
.tz whois.tznic.or.tz
.biz.ua whois.biz.ua
@ -320,106 +327,104 @@
.pp.ua whois.pp.ua
.ua whois.ua
.ug whois.co.ug
.ac.uk whois.ja.net
.bl.uk NONE
.british-library.uk NONE
.gov.uk whois.ja.net
.icnet.uk NONE
.jet.uk NONE
.ac.uk whois.nic.ac.uk
.gov.uk whois.gov.uk
.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
.us whois.nic.us
.com.uy WEB https://nic.com.uy/public/consulta-whois/acceder.action
.uy whois.nic.org.uy
.com.uy WEB https://nic.com.uy/consulta-whois
.gub.uy WEB https://www.dominios.gub.uy/
.mil.uy WEB https://www.dominios.gub.uy/
.uy WEB https://www.nic.uy/
.uz whois.cctld.uz
.va NONE
.vc whois2.afilias-grs.net
.vc RECURSIVE whois.identitydigital.services
.ve whois.nic.ve
.vg whois.nic.vg
.vi WEB https://secure.nic.vi/whois-lookup/
.vi whois.nic.vi
.vn WEB http://www.vnnic.vn/en
.vu whois.dnrs.vu
.wf whois.nic.wf
.ws whois.website.ws
.ye NONE # NIC? http://www.y.net.ye/services/domain_name.htm
.ye whois.y.net.ye
.yt whois.nic.yt
.ac.za whois.ac.za
.alt.za whois.alt.za
.alt.za WEB https://whois.alt.za/
.co.za whois.registry.net.za
.edu.za WEB https://whois.edu.za/
.gov.za whois.gov.za
.net.za net-whois.registry.net.za
.org.za org-whois.registry.net.za
.web.za web-whois.registry.net.za
.za NONE # http://www.zadna.org.za/content/page/domain-information
.za whois.nic.za
.zm whois.zicta.zm
.zw NONE # http://www.zispa.co.zw/
# AW means that I had to guess the whois server name, but I was not able
# to find any registered subdomains to verify it.
.xn--2scrj9c whois.registry.in # India
.xn--2scrj9c whois.nixiregistry.in # India
.xn--3e0b707e whois.kr # Korea, Republic of
.xn--3hcrj9c whois.registry.in # India
.xn--45br5cyl whois.registry.in # India
.xn--45brj9c whois.registry.in # India, Bengali
.xn--3hcrj9c whois.nixiregistry.in # India
.xn--45br5cyl whois.nixiregistry.in # India
.xn--45brj9c whois.nixiregistry.in # India, Bengali
.xn--4dbrk0ce whois.isoc.org.il # Israel
.xn--54b7fta0cc NONE # Bangladesh
.xn--54b7fta0cc WEB https://bdia.btcl.com.bd/ # Bangladesh
.xn--80ao21a whois.nic.kz # Kazakhstan
.xn--90a3ac whois.rnids.rs # Serbia
.xn--90ae whois.imena.bg # Bulgaria
.xn--90ais whois.cctld.by # Belarus
.xn--clchc0ea0b2g2a9gcd whois.sgnic.sg # Singapore, Tamil
.xn--clchc0ea0b2g2a9gcd whois.ta.sgnic.sg # Singapore, Tamil
.xn--d1alf whois.marnet.mk # Macedonia
.xn--e1a4c whois.eu # European Union, Cyrillic
.xn--fiqs8s cwhois.cnnic.cn # China, Simplified Chinese
.xn--fiqz9s cwhois.cnnic.cn # China, Traditional Chinese
.xn--fpcrj9c3d whois.registry.in # India, Telugu
.xn--fiqs8s whois.cnnic.cn # China, Simplified Chinese
.xn--fiqz9s whois.cnnic.cn # China, Traditional Chinese
.xn--fpcrj9c3d whois.nixiregistry.in # India, Telugu
.xn--fzc2c9e2c whois.nic.lk # Sri Lanka, Sinhala
.xn--gecrj9c whois.registry.in # India, Gujarati
.xn--h2breg3eve whois.registry.in # India
.xn--h2brj9c8c whois.registry.in # India
.xn--h2brj9c whois.registry.in # India, Hindi
.xn--gecrj9c whois.nixiregistry.in # India, Gujarati
.xn--h2breg3eve whois.nixiregistry.in # India
.xn--h2brj9c8c whois.nixiregistry.in # India
.xn--h2brj9c whois.nixiregistry.in # India, Hindi
.xn--j1amh whois.dotukr.com # Ukraine
.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
.xn--mgbaam7a8h whois.aeda.net.ae # United Arab Emirates
.xn--mgbah1a3hjkrd whois.nic.mr # Mauritania
.xn--mgbai9azgqp6j NONE # Pakistan
.xn--mgbayh7gpa WEB https://www.dns.jo/en.aspx # Jordan
.xn--mgbbh1a71e whois.registry.in # India, Urdu
.xn--mgbbh1a whois.registry.in # India
.xn--mgbayh7gpa WEB https://www.domain.jo/FirstPageen.aspx # Jordan
.xn--mgbbh1a71e whois.nixiregistry.in # India, Urdu
.xn--mgbbh1a whois.nixiregistry.in # India
.xn--mgbc0a9azcg NONE # Morocco
.xn--mgbcpq6gpa1a NONE # Bahrain
.xn--mgberp4a5d4ar whois.nic.net.sa # Saudi Arabia
.xn--mgbgu82a whois.registry.in # India
.xn--mgbgu82a whois.nixiregistry.in # India
.xn--mgbpl2fh NONE # Sudan
.xn--mgbtx2b whois.cmc.iq # Iraq
.xn--mgbx4cd0ab whois.mynic.my # Malaysia AW
.xn--mix891f WEB http://www.monic.mo/ # Macao
.xn--node whois.itdc.ge # Georgia
.xn--mix891f WEB https://www.monic.mo/monic/faces/whois # Macao
.xn--node WEB http://რეგისტრაცია.გე/ # Georgia
.xn--o3cw4h whois.thnic.co.th # Thailand
.xn--ogbpf8fl whois.tld.sy # Syria
.xn--p1ai whois.tcinet.ru # Russian Federation
.xn--pgbs0dh whois.ati.tn # Tunisia
.xn--q7ce6a whois.nic.la # Lao
.xn--qxa6a whois.eu # European Union, Greek
.xn--qxam WEB https://grweb.ics.forth.gr/public/whois # Greece
.xn--rvc1e0am3e whois.registry.in # India
.xn--s9brj9c whois.registry.in # India, Punjabi
.xn--qxam WEB https://grweb.ics.forth.gr/public/whois?lang=en # Greece
.xn--rvc1e0am3e whois.nixiregistry.in # India
.xn--s9brj9c whois.nixiregistry.in # India, Punjabi
.xn--wgbh1c whois.dotmasr.eg # Egypt
.xn--wgbl6a whois.registry.qa # Qatar
.xn--xkc2al3hye2a whois.nic.lk # Sri Lanka, Tamil
.xn--xkc2dl3a5ee0h whois.registry.in # India, Tamil
.xn--xkc2dl3a5ee0h whois.nixiregistry.in # India, Tamil
.xn--y9a3aq whois.amnic.net # Armenia
.xn--yfro4i67o whois.sgnic.sg # Singapore, Chinese
.xn--ygbi2ammx whois.pnina.ps # Palestinian Territory
.xn--yfro4i67o whois.zh.sgnic.sg # Singapore, Chinese
.xn--ygbi2ammx NONE # Palestinian Territory

11
utils.c
View File

@ -1,9 +1,9 @@
/*
* Copyright 1999-2008 by Marco d'Itri <md@linux.it>.
* Copyright by Marco d'Itri <md@linux.it>.
*
* do_nofail and merge_args come from the module-init-tools package.
* Copyright 2001 by Rusty Russell.
* Copyright 2002, 2003 by Rusty Russell, IBM Corporation.
* Copyright by Rusty Russell.
* Copyright by Rusty Russell, IBM Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,8 +16,9 @@
* 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* with this program; if not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
/* for strdup */

13
utils.h
View File

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef WHOIS_UTILS_H
#define WHOIS_UTILS_H
@ -16,8 +17,17 @@
/* Portability macros */
#ifdef __GNUC__
# define NORETURN __attribute__((noreturn))
# define NONNULL __attribute__((returns_nonnull))
# define UNUSED __attribute__((unused))
#else
# define NORETURN
# define NONNULL
# define UNUSED
#endif
#if (defined __GNUC__ && __GNUC__ >= 11) && !defined __clang__
# define MALLOC_FREE __attribute__((malloc(free)))
#else
# define MALLOC_FREE
#endif
#ifndef AI_IDN
@ -54,7 +64,8 @@
#endif
/* Prototypes */
void *do_nofail(void *ptr, const char *file, const int line);
void *MALLOC_FREE NONNULL do_nofail(void *ptr, const char *file, const int line)
;
char **merge_args(char *args, char *argv[], int *argc);
void NORETURN err_quit(const char *fmt, ...);

93
whois.1
View File

@ -9,21 +9,19 @@ whois \- client for the whois directory service
] [
.RB {\~ \-p \~|\~ \-\-port \~}
.I PORT
] [\~\c
.B \-abBcdGHIKlLmMrRx
] [\~\c
.BI \-g \~SOURCE:FIRST\-LAST
] [\~\c
.BR \-i \~
]
.RB [\~ \-abBcdGHIKlLmMrRx
]
.RB [\~ \-g \fI\~SOURCE:FIRST\-LAST\fR
]
.RB [\~ \-i
.IR ATTR [, ATTR ]...\~]
[\~\c
.BR \-s \~
.RB [\~ \-s
.IR SOURCE [, SOURCE ]...\~]
[\~\c
.BR \-T \~
.RB [\~ \-T
.IR TYPE [, TYPE ]...\~]
.RB [\~ \-\-verbose \~]
.RB [\~ \-\-no-recursion \~]
.RB [\~ \-\-no\-recursion \~]
.I OBJECT
.B whois
@ -42,7 +40,6 @@ whois \- client for the whois directory service
.B whois \-\-version
.PP
.SH DESCRIPTION
.B whois
searches for an object in a
@ -50,16 +47,16 @@ searches for an object in a
database.
.P
This version of the whois client tries to guess the right server to
ask for the specified object. If no guess can be made it will connect to
ask for the specified object.
If no guess can be made it will connect to
.I whois.networksolutions.com
for NIC handles or
.I whois.arin.net
for IPv4 addresses and network names.
.PP
.SH OPTIONS
.TP 8
.B \-h \c
.IR HOST ", "\c
.B \-h
.IR HOST ,
.BI \-\-host= HOST
Connect to
.IR HOST .
@ -67,8 +64,8 @@ Connect to
.B \-H
Do not display the legal disclaimers that some registries like to show you.
.TP 8
.B \-p \c
.IR PORT ", "\c
.B \-p
.IR PORT ,
.BI \-\-port= PORT
Connect to
.IR PORT .
@ -77,12 +74,13 @@ Connect to
First query
.I whois.iana.org
and then follow its referral to the
whois server authoritative for that request. This works for IP addresses,
whois server authoritative for that request.
This works for IP addresses,
AS numbers and domains.
.BR BEWARE :
this implies that the IANA server will receive your complete query.
.TP 8
.B \-\-no-recursion
.B \-\-no\-recursion
Disable recursion from registry to registrar servers.
.TP 8
.B \-\-verbose
@ -106,7 +104,8 @@ Also search all the mirrored databases.
Return brief IP address ranges with abuse contact.
.TP 8
.B \-B
Disable objects filtering. (Show the e-mail addresses.)
Disable objects filtering.
(Show the e-mail addresses.)
.TP 8
.B \-c
Return the smallest IP address range with a reference to an irt object.
@ -114,7 +113,7 @@ Return the smallest IP address range with a reference to an irt object.
.B \-d
Return the reverse DNS delegation object too.
.TP 8
.B \-g \c
.B \-g
.I SOURCE:FIRST\-LAST
Search updates from
.I SOURCE
@ -122,13 +121,14 @@ database between
.I FIRST
and
.I LAST
update serial number. It is useful to obtain Near Real Time Mirroring stream.
update serial number.
It is useful to obtain Near Real Time Mirroring stream.
.TP 8
.B \-G
Disable grouping of associated objects.
.TP 8
.B \-i \c
.I ATTR[,ATTR]...
.B \-i
.IR ATTR [, ATTR ]...
Inverse-search objects having associated attributes.
.I ATTR
is the attribute name, while the positional
@ -136,11 +136,13 @@ is the attribute name, while the positional
argument is the attribute value.
.TP 8
.B \-K
Return primary key attributes only. An exception is the
Return primary key attributes only.
An exception is the
.I members
attribute of
.I set
objects, which is always returned. Another exception are all
objects, which is always returned.
Another exception are all
attributes of the objects
.IR organisation ,
.I person
@ -160,7 +162,7 @@ Return all one level more specific objects.
.B \-M
Return all levels of more specific objects.
.TP 8
.B \-q \c
.B \-q
.I KEYWORD
Return information about the server.
.I KEYWORD
@ -179,27 +181,27 @@ Disable recursive lookups for contact information.
Disable following referrals and force showing the object from the local copy
in the server.
.TP 8
.B \-s \c
.I SOURCE[,SOURCE]...
.B \-s
.IR SOURCE [, SOURCE ]...
Request the server to search for objects mirrored from
.IR SOURCE .
Sources are delimited by comma, and the order is significant.
Use the
.I -q sources
.I \-q sources
parameter to obtain a list of valid sources.
.TP 8
.B \-t \c
.B \-t
.I TYPE
Return the template for a object of
.IR TYPE .
.TP 8
.B \-T \c
.I TYPE[,TYPE]...
.B \-T
.IR TYPE [, TYPE ]...
Restrict the search to objects of
.IR TYPE .
Multiple types are separated by a comma.
.TP 8
.B \-v \c
.B \-v
.I TYPE
Return the verbose template for a object of
.IR TYPE .
@ -207,7 +209,9 @@ Return the verbose template for a object of
.B \-x
Search for only exact match on network address prefix.
.SH NOTES
When querying the Verisign gTLDs (e.g. .com, .net...) thin registry servers
When querying the Verisign gTLDs
(e.g.\& \&.com, \&.net...\&)
thin registry servers
for a domain, the program will automatically prepend the
.I domain
keyword to only show domain records. The
@ -231,7 +235,7 @@ When querying
.I whois.denic.de
for domain names and no other
flags have been specified, the program will automatically add the flag
.IR "-T dn" .
.IR "\-T dn" .
.P
When querying
.I whois.dk\-hostmaster.dk
@ -240,7 +244,8 @@ flags have been specified, the program will automatically add the flag
.IR "\-\-show\-handles" .
.P
RIPE-specific command line options are ignored when querying non-RIPE
servers. This may or may not be the behaviour intended by the user.
servers.
This may or may not be the behaviour intended by the user.
When using non-standard query parameters then the command line options
which are not to be interpreted by the client must follow the
.I \-\-
@ -249,7 +254,8 @@ separator (which marks the beginning of the query string).
If the
.I /etc/whois.conf
configuration file exists, it will be consulted
to find a server before applying the normal rules. Each line of the
to find a server before applying the normal rules.
Each line of the
file should contain a regular expression to be matched against the query
text and the whois server to use, separated by white space.
IDN domains must use the ACE format.
@ -280,7 +286,8 @@ A list of options which will be evaluated before the ones specified on the
command line.
.IP "WHOIS_SERVER"
This server will be queried if the program cannot guess where some kind
of objects are located. If the variable does not exist then
of objects are located.
If the variable does not exist then
.I whois.arin.net
will be queried.
.SH "SEE ALSO"
@ -290,7 +297,7 @@ will be queried.
WHOIS Protocol Specification.
.P
.IR "RIPE Database Query Reference Manual" :
.RI < http://www.ripe.net/data\-tools/support/documentation/ripe\-database\-query\-reference\-manual >
.RI < https://www.ripe.net/\:data\-tools/\:support/\:documentation/\:ripe\-database\-query\-reference\-manual >
.SH BUGS
The program may have buffer overflows in the command line parser:
be sure to not pass untrusted data to it.
@ -304,5 +311,5 @@ original BSD client.
and this man page were written by Marco d'Itri
.RI < md@linux.it >
and are licensed under the terms of the GNU General Public License,
version 2 or higher.
version 2 or later.
.\" SPDX-License-Identifier: GPL-2.0-or-later

86
whois.bash Normal file
View File

@ -0,0 +1,86 @@
_whois_query() {
"$1" -q "$2" 2>/dev/null | while read -r item _; do
[[ $item == %* ]] && continue
printf "%s\n" "${item%%:*}"
done
}
_whois_hosts() {
# _known_hosts_real from github.com/scop/bash-completion if available
if declare -f _known_hosts_real &>/dev/null; then
_known_hosts_real -- "$1"
return 0
fi
COMPREPLY=($(compgen -A hostname -- "$1"))
}
_whois() {
case $3 in
--help | --version | -p | --port | -i)
return 0
;;
-h | --host)
_whois_hosts "$2"
return 0
;;
-T | -t | -v)
[[ ${_whois_types-} ]] ||
_whois_types=" $(_whois_query "$1" types)"
COMPREPLY=($(compgen -W '$_whois_types' -- "$2"))
return 0
;;
-s | -g)
[[ ${_whois_sources-} ]] ||
_whois_sources=" $(_whois_query "$1" sources)"
COMPREPLY=($(compgen -W '$_whois_sources' -- "$2"))
if [[ $3 == -g ]]; then
[[ ${#COMPREPLY[*]} -eq 1 ]] && COMPREPLY[0]+=:
compopt -o nospace
fi
return 0
;;
-q)
COMPREPLY=($(compgen -W 'version sources types' -- "$2"))
return 0
;;
esac
if [[ $2 == -* ]]; then
COMPREPLY=($(compgen -W '
-h --host
-p --port
-I
-H
--verbose
--no-recursion
--help
--version
-l
-L
-m
-M
-c
-x
-b
-B
-G
-d
-i
-T
-K
-r
-R
-a
-s
-g
-t
-v
-q
' -- "$2"))
return 0
fi
_whois_hosts "$2"
} && complete -F _whois whois

536
whois.c
View File

@ -1,10 +1,20 @@
/*
* Copyright (C) 1999-2022 Marco d'Itri <md@linux.it>.
* Copyright (C) Marco d'Itri <md@linux.it>.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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
*/
/* for AI_IDN */
@ -38,6 +48,13 @@
#include <idna.h>
#endif
/* prototypes referenced in data.h */
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 *);
static void find_referral_server_recursive(char **, const char *);
static void find_referral_server_verisign(char **, const char *);
/* Application-specific */
#include "version.h"
#include "data.h"
@ -309,7 +326,7 @@ int handle_query(const char *hserver, const char *hport,
const char *query, const char *flags)
{
char *server = NULL, *port = NULL;
char *p, *query_string;
char *p, *query_string, *old_server, *new_server;
if (hport) {
server = strdup(hserver);
@ -342,20 +359,20 @@ int handle_query(const char *hserver, const char *hport,
case 4:
if (verb)
printf(_("Using server %s.\n"), server + 1);
sockfd = openconn(server + 1, NULL);
free(server);
server = query_crsnic(sockfd, query);
if (no_recursion)
server = "";
old_server = server;
server = query_verisign(server, NULL, query);
free(old_server);
if (no_recursion && server)
server[0] = '\0';
break;
case 8:
if (verb)
printf(_("Using server %s.\n"), server + 1);
sockfd = openconn(server + 1, NULL);
free(server);
server = query_afilias(sockfd, query);
if (no_recursion)
server = "";
old_server = server;
server = query_server(server, NULL, query);
free(old_server);
if (no_recursion && server)
server[0] = '\0';
break;
case 0x0A:
p = convert_6to4(query);
@ -386,9 +403,8 @@ int handle_query(const char *hserver, const char *hport,
case 0x0E:
if (verb)
printf(_("Using server %s.\n"), "whois.iana.org");
sockfd = openconn("whois.iana.org", NULL);
free(server);
server = query_iana(sockfd, query);
server = query_server("whois.iana.org", NULL, query);
break;
default:
break;
@ -406,15 +422,17 @@ int handle_query(const char *hserver, const char *hport,
printf(_("Query string: \"%s\"\n\n"), query_string);
}
sockfd = openconn(server, port);
server = do_query(sockfd, query_string);
new_server = query_server(server, port, query_string);
free(server);
if (port)
free(port);
free(query_string);
/* recursion is fun */
if (!no_recursion && server && !strchr(query, ' ')) {
printf(_("\n\nFound a referral to %s.\n\n"), server);
handle_query(server, NULL, query, flags);
if (!no_recursion && new_server && !strchr(query, ' ')) {
printf(_("\n\nFound a referral to %s.\n\n"), new_server);
handle_query(new_server, NULL, query, flags);
free(new_server);
}
return 0;
@ -492,12 +510,52 @@ const char *match_config_file(const char *s)
}
#endif
/*
* Check if the argument is an autonomous system number in the form "ASnnnn"
* or "AS nnnn".
*/
int is_asn(const char *s, int allow_space, const char *suffix_separators)
{
const char *p;
int max_numbers = 6;
int seen_number = 0;
if (!strncaseeq(s, "as", 2))
return 0; /* does not start with "as" (case insensitive) */
/* skip a single optional space */
p = s + 2;
if (allow_space && *p == ' ')
p++;
/* all numbers, but not too many */
while (*p) {
if (*p < '0' || *p > '9') { /* not a number */
if (!seen_number)
return 0; /* just "as" with no numbers */
if (suffix_separators && strchr(suffix_separators, *p))
return 1; /* has a trailing separator */
return 0; /* has trailing garbage */
}
seen_number = 1;
if (max_numbers-- == 0)
return 0; /* too many numbers */
p++;
}
if (seen_number)
return 1; /* a real ASN */
else
return 0; /* trailing garbage */
}
/* Parses an user-supplied string and tries to guess the right whois server.
* Returns a dynamically allocated buffer.
*/
char *guess_server(const char *s)
{
unsigned long ip, as32;
unsigned long ip;
unsigned int i;
const char *colon, *tld;
@ -506,12 +564,8 @@ char *guess_server(const char *s)
unsigned long v6prefix, v6net;
/* RPSL hierarchical objects */
if (strncaseeq(s, "as", 2)) {
if (isasciidigit(s[2]))
return strdup(whereas(atol(s + 2)));
else
return strdup("");
}
if (is_asn(s, 0, ":"))
return strdup(whereas(atol(s + 2)));
v6prefix = strtol(s, NULL, 16);
@ -546,19 +600,14 @@ char *guess_server(const char *s)
/* no dot and no hyphen means it's a NSI NIC handle or ASN (?) */
if (!strpbrk(s, ".-")) {
if (strncaseeq(s, "as", 2) && /* it's an AS */
(isasciidigit(s[2]) || s[2] == ' '))
return strdup(whereas(atol(s + 2)));
if (is_asn(s, 1, NULL))
return strdup(whereas(atol(s + 2))); /* it's an AS */
if (*s == '!') /* NSI NIC handle */
return strdup("whois.networksolutions.com");
else
return strdup("\x05"); /* probably a unknown kind of nic handle */
}
/* ASN32? */
if (strncaseeq(s, "as", 2) && s[2] && (as32 = asn32_to_long(s + 2)) != 0)
return strdup(whereas32(as32));
/* smells like an IP? */
if ((ip = myinet_aton(s))) {
for (i = 0; ip_assign[i].serv; i++)
@ -601,23 +650,10 @@ char *guess_server(const char *s)
return strdup("\x05");
}
const char *whereas32(const unsigned long asn)
{
int i;
for (i = 0; as32_assign[i].serv; i++)
if (asn >= as32_assign[i].first && asn <= as32_assign[i].last)
return as32_assign[i].serv;
return "\x06";
}
const char *whereas(const unsigned long asn)
{
int i;
if (asn > 65535)
return whereas32(asn);
for (i = 0; as_assign[i].serv; i++)
if (asn >= as_assign[i].first && asn <= as_assign[i].last)
return as_assign[i].serv;
@ -686,18 +722,20 @@ char *queryformat(const char *server, const char *flags, const char *query)
else if (strchr(query, ' ') || *flags) { }
else if (streq(server, "whois.denic.de") && in_domain(query, "de"))
strcat(buf, "-T dn" DENIC_PARAM_ACE DENIC_PARAM_CHARSET " ");
else if (streq(server, "whois.dk-hostmaster.dk") && in_domain(query, "dk"))
else if ((streq(server, "whois.punktum.dk") ||
streq(server, "whois.dk-hostmaster.dk"))
&& in_domain(query, "dk"))
strcat(buf, "--show-handles ");
/* mangle and add the query string */
if (!isripe && streq(server, "whois.nic.ad.jp") &&
strncaseeq(query, "AS", 2) && isasciidigit(query[2])) {
is_asn(query, 1, NULL)) {
strcat(buf, "AS ");
strcat(buf, query + 2);
}
else if (!isripe && streq(server, "whois.arin.net") &&
!strrchr(query, ' ')) {
if (strncaseeq(query, "AS", 2) && isasciidigit(query[2])) {
if (is_asn(query, 0, NULL)) {
strcat(buf, "a ");
strcat(buf, query + 2);
} else if (myinet_aton(query) || strchr(query, ':')) {
@ -714,8 +752,12 @@ char *queryformat(const char *server, const char *flags, const char *query)
/* ask for english text */
if (!isripe && (streq(server, "whois.nic.ad.jp") ||
streq(server, "whois.jprs.jp")) && japanese_locale())
strcat(buf, "/e");
streq(server, "whois.jprs.jp")) && japanese_locale()) {
/* but not if the user already added the /e flag */
char *flag = buf + strlen(buf) - 2;
if (!streq(flag, "/e"))
strcat(buf, "/e");
}
return buf;
}
@ -762,55 +804,218 @@ int hide_line(int *hiding, const char *const line)
return 0;
}
static void find_referral_server_apnic(char **referral_server, const char *buf)
{
/* Possible states of this FSM:
* 0: searching for the descr or mnt-by attribute
* 1: searching for the mnt-by attribute (descr found)
* 2: searching for the descr attribute (mnt-by found)
* 3: searching for the end of the object (an empty line)
* 4: done: stop searching
*
* Since the descr attribute is user-provided, consider it only if it
* is in an object actually maintained by APNIC.
*
* If multiple records are returned then it users the referral in the
* first valid object found.
*/
static int state = 0;
static char *rir_name = NULL;
char *p;
if (state == 4)
return;
if (state <= 2) {
if (strneq(buf, "descr:", 6)) {
p = (char *)buf + 6; /* skip until the colon */
for (; *p == ' ' || *p == '\t'; p++); /* skip white space */
if (strneq(p, "Transferred to the ", 19)) {
rir_name = strdup(p + 19);
if ((p = strpbrk(rir_name, " ")))
*p = '\0';
if (state == 0)
state = 1; /* still needs mnt-by */
else
state = 3;
}
} else if (strneq(buf, "mnt-by:", 7)) {
p = (char *)buf + 7; /* skip until the colon */
for (; *p == ' ' || *p == '\t'; p++); /* skip white space */
if (streq(p, "APNIC-STUB")) {
if (state == 0)
state = 2; /* still needs descr */
else
state = 3;
}
} else if (streq(buf, "")) {
if (state == 1)
free(rir_name);
state = 0; /* start again with a new object */
}
return;
}
if (state == 3 && streq(buf, "")) {
int i;
const char *rir_servers[] = {
"AFRINIC", "whois.afrinic.net",
"ARIN", "whois.arin.net",
"LACNIC", "whois.lacnic.net",
"RIPE", "whois.ripe.net",
NULL, NULL,
};
state = 4;
for (i = 0; rir_servers[i]; i += 2)
if (streq(rir_name, rir_servers[i]))
*referral_server = strdup(rir_servers[i + 1]);
free(rir_name);
}
}
static void find_referral_server_arin(char **referral_server, const char *buf)
{
char *p;
/* ARIN referrals:
* ReferralServer: rwhois://rwhois.fuse.net:4321/
* ReferralServer: whois://whois.ripe.net
* ReferralServer: whois.ripe.net
*/
if (!strneq(buf, "ReferralServer:", 15))
return;
/* When whois.arin.net returns multiple NetRange records, they will
* appear from the less specific one to the most specific one.
* Since the range we care about is the most specific one then we
* need to use the last ReferralServer field found.
*/
if (*referral_server) {
free(*referral_server);
*referral_server = NULL;
}
if ((p = strstr(buf, "rwhois://")))
*referral_server = strdup(p + 9);
else if ((p = strstr(buf, "whois://")))
*referral_server = strdup(p + 8);
else
*referral_server = strdup(buf + 17);
if (*referral_server && (p = strpbrk(*referral_server, "/")))
*p = '\0';
}
static void find_referral_server_iana(char **referral_server, const char *buf)
{
const char *p;
if (*referral_server)
return;
/* IANA referrals:
* refer: whois.apnic.net
*/
if (!strneq(buf, "refer:", 6))
return;
p = buf + 6; /* skip until the colon */
for (; *p == ' ' || *p == '\t'; p++); /* skip white space */
*referral_server = strdup(p);
}
static void find_referral_server_recursive(char **referral_server, const char *buf)
{
static int state = 0;
const char *p;
if (*referral_server)
return;
if (state == 0 && strneq(buf, "Domain Name:", 12))
state = 1;
else if (state == 1 && strneq(buf, "Domain Name:", 12))
state = 2;
else if (state == 1 && strneq(buf, "Registrar WHOIS Server:", 23)) {
p = buf + 23; /* skip until the colon */
for (; *p && *p == ' '; p++); /* skip the spaces */
*referral_server = strdup(p);
state = 2;
}
}
static void find_referral_server_verisign(char **referral_server, const char *buf)
{
static int state = 0;
const char *p;
if (*referral_server)
return;
/* If there are multiple matches only the server of the first record
* is queried */
if (state == 0 && strneq(buf, " Domain Name:", 15)) {
state = 1;
} else if (state == 0 && strneq(buf, " Server Name:", 15)) {
*referral_server = strdup("");
state = 2;
} else if (state == 1 && strneq(buf, " Registrar WHOIS Server:", 26)) {
p = buf + 26; /* skip until the colon */
for (; *p && *p == ' '; p++); /* skip the spaces */
*referral_server = strdup(p);
state = 2;
}
}
/* returns a string which should be freed by the caller, or NULL */
char *do_query(const int sock, const char *query)
char *query_server(const char *server, const char *port, const char *query)
{
char *temp, *p, buf[2000];
FILE *fi;
int hide = hide_discl;
int sock, i;
char *referral_server = NULL;
void (*referral_handler)(char **referral_server, const char *buf) = NULL;
temp = malloc(strlen(query) + 2 + 1);
strcpy(temp, query);
strcat(temp, "\r\n");
for (i = 0; server_referral_handlers[i].name; i++) {
/* If the first character is not printable then it represents
* a general category of servers in the list.
*/
if (server[0] < ' ' &&
strneq(server_referral_handlers[i].name, server, 1)) {
server++;
referral_handler = server_referral_handlers[i].handler;
break;
} else if (streq(server_referral_handlers[i].name, server)) {
referral_handler = server_referral_handlers[i].handler;
break;
}
}
sock = openconn(server, port);
fi = fdopen(sock, "r");
if (!fi)
err_sys("fdopen");
if (write(sock, temp, strlen(temp)) < 0)
err_sys("write");
free(temp);
while (fgets(buf, sizeof(buf), fi)) {
/* 6bone-style referral:
* % referto: whois -h whois.arin.net -p 43 as 1
*/
if (!referral_server && strneq(buf, "% referto:", 10)) {
char nh[256], np[16], nq[1024];
alarm(20); /* reset the timeout */
if ((p = strpbrk(buf, "\r\n"))) /* remove the trailing CR/LF */
*p = '\0';
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);
}
}
/* ARIN referrals:
* ReferralServer: rwhois://rwhois.fuse.net:4321/
* ReferralServer: whois://whois.ripe.net
*/
if (!referral_server && strneq(buf, "ReferralServer:", 15)) {
if ((p = strstr(buf, "rwhois://")))
referral_server = strdup(p + 9);
else if ((p = strstr(buf, "whois://")))
referral_server = strdup(p + 8);
if (referral_server && (p = strpbrk(referral_server, "/\r\n")))
*p = '\0';
}
if (referral_handler)
referral_handler(&referral_server, buf);
if (hide_line(&hide, buf))
continue;
if ((p = strpbrk(buf, "\r\n")))
*p = '\0';
recode_fputs(buf, stdout);
fputc('\n', stdout);
}
@ -823,16 +1028,20 @@ char *do_query(const int sock, const char *query)
err_quit(_("Catastrophic error: disclaimer text has been changed.\n"
"Please upgrade this program.\n"));
/* defensive programming: make sure to avoid trivial referral loops */
if (referral_server && streq(server, referral_server)) {
free(referral_server);
referral_server = NULL;
}
return referral_server;
}
char *query_crsnic(const int sock, const char *query)
char *query_verisign(const char *server, const char *port, const char *query)
{
char *temp, *p, buf[2000];
FILE *fi;
int hide = hide_discl;
char *temp, *p;
int sock;
char *referral_server = NULL;
int state = 0;
int dotscount = 0;
temp = malloc(strlen("domain ") + strlen(query) + 2 + 1);
@ -846,140 +1055,9 @@ char *query_crsnic(const int sock, const char *query)
if (dotscount == 1 && !strpbrk(query, "=~ "))
strcpy(temp, "domain ");
strcat(temp, query);
strcat(temp, "\r\n");
fi = fdopen(sock, "r");
if (write(sock, temp, strlen(temp)) < 0)
err_sys("write");
referral_server = query_server(server, port, temp);
free(temp);
while (fgets(buf, sizeof(buf), fi)) {
/* If there are multiple matches only the server of the first record
is queried */
if (state == 0 && strneq(buf, " Domain Name:", 15))
state = 1;
if (state == 0 && strneq(buf, " Server Name:", 15)) {
referral_server = strdup("");
state = 2;
}
if (state == 1 && strneq(buf, " Registrar WHOIS Server:", 26)) {
for (p = buf; *p != ':'; p++); /* skip until the colon */
for (p++; *p == ' '; p++); /* skip the spaces */
referral_server = strdup(p);
if ((p = strpbrk(referral_server, "\r\n ")))
*p = '\0';
state = 2;
}
/* the output must not be hidden or no data will be shown for
host records and not-existing domains */
if (hide_line(&hide, buf))
continue;
if ((p = strpbrk(buf, "\r\n")))
*p = '\0';
recode_fputs(buf, stdout);
fputc('\n', stdout);
}
if (ferror(fi))
err_sys("fgets");
fclose(fi);
return referral_server;
}
char *query_afilias(const int sock, const char *query)
{
char *temp, *p, buf[2000];
FILE *fi;
int hide = hide_discl;
char *referral_server = NULL;
int state = 0;
temp = malloc(strlen(query) + 2 + 1);
strcpy(temp, query);
strcat(temp, "\r\n");
fi = fdopen(sock, "r");
if (write(sock, temp, strlen(temp)) < 0)
err_sys("write");
free(temp);
while (fgets(buf, sizeof(buf), fi)) {
/* If multiple attributes are returned then use the first result.
This is not supposed to happen. */
if (state == 0 && strneq(buf, "Domain Name:", 12))
state = 1;
if (state == 1 && strneq(buf, "Registrar WHOIS Server:", 23)) {
for (p = buf; *p != ':'; p++); /* skip until colon */
for (p++; *p == ' '; p++); /* skip colon and spaces */
referral_server = strdup(p);
if ((p = strpbrk(referral_server, "\r\n ")))
*p = '\0';
state = 2;
}
/* the output must not be hidden or no data will be shown for
host records and not-existing domains */
if (hide_line(&hide, buf))
continue;
if ((p = strpbrk(buf, "\r\n")))
*p = '\0';
recode_fputs(buf, stdout);
fputc('\n', stdout);
}
if (ferror(fi))
err_sys("fgets");
fclose(fi);
if (hide > HIDE_NOT_STARTED && hide != HIDE_TO_THE_END)
err_quit(_("Catastrophic error: disclaimer text has been changed.\n"
"Please upgrade this program.\n"));
return referral_server;
}
char *query_iana(const int sock, const char *query)
{
char *temp, *p, buf[2000];
FILE *fi;
char *referral_server = NULL;
int state = 0;
temp = malloc(strlen(query) + 2 + 1);
strcpy(temp, query);
strcat(temp, "\r\n");
fi = fdopen(sock, "r");
if (write(sock, temp, strlen(temp)) < 0)
err_sys("write");
free(temp);
while (fgets(buf, sizeof(buf), fi)) {
/* If multiple attributes are returned then use the first result.
This is not supposed to happen. */
if (state == 0 && strneq(buf, "refer:", 6)) {
for (p = buf; *p != ':'; p++); /* skip until colon */
for (p++; *p == ' '; p++); /* skip colon and spaces */
referral_server = strdup(p);
if ((p = strpbrk(referral_server, "\r\n ")))
*p = '\0';
state = 2;
}
if ((p = strpbrk(buf, "\r\n")))
*p = '\0';
recode_fputs(buf, stdout);
fputc('\n', stdout);
}
if (ferror(fi))
err_sys("fgets");
fclose(fi);
return referral_server;
}
@ -1003,7 +1081,7 @@ int openconn(const char *server, const char *port)
if (AFL_MODE)
return dup(0);
alarm(60);
alarm(20);
#ifdef HAVE_GETADDRINFO
memset(&hints, 0, sizeof(struct addrinfo));
@ -1119,7 +1197,7 @@ int connect_with_timeout(int fd, const struct sockaddr *addr,
return 0;
}
void NORETURN alarm_handler(int signum)
void NORETURN alarm_handler(UNUSED int signum)
{
close(sockfd);
err_quit(_("Timeout."));
@ -1231,6 +1309,12 @@ char *normalize_domain(const char *dom)
}
#if defined HAVE_LIBIDN || defined HAVE_LIBIDN2
/* A leading ! means that this probably is a RADB query, so skip IDN
* processing because it would lower-case the command characters.
*/
if (*ret == '!')
return ret;
/* find the start of the last word if there are spaces in the query */
for (p = ret; *p; p++)
if (*p == ' ')
@ -1472,26 +1556,12 @@ unsigned long myinet_aton(const char *s)
return (a << 24) + (b << 16) + (c << 8) + d;
}
unsigned long asn32_to_long(const char *s)
{
unsigned long a, b;
char junk;
if (!s)
return 0;
if (sscanf(s, "%lu.%lu%c", &a, &b, &junk) != 2)
return 0;
if (a > 65535 || b > 65535)
return 0;
return (a << 16) + b;
}
int isasciidigit(const char c)
{
return (c >= '0' && c <= '9') ? 1 : 0;
}
/* http://www.ripe.net/ripe/docs/databaseref-manual.html */
/* https://www.ripe.net/ripe/docs/databaseref-manual.html */
void NORETURN usage(int error)
{

View File

@ -47,3 +47,4 @@ This manual page was written by Petr Písař
.RI < ppisar@redhat.com >
and is licensed under the terms of the GNU General Public License,
version 2 or higher.
\" SPDX-License-Identifier: GPL-2.0-or-later

13
whois.h
View File

@ -1,23 +1,19 @@
/* 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
/* prototypes */
int is_asn(const char *, int, const char *);
char *guess_server(const char *);
const char *match_config_file(const char *);
const char *whereas(const unsigned long);
const char *whereas32(const unsigned long);
char *queryformat(const char *, const char *, const char *);
int hide_line(int *hiding, const char *const line);
char *do_query(const int, const char *);
char *query_crsnic(const int, const char *);
char *query_afilias(const int, const char *);
char *query_iana(const int, const char *);
char *query_server(const char *, const char *, const char *);
char *query_verisign(const char *, const char *, const char *);
int openconn(const char *, const char *);
int connect_with_timeout(int, const struct sockaddr *, socklen_t, int);
void NORETURN usage(int error);
@ -25,7 +21,6 @@ void NORETURN alarm_handler(int);
void NORETURN sighandler(int);
int japanese_locale(void);
unsigned long myinet_aton(const char *);
unsigned long asn32_to_long(const char *);
int isasciidigit(const char);
int endstrcaseeq(const char *, const char *);
int in_domain(const char *, const char *);