mirror of
https://github.com/bettercap/bettercap
synced 2025-07-30 19:50:06 -07:00
new: mac.changer module can now be used on any interface.
This commit is contained in:
parent
d5c030688a
commit
b789a48f46
2 changed files with 17 additions and 4 deletions
|
@ -82,6 +82,7 @@ func (p ModuleParam) Validate(value string) (error, interface{}) {
|
|||
return fmt.Errorf("Unhandled module parameter type %d.", p.Type), nil
|
||||
}
|
||||
|
||||
const ParamIfaceName = "<interface name>"
|
||||
const ParamIfaceAddress = "<interface address>"
|
||||
const ParamSubnet = "<entire subnet>"
|
||||
const ParamRandomMAC = "<random mac>"
|
||||
|
@ -96,7 +97,9 @@ func (p ModuleParam) Get(s *Session) (error, interface{}) {
|
|||
v = ""
|
||||
}
|
||||
|
||||
if v == ParamIfaceAddress {
|
||||
if v == ParamIfaceName {
|
||||
v = s.Interface.Name()
|
||||
} else if v == ParamIfaceAddress {
|
||||
v = s.Interface.IpAddress
|
||||
} else if v == ParamSubnet {
|
||||
v = s.Interface.CIDR()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue