Skip to content

Commit 4f5b053

Browse files
authored
Update README.md
1 parent feec18c commit 4f5b053

File tree

1 file changed

+1
-59
lines changed

1 file changed

+1
-59
lines changed

README.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,5 @@
11
# implant
22

33
# Usage
4-
项目采用[cargo make](https://github.com/sagiegurari/cargo-make)来管理编译任务,所以编译任务都在`Makefile.toml`中定义.
5-
使用完整功能请先安装cargo make和docker环境。
6-
## install cargo make
7-
```bash
8-
cargo install --force cargo-make
9-
```
10-
## 本地编译
11-
由于local编译一般不能支持所有平台,所以只写了单个build的编译任务,如果需要多平台交叉请使用`docker`编译.
124

13-
如下命令会在本地执行编译任务,编译完成后会在`target`目录下生成对应的可执行文件。
14-
```bash
15-
任务名称做了兼容既可以用短名称也可使用target原值
16-
```bash
17-
# 如下两个命令等价
18-
cargo make local windows-x64-gnu
19-
cargo make local x86_64-pc-windows-gnu
20-
# 如下两个命令等价
21-
cargo make local windows-x64-msvc
22-
cargo make local x86_64-pc-windows-msvc
23-
```
24-
25-
## docker编译
26-
如下命令会在docker中执行编译任务,因为使用了volume来挂载源码,所以编译完成后依然会在`target`目录下生成对应的可执行文件。
27-
### 单target编译
28-
```bash
29-
cargo make docker windows-x64-gnu
30-
cargo make docker x86_64-pc-windows-gnu
31-
```
32-
### 多target编译
33-
参考如下命令, 通过空格分隔多个target,你依然可以使用短名称
34-
```bash
35-
cargo make docker windows-x64-gnu windows-x64-msvc windows-x32-gnu linux-x64-gnu linux-x32-gnu
36-
```
37-
38-
### 所有以支持的target
39-
```bash
40-
cargo make docker all
41-
```
42-
43-
> Tmp record
44-
45-
### Stager
46-
47-
#### Stage0
48-
49-
使用 `Stage0`, 可以使用 `malefic-mutant` 来进行代码生成操作, 具体操作如下:
50-
51-
1. generate code
52-
```bash
53-
cargo run -p malefic-mutant stage0 professional x86_64 source
54-
```
55-
56-
2. generate exe && code
57-
```bash
58-
cargo build --profile release-lto -p malefic-pulse
59-
```
60-
61-
```bash
62-
objcopy -O binary ./target/release/malefic-pulse.exe malefic-pulse.bin
63-
```
5+
See: https://chainreactors.github.io/wiki/IoM/implant/

0 commit comments

Comments
 (0)