Why wouldn't dns_get_record show CNAMEs when I KNOW they exist?

故事扮演 提交于 2019-12-01 12:31:26
morewry

I think I've figured out why. I believe this has to do with "Zone Transfers" per this thread Is it possible to find all DNS subdomains for a given domain name?.

What I expect is the same functionality from the CNAME lookup as A, NS, MX--EVERYTHING ELSE. (Hardly an unrealistic expectation...)

dns_get_record("domain.com", DNS_CNAME, $authns_cname, $addtl_cname);

I expect to get back an array populated with all the CNAMES set up for domain.com. That's not what happens.

  • I can get back the single CNAME entry for "www.domain.com" if that is the domain I pass in and there is a CNAME for it.
  • I can get back the single CNAME entry for "*.domain.com" if that is the domain I pass in and there is a CNAME for it.
  • I cannot get back literally all the CNAME records in order to save a record of all the CNAMES/subdomains/third level domains for domain.com, wildcard search or not.

I suppose I just had to phrase the question right (15th permutation found that promising answer). I assume both name servers (Dreamhost and my company's) are "protected" against this. Though it seems to me not to be terribly sensitive information in comparison to the rest of the DNS records.

$www = dns_get_record("www.microsoft.com", DNS_CNAME);
  //print_r($www);
  //echo $www[0]['target'];
while ($www[0]['target']) {
  echo "<br/>-- ".$www[0]['target'];
  $www = dns_get_record($www[0]['target'], DNS_CNAME);
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!