mirror of
https://github.com/bettercap/bettercap
synced 2025-07-10 15:23:30 -07:00
new: dns.spoof now supports a hosts file with multiple mappings (closes #344)
This commit is contained in:
parent
3ed4db132c
commit
d16b0c7cf5
4 changed files with 131 additions and 43 deletions
|
@ -2,6 +2,7 @@ package session
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -86,6 +87,14 @@ func (m SessionModule) StringParam(name string) (error, string) {
|
|||
}
|
||||
}
|
||||
|
||||
func (m SessionModule) IPParam(name string) (error, net.IP) {
|
||||
if err, v := m.StringParam(name); err != nil {
|
||||
return err, nil
|
||||
} else {
|
||||
return nil, net.ParseIP(v)
|
||||
}
|
||||
}
|
||||
|
||||
func (m SessionModule) IntParam(name string) (error, int) {
|
||||
if p, found := m.params[name]; found {
|
||||
if err, v := p.Get(m.Session); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue