Skip to content

Commit 7ddb9d5

Browse files
committed
Update quick start guide
1 parent 2050c3c commit 7ddb9d5

File tree

1 file changed

+139
-96
lines changed

1 file changed

+139
-96
lines changed

src/quick_start.md

Lines changed: 139 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -24,96 +24,89 @@ info: checking for self-update
2424
info: cleaning up downloads & tmp directories
2525
```
2626

27-
After setting up cargo properly you can install memflowup via our install script:
28-
```
29-
> curl --proto '=https' --tlsv1.2 -sSf https://sh.memflow.io | bash
30-
```
31-
32-
Alternatively you can install memflowup via cargo:
27+
On Windows, install memflowup via cargo:
3328
```
3429
> cargo install memflowup --force
3530
...
36-
Installed package `memflowup v0.1.0` (executable `memflowup.exe`)
31+
Installed package `memflowup v0.2.0` (executable `memflowup`)
3732
```
3833

3934
#### Note
4035
memflowup should __not__ be installed or ran as root or via sudo. By default rust installs cargo and all binaries installed via cargo on a per-user basis. This means running the installation as root will result in memflowup being placed in `/root/` (because it is the root user's home directory) and will also only be accessible from the root user.
4136

4237
### 2. Installing plugins
4338

44-
When running `memflowup` for the first time it is recommended to use the interactive mode and install memflow from the stable branch.
45-
46-
Installing packages system-wide will place all plugins in `/usr/local/lib/memflow`.\
47-
Installing packages per user will place all plugins in `$HOME/.local/lib/memflow`.
39+
To get started quickly, you can pull all available plugins from the default registry:
4840

49-
You might also want to build all packages from source for now.
41+
```
42+
> memflowup pull --all
43+
```
5044

51-
memflow will later automatically look in both of those directories (and the current working directory) for plugins.
45+
This will download and install all memflow plugins from the registry (http://registry.memflow.io).
5246

53-
Please make sure to __not__ run memflow as root (see the [note](#note) above)
47+
You can also view available plugins before installing:
48+
```
49+
> memflowup registry ls
5450
```
55-
> memflowup interactive
56-
do you want to build packages from source? [y/N]: y
57-
Running in interactive mode. You can always re-run memflowup to install additional packages, or to different paths.
58-
do you want to install the initial packages system-wide? [Y/n]: n
59-
which channel do you want to use? [stable/DEVELOPMENT]: development
60-
Available packages in dev channel:
61-
0. memflow-win32 - CorePlugin
62-
1. memflow-native - CorePlugin
63-
2. memflow-qemu - CorePlugin
64-
3. memflow-coredump - CorePlugin
65-
4. memflow-pcileech - CorePlugin
6651

67-
Type packages to install by number, name, or type * for all:
68-
*
52+
Or install specific plugins:
53+
```
54+
> memflowup pull win32
55+
> memflowup pull native
56+
> memflowup pull qemu
57+
```
6958

70-
...
71-
Initial setup done!
59+
To see what plugins are currently installed locally:
7260
```
61+
> memflowup plugins ls
62+
```
63+
64+
memflow will automatically look for plugins in the installation directories and the current working directory.
7365

74-
It is always possible to re-run interactive mode and redo the initial setup.
66+
Please make sure to __not__ run memflow as root (see the [note](#note) above).
7567

76-
### 2. Updating plugins
68+
### 3. Building plugins from source (optional)
7769

78-
To update all the installed plugins simply run `memflowup update`:
70+
If you prefer to build plugins from source, you can install directly from GitHub repositories:
71+
72+
```
73+
> memflowup build https://github.com/memflow/memflow-coredump
7974
```
80-
> memflow update --help
81-
Updates all installed packages
8275

83-
Usage: memflowup update [OPTIONS]
76+
Or build from a local folder:
77+
```
78+
> cd memflow-coredump
79+
> memflowup build -p .
80+
```
8481

85-
Options:
86-
--ignore-user-index
87-
--ignore-upstream-index
88-
--ignore-builtin-index
89-
-s, --system Enables system-wide installation for all users
90-
-d, --dev
91-
-h, --help Print help
82+
### 4. Updating plugins
83+
84+
To update all installed plugins, simply run:
85+
```
86+
> memflowup pull --all
9287
```
9388

94-
In case you installed the plugins like in the example above you can simply use the development branch and install them non system-wide:
89+
You can also clean up old versions of plugins:
9590
```
96-
> memflowup update -d
91+
> memflowup plugins clean
9792
```
9893

99-
### 3. Verify your installation and run an example
94+
### 5. Verify your installation and run an example
10095

10196
To test if everything is working properly the easiest method is to simply
102-
use one of the [examples](https://github.com/memflow/memflow/tree/stable/memflow/examples) provided in memflow.
97+
use one of the [examples](https://github.com/memflow/memflow/tree/main/memflow/examples) provided in memflow.
10398

104-
To run the examples simply check out the memflow repo with the appropiate version:
99+
To run the examples simply check out the memflow repo:
105100
```
106-
> git clone --depth 1 --branch stable https://github.com/memflow/memflow
101+
> git clone https://github.com/memflow/memflow
107102
> cd memflow
108103
```
109104

110-
You can safely ignore the warning about the 'detached HEAD' state. This happens because we are checking out a specific tag in the memflow repo.
111-
112105
And run one of the examples:
113106
```
114107
> cargo run --example process_list -- --os native
115108
```
116-
This examples runs the process_list example (which just lists all processes on the system) using the [`memflow-native`](https://github.com/memflow/memflow-native) plugin. This plugin simply proxies your local OS calls to memflow (as in using [process_vm_readv](https://man7.org/linux/man-pages/man2/process_vm_readv.2.html) and [process_vm_writev](https://man7.org/linux/man-pages/man2/process_vm_writev.2.html)).
109+
This example runs the process_list example (which just lists all processes on the system) using the [`memflow-native`](https://github.com/memflow/memflow-native) plugin. This plugin simply proxies your local OS calls to memflow (as in using [process_vm_readv](https://man7.org/linux/man-pages/man2/process_vm_readv.2.html) and [process_vm_writev](https://man7.org/linux/man-pages/man2/process_vm_writev.2.html)).
117110

118111
If everything went well you should see a list of all open processes:
119112
```
@@ -123,7 +116,6 @@ If everything went well you should see a list of all open processes:
123116
...
124117
```
125118

126-
127119
## Windows
128120

129121
### 1. Installing memflowup
@@ -145,87 +137,90 @@ info: checking for self-update
145137
info: cleaning up downloads & tmp directories
146138
```
147139

