Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

KMem-iOS

lightweight ios mach memory utility header

Usage

Find the First Base

Find the first base:

uintptr_t base = KMEM::scanner::FindFirstBase();

Return Base

Reinterpret cast _dyld_get_image_header(0):

uintptr_t base = KMEM::scanner::ReturnBase();

Get Base From Name

Get the base from a framework name:

uintptr_t base = KMEM::scanner::GetImageBase("UnityFramework");

Get Address From First Base + Offset

Only works if FindFirstBase is successful:

uintptr_t address = KMEM::io::GetAddress(0x123);

Get Address From Chosen Base + Offset

uintptr_t address = KMEM::io::GetAddress("framework", 0x123);

Validate Pointer

if (KMEM::io::IsValidPointer(address)) { }

Read

int value = KMEM::io::ReadMem<int>(address);

Write

KMEM::io::WriteMem<int>(address, 100);

Read String

std::string text = KMEM::io::ReadString(address, 64);

Raw Read

uintptr_t rawValue = KMEM::io::ReadRaw(address);

Raw Write

KMEM::io::WriteRaw<int>(address, 100);

Read Bytes

uint8_t buffer[32]{};
KMEM::io::ReadBytes(address, buffer, sizeof(buffer));

Write Bytes

const uint8_t bytes[] = { 0x90, 0x90, 0x90 };
KMEM::io::WriteBytes(address, bytes, sizeof(bytes));

About

lightweight ios mach memory utility header

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages