fix: Consistency between HTTP(S) servers

This commit is contained in:
Krypton 2025-08-08 18:46:06 +02:00 committed by GitHub
commit d1925cd926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View file

@ -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()
}))

View file

@ -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()
}))