From be460b946701ac04fb0e99bbb014a9facbaf9989 Mon Sep 17 00:00:00 2001 From: Martin Blapp Date: Wed, 25 Aug 2004 15:34:44 +0000 Subject: 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 --- usr.bin/whois/whois.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.bin/whois') diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index a5be865231ec..def4fdf58c1f 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -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) { -- cgit v1.2.3