gomem

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 3 Imported by: 4

README

GoMem

Continuous Integration Go Report Card

A Go library for manipulating Windows processes.

import "github.com/jamesmoriarty/gomem"
...
process, err := gomem.GetOpenProcessFromName(name)
valuePtr, err := process.ReadUInt32(offsetPtr)
process.WriteByte(valuePtr, value)

Build

go build

Test

go test

Docs

godoc.org

Examples

gohack

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Process

type Process struct {
	ID     uint32
	Name   string
	Handle uintptr
}

Process is a struct representing a windows process.

func GetOpenProcessFromName added in v1.0.0

func GetOpenProcessFromName(name string) (*Process, error)

GetOpenProcessFromName converts a process name to a Process struct with open handle.

func GetProcessFromName added in v1.0.0

func GetProcessFromName(name string) (*Process, error)

GetProcessFromName converts a process name to a Process struct.

func (*Process) GetModule

func (p *Process) GetModule(name string) (uintptr, error)

GetModule address.

func (*Process) Open

func (p *Process) Open() (uintptr, error)

Open process handle.

func (*Process) Read

func (p *Process) Read(offset uintptr, buffer uintptr, length uintptr) error

Read process memory.

func (*Process) ReadByte added in v0.2.0

func (p *Process) ReadByte(offset uintptr) (byte, error)

Read byte from process memory.

func (*Process) ReadUInt32 added in v0.2.0

func (p *Process) ReadUInt32(offset uintptr) (uint32, error)

Read uint32 from process memory.

func (*Process) ReadUInt64 added in v0.2.0

func (p *Process) ReadUInt64(offset uintptr) (uint64, error)

Read uint64 from process memory.

func (*Process) Write

func (p *Process) Write(offset uintptr, buffer uintptr, length uintptr) error

Write process memory.

func (*Process) WriteByte added in v0.2.0

func (p *Process) WriteByte(offset uintptr, value byte) error

Write byte to process memory.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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