mem

package
v0.0.0-...-8b1915f Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxStringLength = 4096
	MaxArrayLength  = 65536
)

Variables

View Source
var (
	ErrNoProcess       = errors.New("no process matching the criteria was found")
	ErrPatternNotFound = errors.New("no memory matched the pattern")
)
View Source
var (
	ErrStringTooLong = errors.New("read failed, string too long")
	ErrArrayTooLong  = errors.New("read failed, array too long")

	ErrInvalidStringLength = errors.New("read failed, string length < 0")
	ErrInvalidArrayLength  = errors.New("read failed, array length < 0")
)
View Source
var Debug = false

Functions

func Read

func Read(r io.ReaderAt, addresses interface{}, p interface{}) error

func ReadFloat32

func ReadFloat32(r io.ReaderAt, addr int64, offsets ...int64) (float32, error)

func ReadFloat32Array

func ReadFloat32Array(r io.ReaderAt, addr int64, offsets ...int64) ([]float32, error)

func ReadFloat64

func ReadFloat64(r io.ReaderAt, addr int64, offsets ...int64) (float64, error)

func ReadFloat64Array

func ReadFloat64Array(r io.ReaderAt, addr int64, offsets ...int64) ([]float64, error)

func ReadInt16

func ReadInt16(r io.ReaderAt, addr int64, offsets ...int64) (int16, error)

func ReadInt16Array

func ReadInt16Array(r io.ReaderAt, addr int64, offsets ...int64) ([]int16, error)

func ReadInt32

func ReadInt32(r io.ReaderAt, addr int64, offsets ...int64) (int32, error)

func ReadInt32Array

func ReadInt32Array(r io.ReaderAt, addr int64, offsets ...int64) ([]int32, error)

func ReadInt64

func ReadInt64(r io.ReaderAt, addr int64, offsets ...int64) (int64, error)

func ReadInt64Array

func ReadInt64Array(r io.ReaderAt, addr int64, offsets ...int64) ([]int64, error)

func ReadInt8

func ReadInt8(r io.ReaderAt, addr int64, offsets ...int64) (int8, error)

func ReadInt8Array

func ReadInt8Array(r io.ReaderAt, addr int64, offsets ...int64) ([]int8, error)

func ReadPtr

func ReadPtr(r io.ReaderAt, addr int64, offsets ...int64) (int64, error)

func ReadString

func ReadString(r io.ReaderAt, addr int64, offsets ...int64) (string, error)

func ReadUint16

func ReadUint16(r io.ReaderAt, addr int64, offsets ...int64) (uint16, error)

func ReadUint16Array

func ReadUint16Array(r io.ReaderAt, addr int64, offsets ...int64) ([]uint16, error)

func ReadUint32

func ReadUint32(r io.ReaderAt, addr int64, offsets ...int64) (uint32, error)

func ReadUint32Array

func ReadUint32Array(r io.ReaderAt, addr int64, offsets ...int64) ([]uint32, error)

func ReadUint64

func ReadUint64(r io.ReaderAt, addr int64, offsets ...int64) (uint64, error)

func ReadUint64Array

func ReadUint64Array(r io.ReaderAt, addr int64, offsets ...int64) ([]uint64, error)

func ReadUint8

func ReadUint8(r io.ReaderAt, addr int64, offsets ...int64) (uint8, error)

func ReadUint8Array

func ReadUint8Array(r io.ReaderAt, addr int64, offsets ...int64) ([]uint8, error)

func ResolvePatterns

func ResolvePatterns(p Process, offsets interface{}) error

func Scan

func Scan(p Process, pattern string) (int64, error)

Types

type Map

type Map interface {
	Start() int64
	Size() int64
}

type Process

type Process interface {
	io.Closer
	io.ReaderAt
	Pid() int
	Maps() ([]Map, error)
	ExecutablePath() (string, error)
}

func FindProcess

func FindProcess(re *regexp.Regexp, blacklistedTitles ...string) ([]Process, error)

type ReadError

type ReadError []error

func (ReadError) Error

func (r ReadError) Error() string

Jump to

Keyboard shortcuts

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