1 unstable release

Uses new Rust 2024

new 0.1.0 Nov 26, 2025

#4 in #exe

MIT license

24KB
474 lines

Donut-rs CLI Tool


This is the CLI component of the donut-rs API.

[!NOTE] There are configuration file examples in the examples/ folder

Installing

This tool can be installed via:

cargo install donut-cli

Example usage

  • Building a payload using a config file:
donut-cli -v build -c examples/pe_config.toml
  • Building a payload manually:
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:
donut-cli -- -v extras e2b -i helloworld.exe \  
  -o hellworld.rs \
  -f rs \
  -d -v HELLOWORLD
  • Hashing a function name:
donut-cli -v extras api-hasher -F MessageBox
  • Hashing a list of functions:
# list.txt:
# MessageBoxW
# GetLastError
donut-cli -v extras api-hasher -f list.txt

Dependencies

~4–15MB
~128K SLoC