一个很简单的python脚本,监听本地DNS请求,以TCP方式去获取并返回。
具体不多讲,聪明的你自己来领会。
github地址
https://github.com/henices/Tcp-DNS-proxy
= How to use this python script ?
1) change your dns server to 127.0.0.1
$ vi /etc/resolve.conf
nameserver 127.0.0.1
2) restart the network
$ sudo /etc/init.d/networking restart
3) run the script
$ sudo python tcpdns.py
具体不多讲,聪明的你自己来领会。
github地址
https://github.com/henices/Tcp-DNS-proxy
= How to use this python script ?
1) change your dns server to 127.0.0.1
$ vi /etc/resolve.conf
nameserver 127.0.0.1
2) restart the network
$ sudo /etc/init.d/networking restart
3) run the script
$ sudo python tcpdns.py