mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
new: implemented mDNS server / spoofer (closes #542)
This commit is contained in:
parent
385c8e3926
commit
45951d2f82
13 changed files with 1237 additions and 1 deletions
|
@ -13,7 +13,10 @@ import (
|
|||
"github.com/bettercap/readline"
|
||||
)
|
||||
|
||||
const IPv4Validator = `^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`
|
||||
const (
|
||||
IPv4Validator = `^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`
|
||||
IPv6Validator = `^[:a-fA-F0-9]{6,}$`
|
||||
)
|
||||
|
||||
type ModuleHandler struct {
|
||||
sync.Mutex
|
||||
|
|
|
@ -94,6 +94,7 @@ func (p ModuleParam) Validate(value string) (error, interface{}) {
|
|||
|
||||
const ParamIfaceName = "<interface name>"
|
||||
const ParamIfaceAddress = "<interface address>"
|
||||
const ParamIfaceAddress6 = "<interface address6>"
|
||||
const ParamSubnet = "<entire subnet>"
|
||||
const ParamRandomMAC = "<random mac>"
|
||||
|
||||
|
@ -103,6 +104,8 @@ func (p ModuleParam) parse(s *Session, v string) string {
|
|||
v = s.Interface.Name()
|
||||
case ParamIfaceAddress:
|
||||
v = s.Interface.IpAddress
|
||||
case ParamIfaceAddress6:
|
||||
v = s.Interface.Ip6Address
|
||||
case ParamSubnet:
|
||||
v = s.Interface.CIDR()
|
||||
case ParamRandomMAC:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue