Process memory reader and writer.
Project description
PyMemoryEditor
A Python library developed with ctypes to manipulate Windows processes (32 bits and 64 bits),
reading and writing values in the process memory.
Installing PyMemoryEditor:
pip3 install PyMemoryEditor
Basic Usage:
Import PyMemoryEditor and open a process using the OpenProcess class, passing a window title, process name
or PID as an argument. You can use the context manager to do this.
from PyMemoryEditor import OpenProcess
with OpenProcess(process_name = "example.exe") as process:
# Do something...
After that, use the methods read_process_memory and write_process_memory to manipulate the process
memory, passing in the function call the memory address, data type and its size. See the example below:
from PyMemoryEditor import OpenProcess
title = "Window title of an example program"
address = 0x0005000C
with OpenProcess(window_title = title) as process:
# Getting value from the process memory.
value = process.read_process_memory(address, int, 4)
# Writing to the process memory.
process.write_process_memory(address, int, 4, value + 7)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyMemoryEditor-1.2.1.tar.gz
(11.9 kB
view details)
File details
Details for the file PyMemoryEditor-1.2.1.tar.gz.
File metadata
- Download URL: PyMemoryEditor-1.2.1.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca53a06b6c5e590510ff54058c73d8cb55829ba9185e21a470357b2a5367b1fc
|
|
| MD5 |
4e9e6ebbd8c1fd087b91f193c0a8f544
|
|
| BLAKE2b-256 |
e698aae474b6ef1017a63525312045138ce632033ed58d65088f721550794c85
|