因此,我已经提取了这个方便的TLD列表,并且打算对其进行测试。我已经从.tsv加载了文件并将其保存在矢量中。当我尝试打开从端口43
到whois.verisign-grs.com
的套接字连接时,我得到的只是Error #2031: Socket Error. URL: whois.verisign-grs.com
。没有触发连接或任何东西。 AIR(或我)会做一些自动不符合RFC3912的事情吗?
private function prepConn():void
{
socket = new Socket();
socket.addEventListener(Event.CONNECT, connectHandler);
socket.addEventListener(Event.CLOSE, closeHandler);
socket.addEventListener(ErrorEvent.ERROR, errorHandler);
socket.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
socket.addEventListener(ProgressEvent.SOCKET_DATA, dataHandler);
}
private function ioErrorHandler(e:IOErrorEvent):void
{
trace("IOError"); //<-- Gets called. Never triggers connected.
trace(e.errorID);
trace(e.text);
}
private function errorHandler(e:ErrorEvent):void
{
trace("Error");
trace(e.errorID);
trace(e.text);
}
private function connectHandler(e:Event):void
{
trace("Connected"); //<-- Gets called when going to whois.google.com. All ok.
}
private function closeHandler(e:Event):void
{
trace("Close");
}
public function lookup(domain:String):void
{
//...
//If all passes, perform a lookup.
try
{ // whois.verisign-grs.com - 43
socket.connect(whoisServer[lookupID], QUERY_PORT);
}
catch (ioError:IOError)
{
trace("IOError on startup");
trace(ioError.name);
trace(ioError.errorID);
trace(ioError.message);
}
catch (secError:SecurityError)
{
trace("Security Error?");
}
}
private function dataHandler(event:ProgressEvent):void
{
trace("Progress event to be handled after I get a conn...");
}
}
}
用于Windows的Telnet并不是最大的问题。只有打吗? +输入,关闭和重新连接可以获取成功的查询。但是我可以从我的机器连接。 [编辑:有时。有时,在反复测试后,我输入域名时,它喜欢关闭连接。不确定是否相关]
Server Name: SFXWORKS.NET
IP Address: 107.170.1.55
Registrar: Google Inc.
Registrar WHOIS Server: whois.google.com
Registrar URL: http://domains.google.com
Domain Name: SFXWORKS.NET
Registry Domain ID: 1664279338_DOMAIN_NET-VRSN
Registrar WHOIS Server: whois.google.com
Registrar URL: http://domains.google.com
Updated Date: 2018-08-01T19:20:07Z
Creation Date: 2011-06-28T21:26:48Z
Registry Expiry Date: 2019-06-28T21:26:48Z
Registrar: Google Inc.
Registrar IANA ID: 895
Registrar Abuse Contact Email: registrar-abuse@google.com
Registrar Abuse Contact Phone: +1.8772376466
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Name Server: LORNA.NS.CLOUDFLARE.COM
Name Server: MICAH.NS.CLOUDFLARE.COM
DNSSEC: signedDelegation
DNSSEC DS Data: 2371 13 2 04939CE20FDDD15F0F6DC314992BC72238BAD3845F6514856115EEB989BDB83C
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2018-08-02T08:54:17Z <<<
For more information on Whois status codes, please visit https://icann.org/epp
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.
TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability. VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.
The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.
编辑:看来我可以连接到whois.google.com
了。所以..不确定他们的注册商现在不是Google时,我该怎么做才能使这项工作成功。