DNSPod / dnspod-sr

A faster recursive dns server from DNSPod
Other
1.36k stars 328 forks source link

拥有CNAME的域名无法被劫持 #54

Open SIGLALALA opened 7 years ago

SIGLALALA commented 7 years ago

www.baidu.com. 1216 IN CNAME www.a.shifen.com. www.a.shifen.com. 313 IN A 119.75.218.70 www.a.shifen.com. 313 IN A 119.75.217.109 类似于这样的,我在records.z里写www.douban.com. 172800 IN 222.222.222.222然后 ./client.c "hijack" 然后dig 域名还是以上的三条。文件里的222.222.222.222不生效。请问带有CNAME的域名如何劫持?

SIGLALALA commented 7 years ago

我试验了在records.z里这样写www.baidu.com. 172800 IN CNAME www.a.shifen.com www.a.shifen.com 172800 IN A 222.222.222.222这样能生效。 但是我的需求是只写一条A记录。www.baidu.com 172800 IN A 222.222.222.222 这样能实现吗,或者源代码我需要修改什么地方?