|
KittyMemoryEx 1.0.0
Dedicated library for runtime code patching, memory scanning, tracing, injection and some more useful memory utilities. works for both Android and Linux
|
Class that manages memory operations for a remote process. More...
#include <KittyMemoryMgr.hpp>

Public Member Functions | |
| bool | initialize (pid_t pid, EKittyMemOP eMemOp, bool initMemPatch) |
| Initializes the memory manager. | |
| pid_t | processID () const |
| Returns the process ID. | |
| std::string | processName () const |
| Returns the process name. | |
| bool | isMemValid () const |
| Checks if memory operations are valid. | |
| IKittyMemOp * | memOp () const |
| Returns memory operations pointer. | |
| size_t | readMem (uintptr_t address, void *buffer, size_t len, MemMode mode=MemMode::Normal) const |
| Reads remote memory from a specified address. | |
| size_t | writeMem (uintptr_t address, void *buffer, size_t len, MemMode mode=MemMode::Normal) const |
| Writes remote memory to a specified address. | |
| std::string | readMemUTF8 (uintptr_t address, size_t maxLen) |
| Reads a UTF-8 encoded string from remote process memory. | |
| std::u16string | readMemUTF16 (uintptr_t address, size_t maxLen) |
| Reads a UTF-16 encoded string from remote process memory. | |
| std::u32string | readMemUTF32 (uintptr_t address, size_t maxLen) |
| Reads a UTF-32 encoded string from remote process memory. | |
| std::wstring | readMemWStr (uintptr_t address, size_t maxLen) |
| Reads a platform wchar_t string from remote process memory. | |
| std::string | readMemStr (uintptr_t address, size_t maxLen) |
| Reads a UTF-8 string from remote process memory. | |
| bool | writeMemStr (uintptr_t address, std::string str) const |
| Writes a UTF-8 string to remote process memory. | |
| bool | writeMemWStr (uintptr_t address, std::wstring str) |
| Writes a platform wchar_t string to remote process memory. | |
| bool | dumpMemRange (uintptr_t start, uintptr_t end, const std::string &path) const |
| Dumps a memory range from remote process to a file. | |
| bool | dumpMemFileMappings (const std::string &memFile, const std::string &destination) const |
| Dumps all mappings of a mapped file from a remote process. | |
| bool | dumpMemELF (const ElfScanner &elf, const std::string &destination) const |
| Dumps a memory mapped ELF file from a remote process. | |
Public Attributes | |
| MemoryPatchMgr | memPatch |
| MemoryPatch Manager. | |
| MemoryBackupMgr | memBackup |
| MemoryBackup Manager. | |
| KittyScannerMgr | memScanner |
| Memory Scanner Manager. | |
| ElfScannerMgr | elfScanner |
| Elf Scanner Manager. | |
| LinkerScannerMgr | linkerScanner |
| Linker Scanner Manager. | |
| NativeBridgeScannerMgr | nbScanner |
| NativeBridge Scanner Manager. | |
| KittyTraceMgr | trace |
| Process Trace Manager. | |
Class that manages memory operations for a remote process.
| bool KittyMemoryMgr::dumpMemELF | ( | const ElfScanner & | elf, |
| const std::string & | destination ) const |
Dumps a memory mapped ELF file from a remote process.
| elf | The ELF scanner to use for dumping the ELF file. |
| destination | The path where the ELF file will be dumped. |
| bool KittyMemoryMgr::dumpMemFileMappings | ( | const std::string & | memFile, |
| const std::string & | destination ) const |
Dumps all mappings of a mapped file from a remote process.
If the file has multiple mappings, each mapping is written to a separate output file by appending an index to the destination filename.
| memFile | Path of the mapped file to dump. |
| destination | Destination file or directory path. |
| bool KittyMemoryMgr::dumpMemRange | ( | uintptr_t | start, |
| uintptr_t | end, | ||
| const std::string & | path ) const |
Dumps a memory range from remote process to a file.
| start | The start address of the memory range to dump. |
| end | The end address of the memory range to dump. |
| path | The path to the file where the memory range will be dumped. |
| bool KittyMemoryMgr::initialize | ( | pid_t | pid, |
| EKittyMemOP | eMemOp, | ||
| bool | initMemPatch ) |
Initializes the memory manager.
| pid | Remote process ID. |
| eMemOp | Memory read & write operation type. |
| initMemPatch | If true, initializes MemoryPatch and MemoryBackup instances. |
|
inline |
Returns the process name.
|
inline |
Reads remote memory from a specified address.
| address | The address in remote memory to read. |
| buffer | The buffer to store the read data. |
| len | The number of bytes to read. |
| mode | Memory access strategy. |

|
inline |
Reads a UTF-8 string from remote process memory.
Convenience wrapper around ReadUTF8().
| address | Remote memory address containing the string. |
| maxLen | Maximum number of bytes to read. |

|
inline |
Reads a UTF-16 encoded string from remote process memory.
Reads at most maxLen bytes and stops at the first UTF-16 null terminator.
| address | Remote memory address containing the string. |
| maxLen | Maximum number of bytes to read. |

|
inline |
Reads a UTF-32 encoded string from remote process memory.
Reads at most maxLen bytes and stops at the first UTF-32 null terminator.
| address | Remote memory address containing the string. |
| maxLen | Maximum number of bytes to read. |

|
inline |
Reads a UTF-8 encoded string from remote process memory.
Reads at most maxLen bytes starting at address and stops when the first null terminator is encountered.
| address | Remote memory address containing the string. |
| maxLen | Maximum number of bytes to read. |

|
inline |
Reads a platform wchar_t string from remote process memory.
Automatically selects the encoding based on the size of wchar_t:
| address | Remote memory address containing the string. |
| maxLen | Maximum number of wchar_t characters to read. |

|
inline |
Writes remote memory to a specified address.
| address | The address in remote memory to write to. |
| buffer | The buffer containing the data to write. |
| len | The number of bytes to write. |
| mode | Memory access strategy. |

|
inline |
Writes a UTF-8 string to remote process memory.
Writes the string contents followed by a null terminator.
| address | Remote memory address where the string is written. |
| str | UTF-8 string to write. |

|
inline |
Writes a platform wchar_t string to remote process memory.
Automatically selects the encoding based on the size of wchar_t:
| address | Remote memory address where the string is written. |
| str | Wide string to write. |
