通过“挖”的域名存在 [英] Domain name existence via "dig"

查看:175
本文介绍了通过“挖”的域名存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以通过检查dig的输出来检查域名的存在吗?
在绑定源中我发现这些常量:

  0 DNS_R_NOEROR 
1 DNS_R_FORMERR
2 DNS_R_SERVFAIL
3 DNS_R_NXDOMAIN
4 DNS_R_NOTIMP
5 DNS_R_REFUSED
6 DNS_R_YXDOMAIN
7 DNS_R_YXRRSET
8 DNS_R_NXRRSET
9 DNS_R_NOTAUTH
10 DNS_R_NOTZONE
16 DNS_R_BADVERS

< RCODE 11> #11没有宏
< RCODE 12> #12没有宏
< RCODE 13> #13没有宏
< RCODE 14> #14没有宏
< RCODE 15> #15没有宏

在我看来,NOERROR& SERVFAIL意味着主机名存在(尽管它并不意味着ip被链接到它)。 NXDOMAIN意味着绝对不存在。



我不喜欢使用whois,因为它相当慢。挖掘速度要快得多,因为我只需要确定主机名不存在。



有人可以照亮我的假设和其他宏吗? p>

谢谢

解决方案

嗯,在某些情况下可能会起作用,但是大多数情况下,您会看到不正确的结果 - 某些域已注册,但在TLD名称服务器中没有记录。一些域名已配置记录但未注册,因为某些注册表配置了通配符域:

  $ dig asdfasdfasdfxvyxv123.de.com A +短
91.213.214.122

$ whois -h whois.centralnic.com asdfasdfasdfxvyxv123.de.com
DOMAIN NOT FOUND

whois确实很慢 - 与/您的域名提供商通话,大多数注册管理机构提供更快的方法来检查域名是否注册(即EPP协议)


Would it be possible to check a domain name its existence by checking the output of "dig"? Inside the bind sources I found these constants:

0 DNS_R_NOEROR
1 DNS_R_FORMERR
2 DNS_R_SERVFAIL
3 DNS_R_NXDOMAIN
4 DNS_R_NOTIMP
5 DNS_R_REFUSED
6 DNS_R_YXDOMAIN
7 DNS_R_YXRRSET
8 DNS_R_NXRRSET
9 DNS_R_NOTAUTH
10 DNS_R_NOTZONE
16 DNS_R_BADVERS

<RCODE 11>     # 11 has no macro
<RCODE 12>     # 12 has no macro
<RCODE 13>     # 13 has no macro
<RCODE 14>     # 14 has no macro
<RCODE 15>     # 15 has no macro

In my opinion NOERROR & SERVFAIL means the hostname exists (although it doesn't mean an ip is linked to it). NXDOMAIN would mean it absolutely not exists.

I prefer not to use whois because it is quite slow. dig is much faster as I just need to be certain that the hostname doesn't exist yet.

Could someone shine their light on my assumptions and the other macros?

Thanks

解决方案

Well, in some cases it might work, but in most cases you will see incorrect results- some domains are registered but do not have a record in the TLD name server. And some domains have a record configured but are not registered as some registries have wildcard domains configured:

$ dig asdfasdfasdfxvyxv123.de.com A +short 
91.213.214.122

$ whois -h whois.centralnic.com asdfasdfasdfxvyxv123.de.com
DOMAIN NOT FOUND

whois indeed is slow - speak to a/your domain provider, most registries offer faster methods to check if a domain is registered or not (i.e. EPP protocol)

这篇关于通过“挖”的域名存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