mirror of
https://github.com/bettercap/bettercap
synced 2025-07-08 05:51:37 -07:00
balls
This commit is contained in:
parent
b4d8c639a0
commit
fb593af38d
6 changed files with 7 additions and 5 deletions
|
@ -29,7 +29,7 @@ func NewRestAPI(s *session.Session) *RestAPI {
|
||||||
|
|
||||||
api.AddParam(session.NewStringParameter("api.rest.address",
|
api.AddParam(session.NewStringParameter("api.rest.address",
|
||||||
session.ParamIfaceAddress,
|
session.ParamIfaceAddress,
|
||||||
`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`,
|
session.IPv4Validator,
|
||||||
"Address to bind the API REST server to."))
|
"Address to bind the API REST server to."))
|
||||||
|
|
||||||
api.AddParam(session.NewIntParameter("api.rest.port",
|
api.AddParam(session.NewIntParameter("api.rest.port",
|
||||||
|
|
|
@ -46,7 +46,7 @@ func NewDHCP6Spoofer(s *session.Session) *DHCP6Spoofer {
|
||||||
|
|
||||||
spoof.AddParam(session.NewStringParameter("dhcp6.spoof.address",
|
spoof.AddParam(session.NewStringParameter("dhcp6.spoof.address",
|
||||||
session.ParamIfaceAddress,
|
session.ParamIfaceAddress,
|
||||||
`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`,
|
session.IPv4Validator,
|
||||||
"IP address to map the domains to."))
|
"IP address to map the domains to."))
|
||||||
|
|
||||||
spoof.AddHandler(session.NewModuleHandler("dhcp6.spoof on", "",
|
spoof.AddHandler(session.NewModuleHandler("dhcp6.spoof on", "",
|
||||||
|
|
|
@ -36,7 +36,7 @@ func NewDNSSpoofer(s *session.Session) *DNSSpoofer {
|
||||||
|
|
||||||
spoof.AddParam(session.NewStringParameter("dns.spoof.address",
|
spoof.AddParam(session.NewStringParameter("dns.spoof.address",
|
||||||
session.ParamIfaceAddress,
|
session.ParamIfaceAddress,
|
||||||
`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`,
|
session.IPv4Validator,
|
||||||
"IP address to map the domains to."))
|
"IP address to map the domains to."))
|
||||||
|
|
||||||
spoof.AddHandler(session.NewModuleHandler("dns.spoof on", "",
|
spoof.AddHandler(session.NewModuleHandler("dns.spoof on", "",
|
||||||
|
|
|
@ -55,7 +55,7 @@ func NewHttpProxy(s *session.Session) *HttpProxy {
|
||||||
|
|
||||||
p.AddParam(session.NewStringParameter("http.proxy.address",
|
p.AddParam(session.NewStringParameter("http.proxy.address",
|
||||||
session.ParamIfaceAddress,
|
session.ParamIfaceAddress,
|
||||||
`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`,
|
session.IPv4Validator,
|
||||||
"Address to bind the HTTP proxy to."))
|
"Address to bind the HTTP proxy to."))
|
||||||
|
|
||||||
p.AddParam(session.NewIntParameter("http.proxy.port",
|
p.AddParam(session.NewIntParameter("http.proxy.port",
|
||||||
|
|
|
@ -30,7 +30,7 @@ func NewHttpServer(s *session.Session) *HttpServer {
|
||||||
|
|
||||||
httpd.AddParam(session.NewStringParameter("http.server.address",
|
httpd.AddParam(session.NewStringParameter("http.server.address",
|
||||||
session.ParamIfaceAddress,
|
session.ParamIfaceAddress,
|
||||||
`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`,
|
session.IPv4Validator,
|
||||||
"Address to bind the http server to."))
|
"Address to bind the http server to."))
|
||||||
|
|
||||||
httpd.AddParam(session.NewIntParameter("http.server.port",
|
httpd.AddParam(session.NewIntParameter("http.server.port",
|
||||||
|
|
|
@ -7,6 +7,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const IPv4Validator = `^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`
|
||||||
|
|
||||||
type ModuleHandler struct {
|
type ModuleHandler struct {
|
||||||
Name string
|
Name string
|
||||||
Description string
|
Description string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue