# Donut-rs CLI Tool
----
This is the CLI component of the [`donut-rs`](https://github.com/mrLochness350/donut-rs) API.
> [!NOTE]
> There are configuration file examples in the `examples/` folder
## Installing
This tool can be installed via:
```shell
cargo install donut-cli
```
## Example usage
* Building a payload using a config file:
```shell
donut-cli -v build -c examples/pe_config.toml
```
* Building a payload manually:
```shell
donut-cli -v build \
-i .\helloworld_release.exe \
-o final_shellcode.bin \
-I http_win.bin \
-M -m metadata.json \
--instance-type http \
-H rd_instance_win.bin \
--instance-server http://127.0.0.1:9001 \
--payload-endpoint "/test/payload"
```
* Converting an executable to a formatted binary blob:
```shell
donut-cli -- -v extras e2b -i helloworld.exe \
-o hellworld.rs \
-f rs \
-d -v HELLOWORLD
```
* Hashing a function name:
```shell
donut-cli -v extras api-hasher -F MessageBox
```
* Hashing a list of functions:
```shell
# list.txt:
# MessageBoxW
# GetLastError
donut-cli -v extras api-hasher -f list.txt
```