https.server

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

Commands

https.server on

Start the HTTP server in the background.

https.server off

Stop the HTTP server in the background.

Parameters

parameterdefaultdescription
https.server.path.Server folder.
https.server.address<interface address>Address to bind the http server to.
https.server.port443Port 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.key~/.bettercap-https.key.pemTLS key 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.

Examples

One liner to serve /var/www/html:

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