当前位置: 首页 > wzjs >正文

做网站需要学jsp个人网上卖货的平台

做网站需要学jsp,个人网上卖货的平台,超酷网站模板,网站搭建服务器需要什么前阵子发现一直想注册但被别人注册了的一个域名快要过期了,就想着写个脚本跑在电脑上,每分钟检查一次域名状态,一旦域名被正式删除,就发封邮件通知我,这样就不用频繁手动检查域名状态了。 写脚本时发现一个有趣的现象…

前阵子发现一直想注册但被别人注册了的一个域名快要过期了,就想着写个脚本跑在电脑上,每分钟检查一次域名状态,一旦域名被正式删除,就发封邮件通知我,这样就不用频繁手动检查域名状态了。

写脚本时发现一个有趣的现象,使用whois命令查询域名状态时,它给我返回了两组信息,而且这两组信息的域名状态竟然是不一致的,让人非常好奇,所以特意了解了一下whois的机制,记录在这里。

$ whois $DOMAIN | grep "Domain Status"Domain Status: pendingDelete https://icann.org/epp#redemptionPeriod
Domain Status: pendingDelete https://icann.org/epp#ok

在whois返回的两组信息中,第一组来自注册局(Registry,如VeriSign),第二组来自注册商(Registrar,如阿里云),注册商通常拥有比注册局更加详细的域名信息。whois会执行递归查询:首先从注册局查询域名信息,注册局返回的信息中包含注册商的whois服务器,然后再向注册商查询域名信息。调用whois命令时加上--verbose参数可以观察到这个过程:

$ whois $DOMAIN --verbose | grep -E "Using server|Registrar WHOIS Server"
Using server whois.verisign-grs.com.Registrar WHOIS Server: whois.paycenter.com.cn
Using server whois.paycenter.com.cn.
Registrar WHOIS Server: whois.paycenter.com.cn

那么问题来了:注册商whois服务器是从注册局查询得来的,那注册局whois服务器是从哪里来的呢?答案是硬编码。whois命令源码中包含一个tld_serv_list文件,里面包含各顶级域名的注册局whois服务器,以下是该文件的节选:

...
.com	VERISIGN whois.verisign-grs.com.za.net	whois.za.net
.net	VERISIGN whois.verisign-grs.com.eu.org	whois.eu.org
.za.org	whois.za.org
.org	whois.pir.org.edu	whois.educause.edu
.gov	whois.dotgov.gov
.int	whois.iana.org
.mil	NONE
...

既然whois信息保存在不止一个地方,那么由于数据同步的延迟,有时信息不一致也就不足为奇了,那到底该以哪边为准呢?就域名状态而言,应当以注册局的信息为准,https://lookup.icann.org/en/faq里面提供了各字段的数据源,以下是摘录:

Result LabelDescriptionSource
Domain Information
NameThe name of the domain name which was entered into the lookup tool.Registry
Internationalized Domain NameThe non-ASCII character name of the domain name which was entered into the lookup tool, if applicable.Registry
Registry Domain IDRegistry-unique identifier for a domain name.Registry
Domain StatusThe status of a domain name registration. Every domain has at least one status code, but they can also have more than one status code. See EPP Status Codes for more info.Registry
NameserversInformation regarding the domain name’s DNS nameservers. To include nameserver unicode name and IP addresses, where applicable.Registry
Dates
DatesMultiple dates may be displayed in the “Dates” section and can include the date when the domain name registration was created, expires, and updated, as applicable.Registry/Registrar
Contact Information
Registrant, Administrative, Technical, and Billing Contact InformationThe contact information of the registrant, administrative, technical, and billing contacts will appear in this section, where applicable.Registrar
Registrar Information
NameThe name of the registrar sponsoring the domain name’s registration.Registrar
IANA IDThe registrar’s IANA ID from the IANA’s Registrar ID registry (https://www.iana.org/assignments/registrar-ids/registrar-ids.xhtml)Registry
Abuse contact emailThe abuse contact email address of the registrar.Registrar
Abuse contact phoneThe abuse contact telephone number of the registrar.Registrar

我关心的是域名状态这个信息,为了防止从注册商那里获取到过时的数据,可以使用-h选项指定只从注册局获取数据:

$ whois $DOMAIN -h whois.verisign-grs.com --verbose | grep -E "Using server|Domain Status"
Using server whois.verisign-grs.com.Domain Status: ok https://icann.org/epp#redemptionPeriod

后来又改用js,在js中使用whois模块时也有类似的问题,需要指定server参数和follow参数来防止对注册商服务器进行查询:

whois.lookup(domain, { server: "whois.verisign-grs.com", follow: 0 }, (err, data) => {if (err) return reject(err);let statusLines = data.split("\n").filter(line => /Domain Status/i.test(line)).map(line => {const match = line.match(/Domain Status:\s+(\w+)/i);return match ? match[1] : "";}).sort().join("\n");if (statusLines === "") {statusLines = "(empty)";}resolve(statusLines);
});

不过最终的结局是仍然没能注册上这个域名,今天早上醒来,发现域名已经被人注册了,域名状态在半夜两点多发生了变化,从pendingDelete状态直接变更为了ok。这个域名就是我名字的全拼,有9个字母,不知道有啥稀罕的┑( ̄Д  ̄)┍

http://www.dtcms.com/wzjs/202021.html

相关文章:

  • wordpress logo 字体颜色seo系统培训哪家好
  • 做电商有哪些网站有哪些优化设计的答案
  • 健身网站开发背景及意义经典网络营销案例
  • 二手房网站怎么做才能接到电话黑科技引流软件是真的吗
  • 58同城推广能免费做网站吗windows优化大师自动下载
  • 现在外国有哪个网站可以做卖东西windows优化大师功能
  • 做网站插入音乐用什么下载网络优化工程师是干什么的
  • wordpress网站关键词如何做seo优化
  • 扶贫工作网站怎么做无锡seo优化公司
  • 黑客如何攻击网站怎样自己做网站
  • html5做的网站处理器优化软件
  • 政府网站规划彼亿营销
  • php能开发大型网站视频号怎么付费推广
  • 网站 服务器 域名制作网站教程
  • 做期货网站违法的吗软文代发
  • 深圳网站建设大公司好企业推广策划书
  • 自助建站平台哪家好网上引流推广怎么做
  • 四川省建设厅职业注册中心网站品牌推广策略
  • 做六级真题的网站百度网站推广价格
  • 中国建设监理业协会网站百度销售岗位怎么样
  • 南昌网站建设费用百度关键词推广公司
  • 国外做ae模板网站大全网站seo排名优化
  • 江苏省住房和城乡建设委员会官方网站长沙网站se0推广优化公司
  • 建网站手机软件淘宝摄影培训推荐
  • windows 做网站服务器吗在百度上怎么打广告
  • 怎样设计网站模板百度pc网页版登录入口
  • 车子网站旺道seo推广有用吗
  • 哈尔滨seo网站排名网站的优化公司
  • 装修公司展厅布置方案谷歌seo是什么意思
  • 天河手机网站建设百度地图导航