You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/modules/core/api.rest.md
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,33 +11,38 @@ The default credentials are:
11
11
12
12
:::
13
13
14
-
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.
14
+
A **RESTful API server** for orchestrating and interacting with the current interactive session.
15
+
16
+
By default, it starts on **HTTP** and is **unauthenticated**.
17
+
You can switch to **HTTPS** and enable **basic auth** using the proper parameters.
15
18
16
19
## Commands
17
20
18
21
### `api.rest on`
19
22
20
-
Start the REST API server.
23
+
Start the **REST API** server.
21
24
22
25
### `api.rest off`
23
26
24
-
Stop the REST API server.
27
+
Stop the **REST API** server.
25
28
26
29
### `api.rest.record FILENAME`
27
30
28
-
Start polling the rest API periodically recording each sample in a compressed file that can be later replayed.
31
+
Start polling the **REST API** periodically.
32
+
Records each sample in a **compressed file** that can be replayed later.
29
33
30
34
### `api.rest.record off`
31
35
32
-
Stop recording the session.
36
+
Stop **recording** the session.
33
37
34
38
### `api.rest.replay FILENAME`
35
39
36
-
Start the rest API module in replay mode using `FILENAME` as the recorded session file, will revert to normal mode once the replay is over.
40
+
Start the REST API module in **replay mode** using `FILENAME`.
41
+
Reverts to normal mode once the replay is over.
37
42
38
43
### `api.rest.replay off`
39
44
40
-
Stop replaying the recorded session.
45
+
Stop **replaying** the recorded session.
41
46
42
47
## Parameters
43
48
@@ -61,17 +66,18 @@ Stop replaying the recorded session.
61
66
62
67
## Routes
63
68
64
-
Clients can authenticate using HTTP basic authentication, these are the available API routes.
69
+
Clients can authenticate using **HTTP basic authentication**.
70
+
These are the available API routes:
65
71
66
72
### `GET /api/file?name=FILENAME`
67
73
68
74
Get a file on the host
69
75
70
76
### `GET /api/events`
71
77
72
-
{{% notice note %}}
73
-
This route will be available as a websocket endpoint instead of normal HTTP if the `api.rest.websocket`parameter is set to true.
74
-
{{% /notice %}}
78
+
:::note
79
+
This route becomes a **websocket endpoint** instead of normal HTTP if `api.rest.websocket` is set to `true`.
80
+
:::
75
81
76
82
Return a list of events ( the optional `n` GET parameter will limit the number ):
Copy file name to clipboardExpand all lines: src/content/docs/modules/ethernet/net.sniff.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,31 +5,32 @@ sidebar:
5
5
order: 4
6
6
---
7
7
8
-
This module is a network packet sniffer and fuzzer supporting both [BPF syntax](http://biot.com/capstats/bpf.html) and regular expressions for filtering.
8
+
A **network packet sniffer** and **fuzzer** module.
9
+
Supports both [BPF syntax](http://biot.com/capstats/bpf.html) and regular expressions for filtering.
9
10
10
-
It is also able to dissect several major protocols in order to harvest credentials.
11
+
It can also **dissect major protocols** to harvest credentials.
11
12
12
13
## Commands
13
14
14
15
### `net.sniff on`
15
16
16
-
Start the packet sniffer.
17
+
Start the **packet sniffer**.
17
18
18
19
### `net.sniff off`
19
20
20
-
Stop the packet sniffer.
21
+
Stop the **packet sniffer**.
21
22
22
23
### `net.sniff stats`
23
24
24
-
Print the packet sniffer session configuration and statistics.
25
+
Print sniffer session configuration and statistics.
25
26
26
27
### `net.fuzz on`
27
28
28
-
Enable fuzzing for every sniffed packet containing the specified layers.
29
+
Enable **fuzzing** for sniffed packets containing specified layers.
Copy file name to clipboardExpand all lines: src/content/docs/modules/ethernet/proxies/http.proxy.md
+24-11Lines changed: 24 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,20 @@ title: http.proxy
3
3
description: A full featured HTTP transparent proxy that can be scripted using JavaScript modules.
4
4
---
5
5
6
-
A full featured HTTP transparent proxy that can be scripted using JavaScript modules. If used together with a [spoofer](/modules/ethernet/spoofers/introduction/), all HTTP traffic will be redirected to it and it will automatically handle port redirections as needed.
6
+
A **transparent HTTP proxy** with **JavaScript scripting** support.
7
+
8
+
When used with a [spoofer](/modules/ethernet/spoofers/introduction/), all **HTTP traffic** redirects to this proxy.
9
+
Port redirections are handled automatically.
7
10
8
11
## Commands
9
12
10
13
### `http.proxy on`
11
14
12
-
Start the HTTP proxy.
15
+
Start the **HTTP proxy** server.
13
16
14
17
### `http.proxy off`
15
18
16
-
Stop the HTTP proxy.
19
+
Stop the **HTTP proxy** server.
17
20
18
21
## Parameters
19
22
@@ -31,7 +34,8 @@ Stop the HTTP proxy.
31
34
32
35
## Modules
33
36
34
-
The `http.proxy` and `https.proxy` modules can be scripted using javascript files that must declare at least one of the following functions:
37
+
The `http.proxy` and `https.proxy` modules can be scripted using **JavaScript files**.
38
+
These files must declare at least one of the following functions:
35
39
36
40
```js
37
41
// called when the script is loaded
@@ -70,7 +74,10 @@ function onCommand(cmd) {
70
74
}
71
75
```
72
76
73
-
Modules can change the `req` request and `res` response objects, for instance the [web-override.cap caplet](https://github.com/bettercap/caplets/blob/master/web-override/web-override.cap) is using the `onRequest` function in order to override every request before it is executed with a fake response:
77
+
Modules can change the `req` request and `res` response objects.
78
+
79
+
For instance, the [web-override.cap caplet](https://github.com/bettercap/caplets/blob/master/web-override/web-override.cap) uses the `onRequest` function.
80
+
It overrides every request before execution with a **fake response**:
74
81
75
82
```js
76
83
functiononRequest(req, res) {
@@ -86,7 +93,8 @@ function onRequest(req, res) {
86
93
}
87
94
```
88
95
89
-
The [login-man-abuse.cap caplet](https://github.com/bettercap/caplets/blob/master/login-manager-abuse/login-man-abuse.cap) instead will use the `onResponse` handler to inject its malicious javascript file in every html response:
96
+
The [login-man-abuse.cap caplet](https://github.com/bettercap/caplets/blob/master/login-manager-abuse/login-man-abuse.cap) uses the `onResponse` handler.
97
+
It injects a **JavaScript file** into every HTML response:
90
98
91
99
```js
92
100
functiononResponse(req, res) {
@@ -108,10 +116,10 @@ function onResponse(req, res) {
108
116
109
117
### Builtin Functions
110
118
111
-
The JS interpreter is [limited to ES5](https://github.com/robertkrimen/otto?tab=readme-ov-file#caveat-emptor) (no
112
-
for/of, typed arrays, classes... )
119
+
The JS interpreter is [limited to ES5](https://github.com/robertkrimen/otto?tab=readme-ov-file#caveat-emptor).
120
+
This means **no**`for/of`, typed arrays, or classes.
113
121
114
-
Modules can use the following builtin functions.
122
+
Modules can use the following **builtin functions**:
0 commit comments