Skip to content
/ Mnemo Public

Mnemo is a scripting language focused on making memory reading easier

Notifications You must be signed in to change notification settings

Haato3o/Mnemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mnemo-banner

The Memory DSL

Warning: This project is still under development so none of this is actually working yet.

Mnemo, short for Mnemosyne, is a statically typed DSL for memory reading. It exists for the purposes of making it easier and more straightforward to read other processes memory.

// This is a comment
const PLAYER_ADDRESS: uint64_t = 0x21000000;
const PLAYER_OFFSETS: vec<uint32_t> = [0x10, 0x20, 0x30];

// This can be initialized later on by the Mnemo Context
var LATE_INIT_PTR: uint64_t;

// Mnemo also supports dynamic offsets calculation
const getSaveOffsets(saveIndex: int32_t): vec<int32_t> => [
    0x10,
    0x20,
    (saveIndex * 8) + 0x20,
    0xA8
];

const PlayerId => {
    let currentSave = getSaveOffsets(1); 

    return Read<int32_t>(PLAYER_ADDRESS, currentSave);
}

Mnemo Context

Mnemo runs on its own "Context", you can talk to the Mnemo context using the C# API Mnemo provides you.

Creating a context

You can create a context by calling the Mnemo.Create(string path, IntPtr pHandle) function, where path is the path to the script file and pHandle is the Process handle you got from calling the OpenProcess function.

Mnemo context = Mnemo.Create("script.mn", pHandle);
int playerId = context.Get<int>("PlayerId");
int[] playerOffsets = context.Get<int[]>("PLAYER_OFFSETS");
long playerAddress = context.Get<long>("PLAYER_ADDRESS");

// You can set variables within the context
context.Set<long>("LATE_INIT_PTR", 0x1412345678);

long playerPointer = context.Read<long>("PLAYER_ADDRESS", "DYNAMIC_DEPENDENT_OFFSETS");

About

Mnemo is a scripting language focused on making memory reading easier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages