Help us shape the future of Go! Take the 2026 Go Developer Survey

generate

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToEncode = errors.New("failed to encode shellcode")
)

Functions

func EncodeShellcode

func EncodeShellcode(shellcode []byte, arch string, iterations int, badChars []byte) ([]byte, error)

// EncodeShellcode - Encode a shellcode

func ShellcodeRDI

func ShellcodeRDI(dllPath string, functionName string, userdata string) (shellcode []byte, err error)

ShellcodeRDI generates a reflective shellcode based on a DLL file

func ShellcodeRDIFromBytes

func ShellcodeRDIFromBytes(data []byte, functionName string, arguments string) (shellcode []byte, err error)

ShellcodeRDIFromBytes generate a sRDI from a byte array

func ShellcodeRDIToFile

func ShellcodeRDIToFile(dllPath string, functionName string) (shellcodePath string, err error)

ShellcodeRDIToFile generates a sRDI shellcode and writes it to a file

Types

type SGNConfig

type SGNConfig struct {
	AppDir string

	Architecture   string // Binary architecture (32/64) (default 32)
	Asci           bool   // Generates a full ASCI printable payload (takes very long time to bruteforce)
	BadChars       []byte // Don't use specified bad characters given in hex format (\x00\x01\x02...)
	Iterations     int    // Number of times to encode the binary (increases overall size) (default 1)
	MaxObfuscation int    // Maximum number of bytes for obfuscation (default 20)
	PlainDecoder   bool   // Do not encode the decoder stub
	Safe           bool   // Do not modify any register values

	Verbose bool

	Output string
	Input  string
}

SGNConfig - Configuration for sgn

Jump to

Keyboard shortcuts

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