Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
A configurable DNS proxy server library
License
ronin-rb/ronin-dns-proxy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ronin-dns-proxy is a configurable DNS proxy server library. It supportsreturning spoofing DNS results or passing DNS queries through to the upstreamDNS nameserver.
- Supports returning spoofed results to specific DNS queries.
- Supports matching queries with regular expressions.
- Supports dynamic DNS server rules.
- Passing through all other DNS queries.
- Has 95% documentation coverage.
- Has 100% test coverage.
require'ronin/dns/proxy'Ronin::DNS::Proxy.run('127.0.0.1',2346)do |server|server.rule:A,'example.com','10.0.0.1'server.rule:AAAA,'example.com','dead:beef::1'# return multiple valuesserver.rule:A,'ftp.example.com',['10.0.0.42','10.0.0.43']# match a query using a regexserver.rule:TXT,/^spf\./,"v=spf1 include:10.0.0.1 ~all"# return an error for a valid hostnameserver.rule:A,'updates.example.com',:ServFail# define a dynamic ruleserver.rule(:CNAME,/^www\./)do |type,name,transaction|# append '.hax' to the domain namenames=name.split('.').push('hax')transaction.respond!(names)end# return MX recordsserver.rule(:MX,'example.com')do |type,name,transaction|transaction.respond!(10,Resolv::DNS::Name.create('email.evil.com'))endend
Then try runninghost -p 2346 example.com 127.0.0.1
once the server isrunning.
- Ruby >= 3.0.0
- async-dns ~> 1.0
- ronin-support ~> 1.0
$ gem install ronin-dns-proxy
gem'ronin-dns-proxy','~> 0.1'
gem.add_dependency'ronin-dns-proxy','~> 0.1'
- Fork It!
- Clone It!
cd ronin-dns-proxy/
bundle install
git checkout -b my_feature
- Code It!
bundle exec rake spec
git push origin my_feature
Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
ronin-dns-proxy is free software: you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as publishedby the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
ronin-dns-proxy is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public Licensealong with ronin-dns-proxy. If not, seehttps://www.gnu.org/licenses/.
About
A configurable DNS proxy server library
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.