Skip to content

Commit 06b3eaa

Browse files
authored
feat: Add default username and password for API (#63)
1 parent 8ad0b6f commit 06b3eaa

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

src/content/docs/modules/core/api.rest.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ title: api.rest
33
description: A RESTful API server to orchestrate and interact with the current interactive session, starts on HTTP and unauthenticated by default, can be switched to HTTPS and basic auth by using the proper parameters.
44
---
55

6+
:::note
7+
The default credentials are:
8+
9+
- **Username**: `user`
10+
- **Password**: `pass`
11+
12+
:::
13+
614
A RESTful API server to orchestrate and interact with the current interactive session, starts on HTTP and unauthenticated by default, can be switched to HTTPS and basic auth by using the proper parameters.
715

816
### Commands
@@ -45,10 +53,10 @@ Stop replaying the recorded session.
4553
| `api.rest.certificate.organization` | `bettercap devteam` | Organization field of the generated HTTPS certificate. |
4654
| `api.rest.certificate.organizationalunit` | `https://bettercap.org/` | Organizational Unit field of the generated HTTPS certificate. |
4755
| `api.rest.key` | | API TLS key (will be auto generated if not existing), fill to enable HTTPS. |
48-
| `api.rest.password` | | API HTTP basic auth password. |
56+
| `api.rest.password` | `pass` | API HTTP basic auth password. |
4957
| `api.rest.port` | `8081` | Port to bind the API REST server to. |
5058
| `api.rest.record.clock` | `1` | Number of seconds to wait while recording with api.rest.record between one sample and the next one. |
51-
| `api.rest.username` | | API HTTP basic auth username. |
59+
| `api.rest.username` | `user` | API HTTP basic auth username. |
5260
| `api.rest.websocket` | `false` | If true the `/api/events` route will be available as a websocket endpoint instead of HTTP. |
5361

5462
### Routes

src/content/docs/modules/ethernet/servers/http.server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Stop the HTTP server in the background.
1919

2020
| Parameter | Default | Description |
2121
| --------------------- | --------------------- | ----------------------------------- |
22-
| `http.server.address` | `<interface address>` | Address to bind the http server to. |
22+
| `http.server.address` | `<interface address>` | Address to bind the HTTP server to. |
2323
| `http.server.path` | `.` | Server folder. |
24-
| `http.server.port` | `80` | Port to bind the http server to. |
24+
| `http.server.port` | `80` | Port to bind the HTTP server to. |
2525

2626
### Examples
2727

src/content/docs/modules/ethernet/servers/https.server.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ A simple HTTPS server, used to serve files and scripts across the network.
99

1010
#### `https.server on`
1111

12-
Start the HTTP server in the background.
12+
Start the HTTPS server in the background.
1313

1414
#### `https.server off`
1515

16-
Stop the HTTP server in the background.
16+
Stop the HTTPS server in the background.
1717

1818
### Parameters
1919

2020
| Parameter | Default | Description |
2121
| --------------------------------------------- | ----------------------------- | ------------------------------------------------------------------------- |
22-
| `https.server.address` | `<interface address>` | Address to bind the http server to. |
22+
| `https.server.address` | `<interface address>` | Address to bind the HTTPS server to. |
2323
| `https.server.certificate` | `~/.bettercap-https.cert.pem` | TLS certificate file (will be auto generated if filled but not existing). |
2424
| `https.server.certificate.bits` | `4096` | Number of bits of the RSA private key of the generated HTTPS certificate. |
2525
| `https.server.certificate.commonname` | `bettercap` | Common Name field of the generated HTTPS certificate. |
@@ -29,7 +29,7 @@ Stop the HTTP server in the background.
2929
| `https.server.certificate.organizationalunit` | `https://bettercap.org/` | Organizational Unit field of the generated HTTPS certificate. |
3030
| `https.server.key` | `~/.bettercap-https.key.pem` | TLS key file (will be auto generated if filled but not existing). |
3131
| `https.server.path` | `.` | Server folder. |
32-
| `https.server.port` | `443` | Port to bind the http server to. |
32+
| `https.server.port` | `443` | Port to bind the HTTPS server to. |
3333

3434
### Examples
3535

0 commit comments

Comments
 (0)