Skip to content

https.server

A simple HTTPS server, used to serve files and scripts across the network.

Start the HTTP server in the background.

Stop the HTTP server in the background.

ParameterDefaultDescription
https.server.address<interface address>Address to bind the http server to.
https.server.certificate~/.bettercap-https.cert.pemTLS certificate file (will be auto generated if filled but not existing).
https.server.certificate.bits4096Number of bits of the RSA private key of the generated HTTPS certificate.
https.server.certificate.commonnamebettercapCommon Name field of the generated HTTPS certificate.
https.server.certificate.countryUSCountry field of the generated HTTPS certificate.
https.server.certificate.localityLocality field of the generated HTTPS certificate.
https.server.certificate.organizationbettercap devteamOrganization field of the generated HTTPS certificate.
https.server.certificate.organizationalunithttps://bettercap.org/Organizational Unit field of the generated HTTPS certificate.
https.server.key~/.bettercap-https.key.pemTLS key file (will be auto generated if filled but not existing).
https.server.path.Server folder.
https.server.port443Port to bind the http server to.

One liner to serve /var/www/html:

Terminal window
sudo bettercap -eval "set https.server.path /var/www/html; https.server on"