首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >解析whois答案

解析whois答案
EN

Stack Overflow用户
提问于 2010-03-10 07:31:24
回答 2查看 2.3K关注 0票数 9

我想像这样创建whois类。

代码语言:javascript
复制
public class DomainInfo
{

     public string NameServer {get;set;}        
     public string CreationDate {get;set;}
     public string UpdatedDate {get;set;} 
     public string ExpirationDate {get;set;}
     public string Status {get;set;}        
     public string RegistrantName {get;set;}
     public string RegistrantOrganization {get;set;}
     public string Registrantemail {get;set;}        
     public static DomainInfo Parse(string inputData)
  {
     ......
  }
}

但我有一些问题,因为不同的DNS服务器返回不同的答案,而且解析返回的答案是一项非常困难的任务。如何做到这一点?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2010-03-10 07:44:51

以下是一篇博客文章的链接,其中包含一些可能会有所帮助的C#代码:

http://blog.flipbit.co.uk/2009/06/querying-whois-server-data-with-c.html

您可能会在遇到无法获得所需数据的实例时调整解析代码,但我不认为有一个万能的解决方案。

票数 2
EN

Stack Overflow用户

发布于 2010-03-10 07:36:43

如果不为您遇到的每个whois数据库实现一个解析器,就不可能做到这一点。

Whois没有标准化的格式,大多数注册表甚至没有whois上的所有可用信息,而是为您提供了一个句柄,您可以在填写验证码时通过HTTP检查:

代码语言:javascript
复制
$ whois google.no
% Kopibeskyttet, se http://www.norid.no/domenenavnbaser/whois/kopirett.html
% Rights restricted by copyright. See http://www.norid.no/domenenavnbaser/whois/kopirett.en.html

Domain Information

Domain Name................: google.no
Organization Handle........: GNA78O-NORID
Registrar Handle...........: REG466-NORID
Legal-c Handle.............: RH1355P-NORID
Tech-c Handle..............: JM722P-NORID
Zone-c Handle..............: JM722P-NORID
...
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2413431

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档