148-
After setting up cargo properly you can install memflowup via cargo:
140+
The recommended way to install memflowup is through our automated script:
141+
```
142+
> curl --proto '=https' --tlsv1.2 -sSf https://sh.memflow.io | bash
143+
```
144+
145+
Alternatively you can install memflowup via cargo:
149146
```
150147
> cargo install memflowup --force
151148
...
152-
Installed package `memflowup v0.1.0` (executable `memflowup.exe`)
149+
Installed package `memflowup v0.2.0` (executable `memflowup.exe`)
153150
```
154151

155152
### 2. Installing plugins
156153

157-
When running `memflowup` for the first time it is recommended to use the interactive mode and install memflow from the stable branch.
154+
To get started quickly, you can pull all available plugins from the default registry:
158155

159-
Installing packages system-wide will place all plugins in `%ProgramFiles%\memflow\`.\
160-
Installing packages per user will place all plugins in `%UserProfile%\Documents\memflow\`.
156+
```
157+
> memflowup pull --all
158+
```
161159

162-
You might also want to build all packages from source for now.
160+
This will download and install all memflow plugins from the registry (http://registry.memflow.io).
163161

164-
memflow will later automatically look in both of those directories (and the current working directory) for plugins.
162+
You can also view available plugins before installing:
163+
```
164+
> memflowup registry ls
165165
```
166-
> memflowup interactive
167-
do you want to build packages from source? [y/N]: y
168-
Running in interactive mode. You can always re-run memflowup to install additional packages, or to different paths.
169-
do you want to install the initial packages system-wide? [Y/n]: n
170-
which channel do you want to use? [stable/DEVELOPMENT]: development
171-
Available packages in dev channel:
172-
0. memflow-win32 - CorePlugin
173-
1. memflow-native - CorePlugin
174-
2. memflow-qemu - CorePlugin
175-
3. memflow-coredump - CorePlugin
176-
4. memflow-pcileech - CorePlugin
177166

178-
Type packages to install by number, name, or type * for all:
179-
*
167+
Or install specific plugins:
168+
```
169+
> memflowup pull win32
170+
> memflowup pull native
171+
> memflowup pull qemu
172+
```
180173

181-
...
182-
Initial setup done!
174+
To see what plugins are currently installed locally:
183175
```
176+
> memflowup plugins ls
177+
```
178+
179+
memflow will automatically look for plugins in the installation directories and the current working directory.
184180

185-
It is always possible to re-run interactive mode and redo the initial setup.
181+
### 3. Building plugins from source (optional)
186182

187-
### 2. Updating plugins
183+
If you prefer to build plugins from source, you can install directly from GitHub repositories:
188184

189-
To update all the installed plugins simply run `memflowup update`:
190185
```
191-
> memflow update --help
192-
Updates all installed packages
186+
> memflowup build https://github.com/memflow/memflow-coredump
187+
```
188+
189+
Or build from a local folder:
190+
```
191+
> cd memflow-coredump
192+
> memflowup build -p .
193+
```
193194

194-
Usage: memflowup.exe update [OPTIONS]
195+
### 4. Updating plugins
195196

196-
Options:
197-
--ignore-user-index
198-
--ignore-upstream-index
199-
--ignore-builtin-index
200-
-s, --system Enables system-wide installation for all users
201-
-d, --dev
202-
-h, --help Print help
197+
To update all installed plugins, simply run:
198+
```
199+
> memflowup pull --all
203200
```
204201

205-
In case you installed the plugins like in the example above you can simply use the development branch and install them non system-wide:
202+
You can also clean up old versions of plugins:
206203
```
207-
> memflowup update -d
204+
> memflowup plugins clean
208205
```
209206

210-
### 3. Verify your installation and run an example
207+
### 5. Verify your installation and run an example
211208

212209
To test if everything is working properly the easiest method is to simply
213-
use one of the [examples](https://github.com/memflow/memflow/tree/stable/memflow/examples) provided in memflow.
210+
use one of the [examples](https://github.com/memflow/memflow/tree/main/memflow/examples) provided in memflow.
214211

215-
To run the examples simply check out the memflow repo with the appropiate version:
212+
To run the examples simply check out the memflow repo:
216213
```
217-
> git clone --depth 1 --branch stable https://github.com/memflow/memflow
214+
> git clone https://github.com/memflow/memflow
218215
> cd memflow
219216
```
220-
221-
You can safely ignore the warning about the 'detached HEAD' state. This happens because we are checking out a specific tag in the memflow repo.
222217
In case you are missing git you can install it from [here](https://git-scm.com/download/win).
223218

224219
And run one of the examples:
225220
```
226221
> cargo run --example process_list -- --os native
227222
```
228-
This examples runs the process_list example (which just lists all processes on the system) using the [`memflow-native`](https://github.com/memflow/memflow-native) plugin. This plugin simply proxies your local OS calls to memflow (as in using [ReadProcessMemory](https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-readprocessmemory) and [WriteProcessMemory](https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-writeprocessmemory)).
223+
This example runs the process_list example (which just lists all processes on the system) using the [`memflow-native`](https://github.com/memflow/memflow-native) plugin. This plugin simply proxies your local OS calls to memflow (as in using [ReadProcessMemory](https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-readprocessmemory) and [WriteProcessMemory](https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-writeprocessmemory)).
229224

230225
If everything went well you should see a list of all open processes:
231226
```
@@ -243,3 +238,51 @@ If everything went well you should see a list of all open processes:
243238
244239
...
245240
```
241+
242+
## Additional Commands
243+
244+
For more advanced usage, memflowup provides several additional commands:
245+
246+
### Getting help
247+
```
248+
> memflowup help
249+
```
250+
251+
### Managing plugins
252+
```
253+
# Remove a specific plugin
254+
> memflowup plugins remove coredump
255+
256+
# List all locally installed plugins
257+
> memflowup plugins ls
258+
259+
# Clean up old plugin versions
260+
> memflowup plugins clean
261+
```
262+
263+
### Working with registries
264+
```
265+
# List all available plugins in the registry
266+
> memflowup registry ls
267+
268+
# Configure a custom registry
269+
> memflowup config set registry http://my-registry.io
270+
> memflowup config set pub_key_file /home/user/key_file.pub
271+
```
272+
273+
All plugins in the memflow-registry are signed and the signature is checked by memflowup during the download process. Using a custom registry requires setting up the appropriate public key that was used for signing the files in the registry.
274+
275+
## Troubleshooting
276+
277+
### Mac OS Issues
278+
If you are using Mac OS and encounter an error building proc-macro2, run:
279+
```
280+
> xcode-select --install
281+
```
282+
283+
### Migrating from memflowup 0.1
284+
If you're upgrading from an older version of memflowup:
285+
1. Delete all system-wide installed plugins in `/usr/lib/memflow`
286+
2. Delete all installed plugins for the current user in `~/.local/lib/memflow`
287+
3. Delete the `/etc/memflowup` folder
288+
4. Reinstall all plugins via `memflowup pull --all`

0 commit comments

Comments
 (0)