mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 04:59:25 -07:00
Make domain matches in the dns.spoof module case insensitive
This commit is contained in:
parent
6725a2aa53
commit
ef27a79ec3
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,8 @@ type HostEntry struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e HostEntry) Matches(host string) bool {
|
func (e HostEntry) Matches(host string) bool {
|
||||||
return e.Host == host || strings.HasSuffix(host, e.Suffix) || (e.Expr != nil && e.Expr.Match(host))
|
lowerHost := strings.ToLower(host)
|
||||||
|
return e.Host == lowerHost || strings.HasSuffix(lowerHost, e.Suffix) || (e.Expr != nil && e.Expr.Match(lowerHost))
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hosts []HostEntry
|
type Hosts []HostEntry
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue