helpers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFamilyFromRawAddr added in v0.9.0

func GetFamilyFromRawAddr(addr map[string]string) (string, error)

func GetIPFromRawAddr added in v0.9.0

func GetIPFromRawAddr(addr map[string]string) (string, error)

func GetPathFromRawAddr added in v0.9.0

func GetPathFromRawAddr(addr map[string]string) (string, error)

func GetPortFromRawAddr added in v0.9.0

func GetPortFromRawAddr(addr map[string]string) (string, error)

func GetRawAddrArgumentByName added in v0.9.0

func GetRawAddrArgumentByName(event trace.Event, argName string) (map[string]string, error)

GetRawAddrArgumentByName returns map[string]string of addr argument

func GetTraceeArgumentByName

func GetTraceeArgumentByName(event trace.Event, argName string) (trace.Argument, error)

GetTraceeArgumentByName fetches the argument in event with `Name` that matches argName

func GetTraceeBytesSliceArgumentByName added in v0.9.0

func GetTraceeBytesSliceArgumentByName(event trace.Event, argName string) ([]byte, error)

GetTraceeBytesSliceArgumentByName gets the argument matching the "argName" given from the event "argv" field, casted as []byte.

func GetTraceeHookedSymbolDataArgumentByName added in v0.9.0

func GetTraceeHookedSymbolDataArgumentByName(event trace.Event, argName string) ([]trace.HookedSymbolData, error)

GetTraceeHookedSymbolDataArgumentByName returns []trace.HookedSymbolData of hooked symbols for arg

func GetTraceeIntArgumentByName added in v0.9.0

func GetTraceeIntArgumentByName(event trace.Event, argName string) (int, error)

GetTraceeIntArgumentByName gets the argument matching the "argName" given from the event "argv" field, casted as int.

func GetTraceeSliceStringArgumentByName added in v0.9.0

func GetTraceeSliceStringArgumentByName(event trace.Event, argName string) ([]string, error)

GetTraceeSliceStringArgumentByName gets the argument matching the "argName" given from the event "argv" field, casted as []string.

func GetTraceeStringArgumentByName added in v0.9.0

func GetTraceeStringArgumentByName(event trace.Event, argName string) (string, error)

GetTraceeStringArgumentByName gets the argument matching the "argName" given from the event "argv" field, casted as string.

func IsElf added in v0.9.0

func IsElf(bytesArray []byte) bool

IsElf checks if the file starts with an ELF magic.

func IsFileRead added in v0.9.0

func IsFileRead(flags string) bool

IsFileRead returns whether the passed file permissions string contains o_rdonly or o_rdwr

func IsFileWrite

func IsFileWrite(flags string) bool

IsFileWrite returns whether the passed file permissions string contains o_wronly or o_rdwr

func IsInternetFamily added in v0.9.0

func IsInternetFamily(addr map[string]string) (bool, error)

func IsMemoryPath added in v0.9.0

func IsMemoryPath(pathname string) bool

IsMemoryPath checks if a given file path is located under "memfd", "/run/shm/" or "/dev/shm/".

func IsUnixFamily added in v0.9.0

func IsUnixFamily(addr map[string]string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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