Documentation ¶
Index ¶
- Variables
- func GeneratePattern(signature string, mask string) ([]byte, error)
- func NewHandler(processID uint32) (*handler, error)
- func NewReader[T any](opts ...Option) (*reader[T], error)
- func NewReaderForProc[T any](processID uint32) (*reader[T], error)
- func NewWriter[T any](opts ...Option) (*writer[T], error)
- func NewWriterForProc[T any](processID uint32) (*writer[T], error)
- func SearchPattern(data []byte, pattern []byte) (int, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidPattern represents an error when the specified pattern is empty or invalid ErrInvalidPattern = errors.New("invalid pattern") // ErrPatternNotFound represents an error when the pattern is not found in the specified data ErrPatternNotFound = errors.New("pattern not found") // ErrLenghtMismatching is raised when there is a difference in lenght between the signature and the mask ErrLenghtMismatching = errors.New("different lengths between signature and mask") // ErrWrongTotalBytes represents an error reading or writing the spcified number of bytes ErrWrongTotalBytes = errors.New("couldn't perform operation with as many bytes as expected") // ErrUnexpectedConversion represents generic unexpected error ErrUnexpectedResult = errors.New("unexpected result error") // ErrHandlerNotSpecified when handler is nil or not specified ErrHandlerNotSpecified = errors.New("nil handler or not specified") )
Functions ¶
func NewHandler ¶
NewHandler instantiates and open a new memory handler pointing to a particular process id It will error in case the handler can not attach to the process no matter the cause
func NewReaderForProc ¶
NewReaderForProc instantiates a new memory reader for specified data struct using the default handler
func NewWriterForProc ¶
NewWriterForProc instantiates a new memory writer for specified data struct using the default handler
Types ¶
type Option ¶
type Option func(*manager) error
Option represents a function that helps to configure the manager
func WithDefaultHandler ¶
WithDefaultHandler option includes a default handler for the specified process id
func WithtHandler ¶
func WithtHandler(h *handler) Option
WithtHandler option allows to reuse previously defined handlers
Click to show internal directories.
Click to hide internal directories.