diff options
author | mbr <mbr@FreeBSD.org> | 2004-08-25 15:34:44 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2004-08-25 15:34:44 +0000 |
commit | 17cdeacd68484d9612c250ef9e82250180cbd458 (patch) | |
tree | 2c6eb3f69434abe3d319ee7bc937cc7ee6895188 /usr.bin | |
parent | 5810faeee1a1b607d5ab1ac30677d868302177e6 (diff) | |
download | FreeBSD-src-17cdeacd68484d9612c250ef9e82250180cbd458.zip FreeBSD-src-17cdeacd68484d9612c250ef9e82250180cbd458.tar.gz |
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
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/whois/whois.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index a5be865..def4fdf 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) { |