From kalilinuxtutorials.com
mpDNS aka multi-purpose DNS server is a simple, configurable “clone & run” DNS server with multiple useful features.
- Should work on Python 2 and 3
- names.db -> holds all custom records (see examples)
- Simple wildcards like *.example.com
- Catch unicode dns requests
- Custom actions aka macro:
{{shellexec::dig google.com +short}}
-> Execute shell command and respond with result{{eval::res = '1.1.1.%d' % random.randint(0,256)}}
-> Evaluate your python code{{file::/etc/passwd}}
-> Respond with localfile contents{{resolve}}
-> Forward DNS request to local system DNS{{resolve::example.com}}
-> Resolve example.com instead of original record{{echo}}
-> Response back with peer address{{shellexec::echo %PEER% %QUERY%}}
-> Use of variables
- Supported query types:
A
,CNAME
,TXT
- Update
names.db
records without restart/reload with./mpdns.py -e