mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: Consistency between HTTP(S) servers
This commit is contained in:
parent
d60d4612f2
commit
d1925cd926
2 changed files with 8 additions and 8 deletions
|
@ -31,20 +31,20 @@ func NewHttpServer(s *session.Session) *HttpServer {
|
|||
mod.AddParam(session.NewStringParameter("http.server.address",
|
||||
session.ParamIfaceAddress,
|
||||
session.IPv4Validator,
|
||||
"Address to bind the http server to."))
|
||||
"Address to bind the HTTP server to."))
|
||||
|
||||
mod.AddParam(session.NewIntParameter("http.server.port",
|
||||
"80",
|
||||
"Port to bind the http server to."))
|
||||
"Port to bind the HTTP server to."))
|
||||
|
||||
mod.AddHandler(session.NewModuleHandler("http.server on", "",
|
||||
"Start httpd server.",
|
||||
"Start HTTP server.",
|
||||
func(args []string) error {
|
||||
return mod.Start()
|
||||
}))
|
||||
|
||||
mod.AddHandler(session.NewModuleHandler("http.server off", "",
|
||||
"Stop httpd server.",
|
||||
"Stop HTTP server.",
|
||||
func(args []string) error {
|
||||
return mod.Stop()
|
||||
}))
|
||||
|
|
|
@ -35,11 +35,11 @@ func NewHttpsServer(s *session.Session) *HttpsServer {
|
|||
mod.AddParam(session.NewStringParameter("https.server.address",
|
||||
session.ParamIfaceAddress,
|
||||
session.IPv4Validator,
|
||||
"Address to bind the http server to."))
|
||||
"Address to bind the HTTPS server to."))
|
||||
|
||||
mod.AddParam(session.NewIntParameter("https.server.port",
|
||||
"443",
|
||||
"Port to bind the http server to."))
|
||||
"Port to bind the HTTPS server to."))
|
||||
|
||||
mod.AddParam(session.NewStringParameter("https.server.certificate",
|
||||
"~/.bettercap-httpd.cert.pem",
|
||||
|
@ -54,13 +54,13 @@ func NewHttpsServer(s *session.Session) *HttpsServer {
|
|||
tls.CertConfigToModule("https.server", &mod.SessionModule, tls.DefaultLegitConfig)
|
||||
|
||||
mod.AddHandler(session.NewModuleHandler("https.server on", "",
|
||||
"Start https server.",
|
||||
"Start HTTPS server.",
|
||||
func(args []string) error {
|
||||
return mod.Start()
|
||||
}))
|
||||
|
||||
mod.AddHandler(session.NewModuleHandler("https.server off", "",
|
||||
"Stop https server.",
|
||||
"Stop HTTPS server.",
|
||||
func(args []string) error {
|
||||
return mod.Stop()
|
||||
}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue