Skip to content

RicterZ/simple-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simple-dns

A simple regular-expression based DNS server, based on twisted.

Usage

hosts 文件里指定要劫持的域名,格式为:

#IP            Domain
127.0.0.1     www.alipay.com
127.0.0.1     /.*?\.alipay\.com/

支持正则表达式,用/包围。
非劫持域名会向上级 DNS Server 递归查询,返回正确的 IP 地址。

Sample

Attacker(127.0.0.1):

sudo python dns.py

Target(127.0.0.1):

➜  ~ nslookup 
> server 127.0.0.1
Default server: 127.0.0.1
Address: 127.0.0.1#53
> test.website
Server:		127.0.0.1
Address:	127.0.0.1#53
   
Non-authoritative answer:
Name:	test.website
Address: 1.1.1.1
> 

About

A simple regular-expression based DNS server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages