Merge branch 'master' into wheezy-backports

This commit is contained in:
Marco d'Itri 2015-04-24 16:02:26 +02:00
commit 61a8ee0d7c
7 changed files with 172 additions and 45 deletions

72
data.h
View File

@ -1,8 +1,6 @@
/* /*
* RIPE-like servers. * RIPE-like servers.
* All of them do not understand -V2.0Md with the exception of RA and RIPN. * All of them do not understand -V2.0Md with the exception of RA and RIPN.
* 6bone-derived servers will accept the flag with a warning (the flag must
* match /^V [a-zA-Z]{1,4}\d+[\d\.]{0,5}$/).
*/ */
/* servers which accept the new syntax (-V XXn.n) */ /* servers which accept the new syntax (-V XXn.n) */
@ -24,31 +22,28 @@ const char *ripe_servers[] = {
}; };
const char *hide_strings[] = { const char *hide_strings[] = {
"NOTICE AND TERMS OF USE: You", "", /* NetSol */ "The data in Networksolutions.com's WHOIS database", NULL,
"NOTICE: The expiration date", "reserves the right", /* crsnic */ /* Some registrars like .wang copied the first paragraph of this
"The data in Register", "", /* Register.Com */ * disclaimer, so the detection here needs to be split in two parts. */
"The Data in the Tucows", "RECORD DOES NOT", "NOTICE: The expiration date", "", /* crsnic */
"The information in this whois database", "", /* DOTSTER */ "TERMS OF USE: You are not authorized", "reserves the right", /* crsnic */
"This whois service currently only", "top-level domains.", /* NameSecure */ "The data in Register.com's WHOIS database", NULL,
"The Data in Gabia", "you agree to abide", "The Data in the Tucows Registrar WHOIS database", NULL,
"The data contained in GoDaddy.com", "is not the registrant", "The data in NameSecure.com's WHOIS database", NULL,
"Disclaimer: The Global Name Registry", "for any commercial", "The Data in Gabia's WHOIS database", NULL,
"Access to America Online", "time. By accessing", /* AOL */ "The data contained in GoDaddy.com", NULL,
"# Access and use restricted", "", /* GANDI */ "Personal data access and use are governed by French", NULL, /* GANDI */
"% The data in the WHOIS database of 1&1 Internet", "", "The data in this whois database is provided to you", NULL, /* enom */
"The data in this whois database is", NULL, /* enom, activeregistrar.com */ "; Please register your domains at; http://www.", NULL, /* key-systems.net */
"The Data in Moniker's WHOIS database", "of Moniker.", "%% NOTICE: Access to this information is provided", NULL, /* bookmyname.com */
"The Data in OnlineNIC", " By starting this query", "% NOTICE: Access to the domains information", NULL, /* CORE */
"Interdomain's WHOIS", "DOES NOT SIGNIFY", "The Data in MarkMonitor.com's", NULL, /* MarkMonitor */
"The Data provided by Stargate Holdings", "(2) enable any",
"; This data is provided by domaindiscount24.com", "",
"%% NOTICE: Access to this information is provided", "%% By submitting", /* bookmyname.com */
"% NOTICE: Access to the domains information", "% this query", /* CORE */
"The Data in MarkMonitor.com's", "--", /* MarkMonitor */
"Corporation Service Company(c) (CSC) The Trusted Partner", "Register your domain name at", /* CSC */ "Corporation Service Company(c) (CSC) The Trusted Partner", "Register your domain name at", /* CSC */
"The data in Networksolutions.com's", "By submitting this query", /* Networksolutions */ "The data in Networksolutions.com's", NULL, /* Networksolutions */
"% Copyright (c)2003 by Deutsche Telekom AG", "% DOMAIN full", /* Deutsche Telekom */ "# Welcome to the OVH WHOIS Server", "", /* ovh */
"# Welcome to the OVH WHOIS Server", "# soumettant une", /* ovh */ "TERMS OF USE OF MELBOURNE IT WHOIS DATABASE", NULL,
"The data contained in this Registrar's Whois", NULL, /* wildwestdomains.com */
"The data in the FastDomain Inc. WHOIS database", NULL,
/* gTLDs */ /* gTLDs */
"Access to .AERO WHOIS information", "", "Access to .AERO WHOIS information", "",
@ -56,13 +51,13 @@ const char *hide_strings[] = {
"The .coop registry WHOIS", "VERIFICATION, NOR DO", "The .coop registry WHOIS", "VERIFICATION, NOR DO",
"%% puntCAT Whois Server", "%% any time.", "%% puntCAT Whois Server", "%% any time.",
"This Registry database contains ONLY .EDU", "type: help", /* edu */ "This Registry database contains ONLY .EDU", "type: help", /* edu */
"Access to AFILIAS WHOIS information is provided", "", /* .info */ "Access to AFILIAS WHOIS information is provided", NULL, /* .info */
"mTLD WHOIS LEGAL STATEMENT", "integrity of the database.", /* .mobi */ "mTLD WHOIS LEGAL STATEMENT", "integrity of the database.", /* .mobi */
"Access to .ORG WHOIS information", "", "Access to Public Interest Registry WHOIS information", NULL, /* .org */
"Access to RegistryPro's Whois", "All rights", /* .pro */ "Access to .PRO REGISTRY WHOIS information", "",
"Telnic, Ltd., the Registry Operator", "(b) harass any person;", /* .tel */ "Telnic, Ltd., the Registry Operator for .TEL", NULL,
"Tralliance, Inc., the Registry", "", /* .travel */ "Tralliance, Inc., the Registry Operator for .travel", NULL,
"Access to .XXX ICM REGISTRY WHOIS", "", /* .xxx */ "Access to .XXX ICM REGISTRY WHOIS", NULL, /* .xxx */
/* new gTLDs */ /* new gTLDs */
"Terms of Use: Users accessing the Donuts WHOIS", NULL, "Terms of Use: Users accessing the Donuts WHOIS", NULL,
@ -72,14 +67,19 @@ const char *hide_strings[] = {
"The whois information provided on this site", "", /* mm-registry.com */ "The whois information provided on this site", "", /* mm-registry.com */
"; This data is provided by ", NULL, /* ksregistry.net */ "; This data is provided by ", NULL, /* ksregistry.net */
"This whois service is provided by CentralNic Ltd", "", "This whois service is provided by CentralNic Ltd", "",
".Club Domains, LLC, the Registry Operator", NULL,
"% Except for agreed Internet operational purposes", NULL, /* .berlin */
"TERMS OF USE: The information in the Whois database", NULL, /* .wang */
"The WHOIS service offered by Neustar, Inc, on behalf", NULL,
"The WHOIS service offered by the Registry Operator", NULL, /* .science */
/* ccTLDs */ /* ccTLDs */
"Access to CCTLD WHOIS information is provided", "", /* Afilias */ "Access to CCTLD WHOIS information is provided", "", /* Afilias */
"Access to ASNIC", "by this policy.", /* as */ "This WHOIS information is provided", NULL, /* as */
"% The WHOIS service offered by DNS.be", "% protect the privacy", /* be */ "% The WHOIS service offered by DNS Belgium", "", /* be */
"% The WHOIS service offered by EURid", "% of the database", /* eu */ "% The WHOIS service offered by EURid", "% of the database", /* eu */
"% WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS", "", /* sx */ "% WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS", NULL, /* sx */
"NeuStar, Inc., the Registry", "OF THE AVAILABILITY", /* us */ "NeuStar, Inc., the Registry Administrator for .US", NULL,
NULL, NULL NULL, NULL
}; };

33
debian/changelog vendored
View File

@ -1,3 +1,36 @@
whois (5.2.7) unstable; urgency=medium
* Removed a bogus disclaimer detection string.
* Updated the list of new gTLDs
-- Marco d'Itri <md@linux.it> Wed, 25 Mar 2015 23:04:44 +0100
whois (5.2.6) unstable; urgency=medium
* Added the .edu.ph TLD server.
* Removed the .gov.py TLD server. (Closes: #780562)
* Updated the list of new gTLDs.
* Implemented hiding multiple disclaimers blocks to improve detection.
* Updated the disclaimer detection strings.
-- Marco d'Itri <md@linux.it> Mon, 23 Mar 2015 04:28:39 +0100
whois (5.2.5) unstable; urgency=medium
* Added the .xn--90ais (.бел, Belarus) TLD server.
* Updated the .ky TLD server.
* Updated the list of new gTLDs.
* Added new recovered IPv4 allocations.
-- Marco d'Itri <md@linux.it> Tue, 03 Mar 2015 02:15:57 +0100
whois (5.2.4) unstable; urgency=medium
* Fixed referrals handling for the .cc, .tv a .jobs TLDs.
* Updated the list of new gTLDs.
-- Marco d'Itri <md@linux.it> Sun, 25 Jan 2015 04:07:20 +0100
whois (5.2.3~bpo70+2) wheezy-backports; urgency=medium whois (5.2.3~bpo70+2) wheezy-backports; urgency=medium
* Rebuild for wheezy-backports. * Rebuild for wheezy-backports.

View File

@ -2,9 +2,13 @@
{ 736886784UL, 737411071UL, "whois.apnic.net" }, { 736886784UL, 737411071UL, "whois.apnic.net" },
{ 737476608UL, 738000895UL, "whois.apnic.net" }, { 737476608UL, 738000895UL, "whois.apnic.net" },
{ 738066432UL, 738197503UL, "whois.apnic.net" }, { 738066432UL, 738197503UL, "whois.apnic.net" },
{ 755236864UL, 755499007UL, "whois.lacnic.net" },
{ 755499008UL, 756023295UL, "whois.ripe.net" },
{ 756023296UL, 757071871UL, "whois.arin.net" }, { 756023296UL, 757071871UL, "whois.arin.net" },
{ 757071872UL, 759169023UL, "whois.arin.net" }, { 757071872UL, 759169023UL, "whois.arin.net" },
{ 759169024UL, 759238655UL, "whois.apnic.net" }, { 759169024UL, 759238655UL, "whois.apnic.net" },
{ 759431168UL, 759693311UL, "whois.lacnic.net" },
{ 759693312UL, 760217599UL, "whois.arin.net" },
{ 760217600UL, 761266175UL, "whois.ripe.net" }, { 760217600UL, 761266175UL, "whois.ripe.net" },
{ 761266176UL, 762314751UL, "whois.afrinic.net" }, { 761266176UL, 762314751UL, "whois.afrinic.net" },
{ 762314752UL, 763363327UL, "whois.apnic.net" }, { 762314752UL, 763363327UL, "whois.apnic.net" },
@ -12,6 +16,8 @@
{ 765460480UL, 767557631UL, "whois.lacnic.net" }, { 765460480UL, 767557631UL, "whois.lacnic.net" },
{ 767557632UL, 769589247UL, "whois.afrinic.net" }, { 767557632UL, 769589247UL, "whois.afrinic.net" },
{ 769654784UL, 770703359UL, "whois.lacnic.net" }, { 769654784UL, 770703359UL, "whois.lacnic.net" },
{ 770703360UL, 771227647UL, "whois.afrinic.net" },
{ 771227648UL, 771751935UL, "whois.apnic.net" },
{ 2523594752UL, 2523660287UL, "whois.apnic.net" }, { 2523594752UL, 2523660287UL, "whois.apnic.net" },
{ 2525036544UL, 2525102079UL, "whois.apnic.net" }, { 2525036544UL, 2525102079UL, "whois.apnic.net" },
{ 2532442112UL, 2532507647UL, "whois.apnic.net" }, { 2532442112UL, 2532507647UL, "whois.apnic.net" },

View File

@ -279,8 +279,10 @@ int main(int argc, char *argv[])
} else { } else {
#ifdef HAVE_SOLARIS_CRYPT_GENSALT #ifdef HAVE_SOLARIS_CRYPT_GENSALT
salt = crypt_gensalt(salt_prefix, NULL); salt = crypt_gensalt(salt_prefix, NULL);
if (!salt) if (!salt) {
perror("crypt_gensalt"); perror("crypt_gensalt");
exit(2);
}
#elif defined HAVE_LINUX_CRYPT_GENSALT #elif defined HAVE_LINUX_CRYPT_GENSALT
void *entropy = get_random_bytes(64); void *entropy = get_random_bytes(64);

View File

@ -4,11 +4,13 @@
# Any exceptions can be handled in tld_serv_list as usual, since it will # Any exceptions can be handled in tld_serv_list as usual, since it will
# be checked first. # be checked first.
abbott
abogado abogado
academy academy
accountants accountants
active active
actor actor
ads
adult adult
agency agency
airforce airforce
@ -16,6 +18,7 @@ allfinanz
alsace alsace
amsterdam amsterdam
android android
apartments
aquarelle aquarelle
archi archi
army army
@ -26,14 +29,19 @@ audio
autos autos
axa axa
band band
bank
bar bar
barclaycard
barclays
bargains bargains
bayern bayern
bbc
beer beer
berlin berlin
best best
bid bid
bike bike
bingo
bio bio
black black
blackfriday blackfriday
@ -41,6 +49,7 @@ bloomberg
blue blue
bmw bmw
bnpparibas bnpparibas
boats
boo boo
boutique boutique
brussels brussels
@ -55,6 +64,7 @@ cal
camera camera
camp camp
cancerresearch cancerresearch
canon
capetown capetown
capital capital
caravan caravan
@ -65,12 +75,17 @@ careers
cartier cartier
casa casa
cash cash
casino
catering catering
cbn
center center
ceo ceo
cern cern
cfd
channel channel
chat
cheap cheap
chloe
christmas christmas
chrome chrome
church church
@ -97,6 +112,7 @@ contractors
cooking cooking
cool cool
country country
courses
credit credit
creditcard creditcard
cricket cricket
@ -104,10 +120,13 @@ crs
cruises cruises
cuisinella cuisinella
cymru cymru
dabur
dad dad
dance dance
dating dating
datsun
day day
dclk
deals deals
degree degree
delivery delivery
@ -115,6 +134,7 @@ democrat
dental dental
dentist dentist
desi desi
design
dev dev
diamonds diamonds
diet diet
@ -136,7 +156,9 @@ energy
engineer engineer
engineering engineering
enterprises enterprises
epson
equipment equipment
erni
esq esq
estate estate
eurovision eurovision
@ -147,14 +169,18 @@ exchange
expert expert
exposed exposed
fail fail
fan
fans
farm farm
fashion fashion
feedback feedback
film
finance finance
financial financial
firmdale firmdale
fish fish
fishing fishing
fit
fitness fitness
flights flights
florist florist
@ -162,6 +188,8 @@ flowers
flsmidth flsmidth
fly fly
foo foo
football
forex
forsale forsale
foundation foundation
frl frl
@ -173,6 +201,7 @@ gal
gallery gallery
garden garden
gbiz gbiz
gdn
gent gent
ggee ggee
gift gift
@ -185,20 +214,28 @@ globo
gmail gmail
gmo gmo
gmx gmx
gold
goldpoint
golf
goo
goog
google google
gop gop
graphics graphics
gratis gratis
green green
gripe gripe
guge
guide guide
guitars guitars
guru guru
hamburg hamburg
hangout
haus haus
healthcare healthcare
help help
here here
hermes
hiphop hiphop
hiv hiv
holdings holdings
@ -210,9 +247,11 @@ hosting
house house
how how
ibm ibm
ifm
immo immo
immobilien immobilien
industries industries
infiniti
ing ing
ink ink
institute institute
@ -221,22 +260,28 @@ international
investments investments
irish irish
iwc iwc
java
jcb
jetzt jetzt
joburg joburg
juegos juegos
kaufen kaufen
kddi
kim kim
kitchen kitchen
kiwi kiwi
koeln koeln
krd krd
kred kred
kyoto
lacaixa lacaixa
land land
lat
latrobe latrobe
lawyer lawyer
lds lds
lease lease
leclerc
legal legal
lgbt lgbt
lidl lidl
@ -247,16 +292,20 @@ limo
link link
loans loans
london london
lotte
lotto lotto
ltda ltda
luxe luxe
luxury luxury
madrid madrid
maif
maison maison
management management
mango mango
market market
marketing marketing
markets
marriott
media media
meet meet
melbourne melbourne
@ -274,26 +323,35 @@ mortgage
moscow moscow
motorcycles motorcycles
mov mov
mtpc
nagoya nagoya
navy navy
network network
neustar neustar
new new
news
nexus nexus
ngo ngo
nhk nhk
nico
ninja ninja
nissan
nra nra
nrw nrw
ntt
nyc nyc
okinawa okinawa
one
ong ong
onl onl
online
ooo ooo
oracle
organic organic
osaka osaka
otsuka otsuka
ovh ovh
page
paris paris
partners partners
parts parts
@ -303,12 +361,15 @@ photo
photography photography
photos photos
physio physio
piaget
pics pics
pictet
pictures pictures
pink pink
pizza pizza
place place
plumbing plumbing
plus
pohl pohl
poker poker
porn porn
@ -349,9 +410,11 @@ saarland
sale sale
samsung samsung
sarl sarl
saxo
sca sca
scb scb
schmidt schmidt
school
schule schule
schwarz schwarz
science science
@ -361,7 +424,9 @@ sew
sexy sexy
shiksha shiksha
shoes shoes
shriram
singles singles
site
sky sky
social social
software software
@ -371,6 +436,10 @@ solutions
soy soy
space space
spiegel spiegel
spreadbetting
study
style
sucks
supplies supplies
supply supply
support support
@ -383,7 +452,10 @@ taipei
tatar tatar
tattoo tattoo
tax tax
tech
technology technology
temasek
tennis
tienda tienda
tips tips
tires tires
@ -392,9 +464,12 @@ today
tokyo tokyo
tools tools
top top
toshiba
tours
town town
toys toys
trade trade
trading
training training
trust trust
tui tui
@ -433,6 +508,7 @@ works
world world
wtc wtc
wtf wtf
xin
xn--1qqw23a xn--1qqw23a
xn--3bst00m xn--3bst00m
xn--3ds443g xn--3ds443g
@ -445,6 +521,7 @@ xn--6qq986b3xl
xn--80adxhks xn--80adxhks
xn--80asehdb xn--80asehdb
xn--80aswg xn--80aswg
xn--b4w605ferd
xn--c1avg xn--c1avg
xn--cg4bki xn--cg4bki
xn--czr694b xn--czr694b
@ -459,6 +536,7 @@ xn--i1b6b1a6a2e
xn--io0a7i xn--io0a7i
xn--kput3i xn--kput3i
xn--mgbab2bd xn--mgbab2bd
xn--mxtq1m
xn--ngbc5azd xn--ngbc5azd
xn--nqv7f xn--nqv7f
xn--nqv7fs00ema xn--nqv7fs00ema
@ -471,11 +549,13 @@ xn--unup4y
xn--vermgensberater-ctb xn--vermgensberater-ctb
xn--vermgensberatung-pwb xn--vermgensberatung-pwb
xn--vhquv xn--vhquv
xn--vuq861b
xn--xhq521b xn--xhq521b
xn--zfr164b xn--zfr164b
xyz xyz
yachts yachts
yandex yandex
yodobashi
yoga yoga
yokohama yokohama
youtube youtube

View File

@ -192,7 +192,7 @@
.kp NONE # NIC? http://www.star.co.kp/ .kp NONE # NIC? http://www.star.co.kp/
.kr whois.kr .kr whois.kr
.kw WEB http://www.kw/ .kw WEB http://www.kw/
.ky WEB http://kynseweb.messagesecure.com/kywebadmin/ # http://www.icta.ky/ .ky whois.kyregistry.ky
.kz whois.nic.kz .kz whois.nic.kz
.la whois.nic.la .la whois.nic.la
.lb WEB http://www.aub.edu.lb/lbdr/ .lb WEB http://www.aub.edu.lb/lbdr/
@ -245,6 +245,8 @@
.pe kero.yachay.pe .pe kero.yachay.pe
.pf whois.registry.pf .pf whois.registry.pf
.pg NONE # http://www.unitech.ac.pg/ .pg NONE # http://www.unitech.ac.pg/
.edu.ph WEB http://services.ph.net/dns/query.pl
.gov.ph NONE # http://dns.gov.ph/
.ph WEB http://www.dot.ph/whois .ph WEB http://www.dot.ph/whois
.pk WEB http://www.pknic.net.pk/ .pk WEB http://www.pknic.net.pk/
.co.pl whois.co.pl # "unofficial" SLD .co.pl whois.co.pl # "unofficial" SLD
@ -270,7 +272,7 @@
.se whois.iis.se .se whois.iis.se
.sg whois.sgnic.sg .sg whois.sgnic.sg
.sh whois.nic.sh .sh whois.nic.sh
.si whois.arnes.si .si whois.register.si
.sj NONE # http://www.norid.no/domenenavnbaser/bv-sj.html .sj NONE # http://www.norid.no/domenenavnbaser/bv-sj.html
.sk whois.sk-nic.sk .sk whois.sk-nic.sk
.sl whois.nic.sl .sl whois.nic.sl
@ -296,7 +298,6 @@
.tm whois.nic.tm .tm whois.nic.tm
.tn whois.ati.tn .tn whois.ati.tn
.to whois.tonic.to .to whois.tonic.to
.tp NONE # phase out in progress
.tr whois.nic.tr .tr whois.nic.tr
.tt WEB http://www.nic.tt/cgi-bin/search.pl .tt WEB http://www.nic.tt/cgi-bin/search.pl
.tv VERISIGN tvwhois.verisign-grs.com .tv VERISIGN tvwhois.verisign-grs.com
@ -353,6 +354,7 @@
.xn--45brj9c whois.inregistry.net # India, Bengali AW .xn--45brj9c whois.inregistry.net # India, Bengali AW
.xn--80ao21a whois.nic.kz # Kazakhstan .xn--80ao21a whois.nic.kz # Kazakhstan
.xn--90a3ac whois.rnids.rs # Serbia .xn--90a3ac whois.rnids.rs # Serbia
.xn--90ais whois.cctld.by # Belarus
.xn--clchc0ea0b2g2a9gcd whois.sgnic.sg # Singapore, Tamil .xn--clchc0ea0b2g2a9gcd whois.sgnic.sg # Singapore, Tamil
.xn--d1alf whois.marnet.mk # Macedonia .xn--d1alf whois.marnet.mk # Macedonia
.xn--fiqs8s cwhois.cnnic.cn # China, Simplified Chinese .xn--fiqs8s cwhois.cnnic.cn # China, Simplified Chinese

14
whois.c
View File

@ -361,6 +361,9 @@ int handle_query(const char *hserver, const char *hport,
if (!server) if (!server)
return 1; return 1;
if (*server == '\0')
return 0;
query_string = queryformat(server, flags, query); query_string = queryformat(server, flags, query);
if (verb) { if (verb) {
printf(_("Using server %s.\n"), server); printf(_("Using server %s.\n"), server);
@ -708,13 +711,13 @@ int hide_line(int *hiding, const char *const line)
} else if (*hiding > HIDE_NOT_STARTED) { /* hiding something */ } else if (*hiding > HIDE_NOT_STARTED) { /* hiding something */
if (*hide_strings[*hiding + 1] == '\0') { /*look for a blank line?*/ if (*hide_strings[*hiding + 1] == '\0') { /*look for a blank line?*/
if (*line == '\n' || *line == '\r' || *line == '\0') { if (*line == '\n' || *line == '\r' || *line == '\0') {
*hiding = HIDE_DISABLED; /* stop hiding */ *hiding = HIDE_NOT_STARTED; /* stop hiding */
return 0; /* but do not hide the blank line */ return 0; /* but do not hide the blank line */
} }
} else { /*look for a matching string*/ } else { /*look for a matching string*/
if (strneq(line, hide_strings[*hiding + 1], if (strneq(line, hide_strings[*hiding + 1],
strlen(hide_strings[*hiding + 1]))) { strlen(hide_strings[*hiding + 1]))) {
*hiding = HIDE_DISABLED; /* stop hiding */ *hiding = HIDE_NOT_STARTED; /* stop hiding */
return 1; /* but hide the last line */ return 1; /* but hide the last line */
} }
} }
@ -810,9 +813,10 @@ char *query_crsnic(const int sock, const char *query)
is queried */ is queried */
if (state == 0 && strneq(buf, " Domain Name:", 15)) if (state == 0 && strneq(buf, " Domain Name:", 15))
state = 1; state = 1;
if (state == 1 && strneq(buf, " Whois Server:", 16)) { if (state == 1 && (strneq(buf, " Whois Server:", 16)
for (p = buf; *p != ':'; p++); /* skip until colon */ || strneq(buf, " WHOIS Server:", 16))) {
for (p++; *p == ' '; p++); /* skip colon and spaces */ for (p = buf; *p != ':'; p++); /* skip until the colon */
for (p++; *p == ' '; p++); /* skip the spaces */
referral_server = strdup(p); referral_server = strdup(p);
if ((p = strpbrk(referral_server, "\r\n "))) if ((p = strpbrk(referral_server, "\r\n ")))
*p = '\0'; *p = '\0';