afk / memory

Linux memory read/write lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

memory

Linux process memory read/write lib using process_vm_readv and process_vm_writev.

Features

  • r/w float32/float64
  • r/w int32/int64
  • r/w Bool

Example

package main

import (
	"fmt"

	"github.com/mephux/memory"
)

func main() {

	m := memory.Process{
		// change this
		// pmap pid
		// addr must have r/w perms
		Pid: 19249,
	}

	// change this
	var addr int64 = 0x00007f733416f000

	i, err := m.ReadInt32(addr)

	fmt.Println(i, err)

	if err := m.WriteInt32(addr, 55); err != nil {
		panic(err)
	}

	i, err = m.ReadInt32(addr)

	fmt.Println(i, err)
}

TODO

  • Windows
  • Darwin

Self-Promotion

Like memory? Follow the repository on GitHub and if you would like to stalk me, follow mephux on Twitter and GitHub.

About

Linux memory read/write lib

License:MIT License


Languages

Language:Go 100.0%