semvec/pypi-packages huggingface dataset:
CreationMemoryPY 0.1
A way to make python cheating easy like memory.dll from C#.

memoryPY

memoryPY is a Python library designed for game memory manipulation. It simplifies reading and writing memory in external processes with an easy-to-use interface.

Features

Attach to any process by name.

Read and write various data types to specific memory addresses.

Supported data types include:

byte

2byte

int

float

string

bytes

Installation

To install memoryPY locally:

Clone or download the repository.

Open a terminal and navigate to the folder containing setup.py.

Run the following command:

pip install .

This will install the memoryPY library along with its dependency (pymem).

Usage

Here is how you can use memoryPY in your Python projects:

1. Importing the Library

import memoryPY

2. Creating a Process Instance

Before you can read or write memory, you need to attach to a running process.

p = memoryPY.Process()
p.openprocess("processname.exe")

3. Writing to Memory

You can write various data types to a specific memory address using the writememory method.

p.writememory("0x123456", "int", 999)  # Writes the integer 999 to address 0x123456
p.writememory("0x123470", "string", "Hello World")  # Writes a string to address 0x123470

Parameters for writememory:

address: Memory address (hex string format, e.g., "0x123456").

data_type: The type of data to write. Supported types:

byte: Single byte value.

2byte: Two-byte integer.

int: Four-byte integer.

float: Floating point number.

string: Null-terminated string.

bytes: Custom byte array.

value: The value to write to the specified address.

4. Reading from Memory

You can read various data types from a specific memory address using the readmemory method.

value = p.readmemory("0x123456", "int")  # Reads an integer from address 0x123456
print(value)

Parameters for readmemory:

address: Memory address (hex string format, e.g., "0x123456").

data_type: The type of data to read. Supported types:

byte: Single byte value.

2byte: Two-byte integer.

int: Four-byte integer.

float: Floating point number.

string: Null-terminated string.

bytes: Custom byte array (reads 4 bytes by default).

Example

import memoryPY

# Create a Process instance and attach to a process
p = memoryPY.Process()
p.openprocess("game.exe")

# Write an integer to memory
p.writememory("0x123456", "int", 1000)

# Read the integer back from memory
value = p.readmemory("0x123456", "int")
print(f"Value at 0x123456: {value}")

Error Handling

If no process is attached when calling writememory or readmemory, a RuntimeError will be raised.

If an unsupported data type is specified, a ValueError will be raised.

License

This library is provided under the MIT License.

Contributing

Contributions are welcome! If you have any suggestions, feel free to submit an issue or a pull request on the GitHub repository.

Contact

For any inquiries or support, please contact brandinrat@gmail.com