memory

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 8 Imported by: 0

README

Simple package to read and write to a process memory

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadStruct

func ReadStruct[T any](addr int64, m *Memory, value *T)

Types

type Memory

type Memory struct {
	ProcHandle windows.Handle
	BaseInfo   windows.ModuleEntry32
	Pid        uint32
	// contains filtered or unexported fields
}

func NewMemory

func NewMemory(processName string) *Memory

func NewMemoryM

func NewMemoryM(processName string, moduleName string) *Memory

func NewMemoryMRW

func NewMemoryMRW(processName string, moduleName string) *Memory

func NewMemoryRW

func NewMemoryRW(processName string) *Memory

func (*Memory) CalculateAddress

func (m *Memory) CalculateAddress(pointer StaticPointer) int64

func (*Memory) CalculateAddressEx

func (m *Memory) CalculateAddressEx(address uintptr, pointer StaticPointer) uintptr

func (*Memory) FindPattern

func (m *Memory) FindPattern(pattern Pattern) uintptr

func (*Memory) FindPatternEx

func (m *Memory) FindPatternEx(pattern Pattern) uintptr

func (*Memory) PatchAt

func (m *Memory) PatchAt(addr uintptr, bytes []byte) error

func (*Memory) Read

func (m *Memory) Read(addr uintptr, buffer *[]byte, size int64) int64

func (*Memory) ReadDouble

func (m *Memory) ReadDouble(addr int64) float64

func (*Memory) ReadFloat

func (m *Memory) ReadFloat(addr int64) float32

func (*Memory) ReadInt

func (m *Memory) ReadInt(addr int64) int32

func (*Memory) ReadMemoryAtByte8

func (m *Memory) ReadMemoryAtByte8(address int64) uintptr

func (*Memory) ReadStruct

func (m *Memory) ReadStruct(addr uintptr, value unsafe.Pointer, size int)

func (*Memory) WriteDouble

func (m *Memory) WriteDouble(addr int64, value float64)

func (*Memory) WriteFloat

func (m *Memory) WriteFloat(addr int64, value float32)

func (*Memory) WriteInt

func (m *Memory) WriteInt(addr int64, value int32)

type MemoryRegion

type MemoryRegion struct {
	BaseAddress uintptr
	RegionSize  uintptr
}

type Pattern

type Pattern struct {
	Bytes      []byte
	Mask       string
	Offset     int
	Size       int
	Patch      bool
	PatchBytes []byte
}

type StaticPointer

type StaticPointer struct {
	BaseOffset int64
	Offsets    []int32
	LastOff    int32
	Uses       string
}

func (*StaticPointer) GetAddress

func (p *StaticPointer) GetAddress(mem *Memory) int64

Jump to

Keyboard shortcuts

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