-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added dns.spoof.proxy and dns.spoof.proxy.srv. #496
base: master
Are you sure you want to change the base?
Conversation
dns.spoof.proxy is boolean and switches on/off dns proxying. dns.spoof.proxy.srv can either be set to 'system' (linux/mac only) to use the system-dns for proxing or an ip.
Codecov Report
@@ Coverage Diff @@
## master #496 +/- ##
=======================================
Coverage 51.06% 51.06%
=======================================
Files 3 3
Lines 47 47
=======================================
Hits 24 24
Misses 23 23 Continue to review full report at Codecov.
|
@@ -80,17 +99,44 @@ func (mod DNSSpoofer) Author() string { | |||
return "Simone Margaritelli <[email protected]>" | |||
} | |||
|
|||
func (mod *DNSSpoofer)getSystemResolver() (net.IP,error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't work on platforms that are not GNU/Linux i think ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not work very well on Linux either, because it just uses the first nameserver occurrance in a hardcoded filename and therefore the setting "system" on dns.spoof.proxy.srv is more a convenience feature for me. maybe a default of 8.8.8.8 might be better (instead of "system" as default).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just another parameter to let the user specify the default resolver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think thats already possible, if i understand u correctly.
dns.spoof.proxy.srv can either be set to 'system' (linux/mac only) to use the system-dns for proxing or an ip.
i'm not sure about this PR: why not just using a combination of |
@packet.proxy: i.e. for client B google.com resolves to / proxied request for client C google.com resolves to / proxied request In my setup I am currently running bettercap on the std-gateway that also does dns. I could do some external setup with dnsmasq achieving the same functionality as above (actually I did), |
I agree, this would be very helpful for my use case as well. @M0WA, can you share a gist with your dnsmasq solution? |
So Im really new to this my question is does this mean at the moment this program is stuck |
dns.spoof.proxy is boolean and switches on/off dns proxying.
dns.spoof.proxy.srv can either be set to 'system' (linux/mac only)
to use the system-dns for proxing or an ip.
this features proxies all dns requests seen to a given dns server
and fakes the responses if neccessary