加入收藏 | 设为首页 | 会员中心 | 我要投稿 威海站长网 (https://www.0631zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长资讯 > 外闻 > 正文

mpDNS:Python实现的多功能DNS服务器

发布时间:2019-03-21 23:08:54 所属栏目:外闻 来源:Freebuf
导读:简单、可配置的 clone和run DNS服务器,具有多种有用的功能。 适用于Python 2和3 names.db 包含所有自定义记录(参见示例) 简单的通配符,如* .example.com 捕获unicode dns请求 自定义动作又称宏: -{{shellexec::diggoogle.com+short}}执行shell命令并使

DB的定期解决方案:

  1. dig test.example.com @localhost 
  1. ;; ANSWER SECTION:  
  2. test.example.com. 0 IN A 8.8.8.8 

mpDNS输出:

  1. - Request from 127.0.0.1:57698 -> test.example.com. -> 8.8.8.8 (A) 

递归CNAME解析:

  1. dig c1.example.com @localhost 
  1. ;; QUESTION SECTION: 
  2. ;c1.example.com.            IN    A 
  3. ;; ANSWER SECTION: 
  4. c1.example.com.        0    IN    CNAME    c2.example.com. 
  5. c2.example.com.        0    IN    CNAME    c3.example.com. 
  6. c3.example.com.        0    IN    CNAME    google.example.com. 
  7. google.example.com.    0    IN    CNAME    google.com. 
  8. google.com.        0    IN    A    216.58.206.14 

mpDNS输出:

  1. - Request from 127.0.0.1:44120      -> c1.example.com.        -> c2.example.com (CNAME) 
  2. - Request from 127.0.0.1:44120      -> c2.example.com        -> c3.example.com (CNAME) 
  3. - Request from 127.0.0.1:44120      -> c3.example.com        -> google.example.com (CNAME) 
  4. - Request from 127.0.0.1:44120      -> google.example.com    -> google.com (CNAME) 
  5. - Request from 127.0.0.1:44120      -> google.com            -> {{resolve::self}} (A) 

通配符解析:

  1. dig not-in-db.com @localhost 
  1. ;; ANSWER SECTION: 
  2. not-in-db.com. 0 IN A 127.0.0.1 

mpDNS输出:

  1. - Request from 127.0.0.1:38528 -> not-in-db.com. -> 127.0.0.1 (A) 

通配符子域解析:

  1. dig wildcard.example.com @localhost 

  1. ;; ANSWER SECTION: 
  2. wildcard.example.com. 0 IN A 7.7.7.7 

mpDNS输出:

  1. - Request from 127.0.0.1:39691 -> wildcard.example.com. -> 7.7.7.7 (A) 

转发请求宏:

  1. dig google.com @localhost 
  1. ;; ANSWER SECTION: 
  2. google.com. 0 IN A 172.217.22.110 

mpDNS输出:

  1. - Request from 127.0.0.1:53487 -> google.com. -> {{resolve::self}} (A) 

自定义域宏的转发请求:

  1. dig notgoogle.com @localhost 
  1. ;; ANSWER SECTION: 
  2. notgoogle.com. 0 IN A 172.217.22.110 

mpDNS输出:

  1. - Request from 127.0.0.1:47797 -> notgoogle.com. -> {{resolve::google.com}} (A) 

(编辑:威海站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读