3#include "KittyUtils.hpp"
4#include "KittyIOFile.hpp"
5#include "KittyMemoryEx.hpp"
6#include "KittyMemOp.hpp"
7#include "MemoryPatch.hpp"
8#include "MemoryBackup.hpp"
9#include "KittyScanner.hpp"
10#include "KittyTrace.hpp"
11#include "KittyAsm.hpp"
12#include "KittyPtrValidator.hpp"
13#include "KittyPerfEvent.hpp"
27 std::string _process_name;
29 std::unique_ptr<IKittyMemOp> _pMemOp;
30 std::unique_ptr<IKittyMemOp> _pMemOpPatch;
44 LinkerScannerMgr linkerScanner;
46 NativeBridgeScannerMgr nbScanner;
52 KittyMemoryMgr() : _init(false), _pid(0), _eMemOp(EK_MEM_OP_NONE)
63 bool initialize(pid_t pid, EKittyMemOP eMemOp,
bool initMemPatch);
87 return _init && _pid && _pMemOp.get();
106 inline size_t readMem(uintptr_t address,
void *buffer,
size_t len, MemMode mode = MemMode::Normal)
const
111 return _pMemOp->Read(address, buffer, len, mode);
122 inline size_t writeMem(uintptr_t address,
void *buffer,
size_t len, MemMode mode = MemMode::Normal)
const
127 return _pMemOp->Write(address, buffer, len, mode);
146 return _pMemOp->ReadUTF8(address, maxLen);
164 return _pMemOp->ReadUTF16(address, maxLen);
182 return _pMemOp->ReadUTF32(address, maxLen);
200 return _pMemOp->ReadWStr(address, maxLen);
213 inline std::string
readMemStr(uintptr_t address,
size_t maxLen)
218 return _pMemOp->ReadStr(address, maxLen);
236 return _pMemOp->WriteStr(address, str);
254 return _pMemOp->WriteWStr(address, str);
265 bool dumpMemRange(uintptr_t start, uintptr_t end,
const std::string &path)
const;
Manager class for ELF scanners.
Definition KittyScanner.hpp:521
Represents a scanner for memory ELF files. This class is used to scan ELF files from memory and extra...
Definition KittyScanner.hpp:193
Interface class for memory operations.
Definition KittyMemOp.hpp:46
Represents a mapping of a memory region.
Definition KittyMemoryEx.hpp:15
Class to retrieve process status information.
Definition KittyMemoryEx.hpp:145
bool dumpMemRange(uintptr_t start, uintptr_t end, const std::string &path) const
Dumps a memory range from remote process to a file.
ElfScannerMgr elfScanner
Elf Scanner Manager.
Definition KittyMemoryMgr.hpp:40
pid_t processID() const
Returns the process ID.
Definition KittyMemoryMgr.hpp:68
bool initialize(pid_t pid, EKittyMemOP eMemOp, bool initMemPatch)
Initializes the memory manager.
KittyScannerMgr memScanner
Memory Scanner Manager.
Definition KittyMemoryMgr.hpp:38
MemoryBackupMgr memBackup
MemoryBackup Manager.
Definition KittyMemoryMgr.hpp:36
bool writeMemWStr(uintptr_t address, std::wstring str)
Writes a platform wchar_t string to remote process memory.
Definition KittyMemoryMgr.hpp:249
size_t writeMem(uintptr_t address, void *buffer, size_t len, MemMode mode=MemMode::Normal) const
Writes remote memory to a specified address.
Definition KittyMemoryMgr.hpp:122
std::u32string readMemUTF32(uintptr_t address, size_t maxLen)
Reads a UTF-32 encoded string from remote process memory.
Definition KittyMemoryMgr.hpp:177
std::string readMemStr(uintptr_t address, size_t maxLen)
Reads a UTF-8 string from remote process memory.
Definition KittyMemoryMgr.hpp:213
bool writeMemStr(uintptr_t address, std::string str) const
Writes a UTF-8 string to remote process memory.
Definition KittyMemoryMgr.hpp:231
std::string processName() const
Returns the process name.
Definition KittyMemoryMgr.hpp:77
MemoryPatchMgr memPatch
MemoryPatch Manager.
Definition KittyMemoryMgr.hpp:34
std::string readMemUTF8(uintptr_t address, size_t maxLen)
Reads a UTF-8 encoded string from remote process memory.
Definition KittyMemoryMgr.hpp:141
KittyTraceMgr trace
Process Trace Manager.
Definition KittyMemoryMgr.hpp:50
size_t readMem(uintptr_t address, void *buffer, size_t len, MemMode mode=MemMode::Normal) const
Reads remote memory from a specified address.
Definition KittyMemoryMgr.hpp:106
std::u16string readMemUTF16(uintptr_t address, size_t maxLen)
Reads a UTF-16 encoded string from remote process memory.
Definition KittyMemoryMgr.hpp:159
IKittyMemOp * memOp() const
Returns memory operations pointer.
Definition KittyMemoryMgr.hpp:93
std::wstring readMemWStr(uintptr_t address, size_t maxLen)
Reads a platform wchar_t string from remote process memory.
Definition KittyMemoryMgr.hpp:195
bool dumpMemFileMappings(const std::string &memFile, const std::string &destination) const
Dumps all mappings of a mapped file from a remote process.
bool isMemValid() const
Checks if memory operations are valid.
Definition KittyMemoryMgr.hpp:85
bool dumpMemELF(const ElfScanner &elf, const std::string &destination) const
Dumps a memory mapped ELF file from a remote process.
Manager class for pattern scanning operations.
Definition KittyScanner.hpp:25
A class for tracing and controlling the execution of processes in a debugging environment.
Definition KittyTrace.hpp:218
The MemoryBackup manager class.
Definition MemoryBackup.hpp:65
The MemoryPatch manager class.
Definition MemoryPatch.hpp:94
EProcMapFilter
Enumerates the filter types for finding memory maps.
Definition KittyMemoryEx.hpp:260