mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-23 01:14:52 +01:00
Add special case for the german whois nameserver. Without the
'-T dn,ace -C US-ASCII' option one does only get: $ whois nic.de domain: nic.de status: connect More information available on: http://www.denic.de/en/domains/technik/denic_whois-server/index.html MFC: 3 days
This commit is contained in:
parent
64215f652a
commit
be460b9467
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134294
@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define BNICHOST "whois.registro.br"
|
||||
#define NORIDHOST "whois.norid.no"
|
||||
#define IANAHOST "whois.iana.org"
|
||||
#define GERMNICHOST "de.whois-servers.net"
|
||||
#define DEFAULT_PORT "whois"
|
||||
#define WHOIS_SERVER_ID "Whois Server: "
|
||||
#define WHOIS_ORG_SERVER_ID "Registrant Street1:Whois Server:"
|
||||
@ -291,7 +292,11 @@ whois(const char *query, const char *hostname, int flags)
|
||||
sfo = fdopen(s, "w");
|
||||
if (sfi == NULL || sfo == NULL)
|
||||
err(EX_OSERR, "fdopen()");
|
||||
fprintf(sfo, "%s\r\n", query);
|
||||
if (strcmp(hostname, GERMNICHOST) == 0) {
|
||||
fprintf(sfo, "-T dn,ace -C US-ASCII %s\r\n", query);
|
||||
} else {
|
||||
fprintf(sfo, "%s\r\n", query);
|
||||
}
|
||||
fflush(sfo);
|
||||
nhost = NULL;
|
||||
while ((buf = fgetln(sfi, &len)) != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user