mirror of
https://github.com/bettercap/bettercap
synced 2025-08-24 15:16:18 -07:00
Added validation
This commit is contained in:
parent
bb3c0af437
commit
b68dc88c7f
1 changed files with 3 additions and 0 deletions
|
@ -372,7 +372,10 @@ func (mod *RdpProxy) Configure() (err error) {
|
||||||
if mod.nlaMode == "RELAY" {
|
if mod.nlaMode == "RELAY" {
|
||||||
mod.Info("Mode RELAY is unimplemented yet, fallbacking to mode IGNORE.")
|
mod.Info("Mode RELAY is unimplemented yet, fallbacking to mode IGNORE.")
|
||||||
mod.nlaMode = "IGNORE"
|
mod.nlaMode = "IGNORE"
|
||||||
|
} else if mod.nlaMode == "REDIRECT" && mod.redirectIP == nil {
|
||||||
|
return errors.New("rdp.proxy.nla.redirect.ip must be set when using mode REDIRECT")
|
||||||
}
|
}
|
||||||
|
|
||||||
if mod.regexp != "" {
|
if mod.regexp != "" {
|
||||||
if mod.compiled, err = regexp.Compile(mod.regexp); err != nil {
|
if mod.compiled, err = regexp.Compile(mod.regexp); err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue