Skip to content

https.server

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

Start the HTTPS server in the background.

Stop the HTTPS server in the background.

Parameter Default Description
https.server.address <interface address> Address to bind the HTTPS server to.
https.server.certificate ~/.bettercap-https.cert.pem TLS certificate file (will be auto generated if filled but not existing).
https.server.certificate.bits 4096 Number of bits of the RSA private key of the generated HTTPS certificate.
https.server.certificate.commonname bettercap Common Name field of the generated HTTPS certificate.
https.server.certificate.country US Country field of the generated HTTPS certificate.
https.server.certificate.locality Locality field of the generated HTTPS certificate.
https.server.certificate.organization bettercap devteam Organization field of the generated HTTPS certificate.
https.server.certificate.organizationalunit https://bettercap.org/ Organizational Unit field of the generated HTTPS certificate.
https.server.key ~/.bettercap-https.key.pem TLS key file (will be auto generated if filled but not existing).
https.server.path . Server folder.
https.server.port 443 Port to bind the HTTPS server to.

One liner to serve /var/www/html:

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