formatutils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurlRemoteUsage

func CurlRemoteUsage(url string) string

func ObjcopyPulse

func ObjcopyPulse(path, platform, arch string) ([]byte, error)

ObjcopyPulse extracts shellcode from compiled artifact using objcopy

func PowershellRemoteUsage

func PowershellRemoteUsage(powershellURL string) string

func SRDIArtifact

func SRDIArtifact(path, platform, arch string, useobjcopy bool) ([]byte, error)

Types

type FormatInfo

type FormatInfo struct {
	Extension     string
	Desc          string
	Converter     func([]byte) []byte
	SupportRemote bool
	Usage         func(string) string
}

type FormatResult

type FormatResult struct {
	Data      []byte
	Extension string
}

type Formatter

type Formatter struct {
	SupportedFormats map[string]FormatInfo
}

func NewFormatter

func NewFormatter() *Formatter

NewFormatter creates a new formatter with all supported formats

func (*Formatter) Convert

func (f *Formatter) Convert(data []byte, format string) (*FormatResult, error)

Convert converts raw shellcode bytes to the specified format

func (*Formatter) GetFormatDescription

func (f *Formatter) GetFormatDescription(format string) string

GetFormatDescription returns the description for a specific format

func (*Formatter) GetFormatExtension

func (f *Formatter) GetFormatExtension(format string) string

GetFormatExtension returns the file extension for a specific format

func (*Formatter) GetFormatsSupportRemote

func (f *Formatter) GetFormatsSupportRemote() map[string]string

func (*Formatter) GetFormatsWithDescriptions

func (f *Formatter) GetFormatsWithDescriptions() map[string]string

GetFormatsWithDescriptions returns a map of format names to descriptions

func (*Formatter) GetSupportedFormats

func (f *Formatter) GetSupportedFormats() []string

GetSupportedFormats returns a list of all supported format names

func (*Formatter) IsSupported

func (f *Formatter) IsSupported(format string) bool

IsSupported checks if a format is supported

func (*Formatter) IsSupportedRemote

func (f *Formatter) IsSupportedRemote(format string) bool

Jump to

Keyboard shortcuts

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