mirror of
https://github.com/bettercap/bettercap
synced 2025-07-05 20:42:09 -07:00
Allow wildcard in blacklist.
This commit is contained in:
parent
ccb2774814
commit
6de6de7418
2 changed files with 2 additions and 2 deletions
|
@ -113,7 +113,7 @@ func NewDnsProxy(s *session.Session) *DnsProxy {
|
|||
"Address to bind the DNS proxy to."))
|
||||
|
||||
mod.AddParam(session.NewStringParameter("dns.proxy.blacklist", "", "",
|
||||
"Comma separated list of client IPs to skip while proxying."))
|
||||
"Comma separated list of client IPs to skip while proxying (wildcard allowed)."))
|
||||
|
||||
mod.AddParam(session.NewStringParameter("dns.proxy.whitelist", "", "",
|
||||
"Comma separated list of client IPs to proxy if the blacklist is used."))
|
||||
|
|
|
@ -51,7 +51,7 @@ func (p *DNSProxy) shouldProxy(clientIP string) bool {
|
|||
|
||||
// check if this client is in the blacklist
|
||||
for _, ip := range p.Blacklist {
|
||||
if clientIP == ip {
|
||||
if ip == "*" || clientIP == ip {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue