mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
dns.spoof.hosts supports both wildcard (optional) based domain lines and hosts based entries.
if the ip is ommited in a line it defaults to the ip given in dns.spoof.address. example hosts file contents: *.example. google.com 127.0.0.1 *.yahoo.* 127.0.0.2
This commit is contained in:
parent
0810a1f2fe
commit
01ed35fa28
2 changed files with 3 additions and 4 deletions
|
@ -109,7 +109,7 @@ func (mod *DNSSpoofer) Configure() error {
|
|||
|
||||
if hostsFile != "" {
|
||||
mod.Info("loading hosts from file %s ...", hostsFile)
|
||||
if err, hosts := HostsFromFile(hostsFile); err != nil {
|
||||
if err, hosts := HostsFromFile(hostsFile, address); err != nil {
|
||||
return fmt.Errorf("error reading hosts from file %s: %v", hostsFile, err)
|
||||
} else {
|
||||
mod.Hosts = append(mod.Hosts, hosts...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue