wasmdonut

package module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0

README

WASM Donut

A fork of donut compiled to wasm for portability.

Documentation

Index

Constants

View Source
const (
	DonutArchX86 = 1
	DonutArchX64 = 2
	DonutArchX84 = 3

	DonutEntropyNone    = 1
	DonutEntropyRandom  = 2
	DonutEntropyDefault = 3

	DonutCompressNone          = 1
	DonutCompressAplib         = 2
	DonutCompressLZNT1         = 3
	DonutCompressXpress        = 4
	DonutCompressXpressHuffman = 5

	DonutExitThread  = 1
	DonutExitProcess = 2
	DonutExitBlock   = 3

	DonutBypassNone     = 1
	DonutBypassAbort    = 2
	DonutBypassContinue = 3

	DonutHeadersOverwrite = 1
	DonutHeadersKeep      = 2

	DonutFormatBinary     = 1
	DonutFormatBase64     = 2
	DonutFormatC          = 3
	DonutFormatRuby       = 4
	DonutFormatPython     = 5
	DonutFormatPowershell = 6
	DonutFormatCSharp     = 7
	DonutFormatHex        = 8
	DonutFormatUUID       = 9
)

Variables

This section is empty.

Functions

func GenerateToFile

func GenerateToFile(ctx context.Context, inPath, outPath string, opts GenerateOptions) error

GenerateToFile writes shellcode generated from the input path to outPath.

Types

type GenerateOptions

type GenerateOptions struct {
	Ext      string
	Args     string
	Class    string
	Method   string
	Domain   string
	Runtime  string
	Decoy    string
	Server   string
	ModName  string
	Arch     int
	Bypass   int
	Headers  int
	Entropy  int
	Compress int
	ExitOpt  int
	Thread   bool
	Unicode  bool
	OEP      uint32
	Format   int
}

GenerateOptions configures Donut shellcode generation.

type GenerateResult

type GenerateResult struct {
	Loader     []byte
	Module     []byte
	ModuleName string
}

GenerateResult contains the output of a wasm Donut generation.

func Generate

func Generate(ctx context.Context, input []byte, ext string, opts GenerateOptions) (GenerateResult, error)

Generate runs the embedded Donut wasm module and returns shellcode bytes.

func GenerateFromFile

func GenerateFromFile(ctx context.Context, path string, opts GenerateOptions) (GenerateResult, error)

GenerateFromFile loads input from disk and returns generated shellcode.

Directories

Path Synopsis
cmd
wasm-donut command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL