mirror of
https://github.com/bettercap/bettercap
synced 2025-08-22 06:23:18 -07:00
wip: Fleshed out module params
This commit is contained in:
parent
9dd98ce55e
commit
446cfe4cf9
1 changed files with 11 additions and 12 deletions
|
@ -22,10 +22,10 @@ type RdpProxy struct {
|
||||||
done chan bool
|
done chan bool
|
||||||
queue *nfqueue.Queue
|
queue *nfqueue.Queue
|
||||||
queueNum int
|
queueNum int
|
||||||
queueCb nfqueue.Callback
|
|
||||||
port int
|
port int
|
||||||
start_port int
|
start_port int
|
||||||
targets net.IPv4[]
|
cmd string
|
||||||
|
targets string // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
var mod *RdpProxy
|
var mod *RdpProxy
|
||||||
|
@ -35,12 +35,11 @@ func NewRdpProxy(s *session.Session) *RdpProxy {
|
||||||
SessionModule: session.NewSessionModule("rdp.proxy", s),
|
SessionModule: session.NewSessionModule("rdp.proxy", s),
|
||||||
done: make(chan bool),
|
done: make(chan bool),
|
||||||
queue: nil,
|
queue: nil,
|
||||||
queueCb: nil,
|
|
||||||
port: 0,
|
|
||||||
start_port: 40000,
|
|
||||||
|
|
||||||
queueNum: 0,
|
queueNum: 0,
|
||||||
chainName: "OUTPUT",
|
port: 0,
|
||||||
|
startPort: 40000,
|
||||||
|
cmd: nil,
|
||||||
|
targets: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
mod.AddHandler(session.NewModuleHandler("rdp.proxy on", "", "Start the RDP proxy.",
|
mod.AddHandler(session.NewModuleHandler("rdp.proxy on", "", "Start the RDP proxy.",
|
||||||
|
@ -53,8 +52,11 @@ func NewRdpProxy(s *session.Session) *RdpProxy {
|
||||||
return mod.Stop()
|
return mod.Stop()
|
||||||
}))
|
}))
|
||||||
|
|
||||||
mod.AddParam(session.NewIntParameter("rdp.proxy.queue.num", "0", "NFQUEUE number to bind to."))
|
mod.AddParam(session.NewIntParameter("rdp.proxy.queue.num", "0", "NFQUEUE number to bind to."))
|
||||||
mod.AddParam(session.NewIntParameter("rdp.proxy.port", "3389", "RDP port to intercept."))
|
mod.AddParam(session.NewIntParameter("rdp.proxy.port", "3389", "RDP port to intercept."))
|
||||||
|
mod.AddParam(session.NewIntParameter("rdp.proxy.start", "40000", "Starting port for pyrdp sessionss"))
|
||||||
|
mod.AddParam(session.NewStringParameter("rdp.proxy.command", "pyrdp-mitm", "The PyRDP base command to launch the man-in-the-middle."))
|
||||||
|
mod.AddParam(session.NewStringParameter("rdp.proxy.targets", "<All Subnets>", "A comma delimited list of destination IPs or CIDRs to target."))
|
||||||
|
|
||||||
/* NOTES
|
/* NOTES
|
||||||
* - The RDP port
|
* - The RDP port
|
||||||
|
@ -76,9 +78,6 @@ func NewRdpProxy(s *session.Session) *RdpProxy {
|
||||||
// TODO: Should support comma separated subnets
|
// TODO: Should support comma separated subnets
|
||||||
// mod.AddParam(session.NewStringParameter("rdp.proxy.targets", "3389", session.IPv4RangeValidator "RDP port to intercept."))
|
// mod.AddParam(session.NewStringParameter("rdp.proxy.targets", "3389", session.IPv4RangeValidator "RDP port to intercept."))
|
||||||
|
|
||||||
mod.AddParam(session.NewIntParameter("rdp.proxy.start", "40000", "", "Starting port for pyrdp sessionss"))
|
|
||||||
mod.AddParam(session.NewStringParameter("rdp.proxy.command", "pyrdp-mitm", "The PyRDP base command to launch the man-in-the-middle."))
|
|
||||||
mod.AddParam(session.NewStringParameter("rdp.proxy.targets", "<All Subnets>", "A comma delimited list of destination IPs or CIDRs to target."))
|
|
||||||
|
|
||||||
return mod
|
return mod
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue