可疑结果Internic WHOIS查询

时间:2010-12-11 04:52:26

标签: php whois

我使用以下代码测试了对Internic WHOIS的访问权限:

$domains = array('google.com');
$internic = fsockopen('whois.internic.net', 43);

if (is_resource($internic) === true)
{
    foreach ($domains as $domain)
    {
        fwrite($internic, $domain . "\r\n");
        socket_set_timeout($internic, 30);

        while (feof($internic) !== true)
        {
            ph()->Dump(fread($internic, 4096));
        }
    }

    fclose($internic);
}

令人惊讶的是,这是我得到的输出:

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

GOOGLE.COM.ZZZZZZZZZZZZZ.GET.ONE.MILLION.DOLLARS.AT.WWW.UNIMUNDI.COM
GOOGLE.COM.ZZZZZZ.THE.BEST.WEBHOSTING.AT.WWW.FATUCH.COM
GOOGLE.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM
GOOGLE.COM.ZOMBIED.AND.HACKED.BY.WWW.WEB-HACK.COM
GOOGLE.COM.ZNAET.PRODOMEN.COM
GOOGLE.COM.YUCEKIRBAC.COM
GOOGLE.COM.YUCEHOCA.COM
GOOGLE.COM.WORDT.DOOR.VEEL.WHTERS.GEBRUIKT.SERVERTJE.NET
GOOGLE.COM.VN
GOOGLE.COM.UY
GOOGLE.COM.UA
GOOGLE.COM.TW
GOOGLE.COM.TR
GOOGLE.COM.SUCKS.FIND.CRACKZ.WITH.SEARCH.GULLI.COM
GOOGLE.COM.SPROSIUYANDEKSA.RU
GOOGLE.COM.SERVES.PR0N.FOR.ALLIYAH.NET
GOOGLE.COM.SANATATEA-NOASTRA.COM
GOOGLE.COM.SA
GOOGLE.COM.PE
GOOGLE.COM.P2NK-AJA.COM
GOOGLE.COM.MX
GOOGLE.COM.LASERPIPE.COM
GOOGLE.COM.IS.SHIT.SQUAREBOARDS.COM
GOOGLE.COM.IS.NOT.HOSTED.BY.ACTIVEDOMAINDNS.NET
GOOGLE.COM.IS.HOSTED.ON.PROFITHOSTING.NET
GOOGLE.COM.IS.APPROVED.BY.NUMEA.COM
GOOGLE.COM.HICHINA.COM
GOOGLE.COM.HAS.LESS.FREE.PORN.IN.ITS.SEARCH.ENGINE.THAN.SECZY.COM
GOOGLE.COM.ESJUEGOS.NET
GOOGLE.COM.DO
GOOGLE.COM.CO
GOOGLE.COM.CN
GOOGLE.COM.BR
GOOGLE.COM.BEYONDWHOIS.COM
GOOGLE.COM.AU
GOOGLE.COM.AR
GOOGLE.COM.AFRICANBATS.ORG
GOOGLE.COM

To single out one record, look it up with "xxx", where xxx is one of the
of the records displayed above. If the records are the same, look them up
with "=xxx" to receive a full display for each record.

>>> Last update of whois database: Sat, 11 Dec 2010 04:45:42 UTC <<<

有谁知道我为什么会得到这种奇怪的回应?

1 个答案:

答案 0 :(得分:2)

为完全匹配添加等号,否则您将通过google.com获得启动的任何内容。请参阅http://allmybrain.com/2007/10/10/programming-a-client-for-the-whois-protocol/,大约是页面的一半。

事实证明这在这个特定的服务器上是不正确的,“=”反而意味着显示所有匹配的完整记录(因为,重新阅读时,信息消息说明)。而是使用“domain”关键字,例如:“domain google.com”。

jcomeau@intrepid:~/rentacoder/jlw14/est$ telnet whois.internic.net 43
Trying 199.7.55.74...
Connected to whois.internic.net.
Escape character is '^]'.
domain google.com

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

   Domain Name: GOOGLE.COM
   Registrar: MARKMONITOR INC.
   Whois Server: whois.markmonitor.com
   Referral URL: http://www.markmonitor.com
   Name Server: NS1.GOOGLE.COM
   Name Server: NS2.GOOGLE.COM
   Name Server: NS3.GOOGLE.COM
   Name Server: NS4.GOOGLE.COM
   Status: clientDeleteProhibited
   Status: clientTransferProhibited
   Status: clientUpdateProhibited
   Status: serverDeleteProhibited
   Status: serverTransferProhibited
   Status: serverUpdateProhibited
   Updated Date: 15-sep-2010
   Creation Date: 15-sep-1997
   Expiration Date: 14-sep-2011

>>> Last update of whois database: Sat, 11 Dec 2010 05:28:12 UTC <<<

NOTICE: The expiration date displayed in this record is the date the 
registrar's sponsorship of the domain name registration in the registry is 
currently set to expire. This date does not necessarily reflect the expiration 
date of the domain name registrant's agreement with the sponsoring 
registrar.  Users may consult the sponsoring registrar's Whois database to 
view the registrar's reported date of expiration for this registration.
[yadda yadda...]