|
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
|
Provides utility functions for process memory. More...
Classes | |
| class | ProcMap |
| Represents a mapping of a memory region. More... | |
| class | ProcStatus |
| Class to retrieve process status information. More... | |
Enumerations | |
| enum class | EProcMapFilter { Equal , Contains , StartWith , EndWith , Regex } |
| Enumerates the filter types for finding memory maps. | |
Functions | |
| std::string | getProcessName (pid_t pid) |
| Retrieves the name of the process by its process ID. | |
| std::vector< pid_t > | getProcessIDs (const std::string &processName) |
| Retrieves a list of process IDs that match a given process name. | |
| pid_t | getProcessID (const std::string &processName) |
| Retrieves the process ID that matches a given process name. | |
| std::vector< pid_t > | getAllThreads (pid_t pid) |
| Retrieves a list of thread IDs for a given process ID. | |
| std::vector< ProcMap > | getAllMaps (pid_t pid) |
| Retrieves information about all memory maps in a remote process. | |
| std::vector< ProcMap > | getMaps (pid_t pid, EProcMapFilter filter, const std::string &name, const std::vector< ProcMap > &maps=std::vector< ProcMap >()) |
| Retrieves information about all memory maps in a remote process. | |
| ProcMap | getAddressMap (pid_t pid, uintptr_t address, const std::vector< ProcMap > &maps=std::vector< ProcMap >()) |
| Retrieves the map information for a specific address in a remote process. | |
| std::vector< std::vector< ProcMap > > | getFileMappings (pid_t pid, const std::string &path, const std::vector< ProcMap > &maps=std::vector< ProcMap >()) |
| Returns all contiguous mappings of a file in a remote process. | |
| std::string | getAppDirectory (const std::string &pkg) |
| Retrieves the Android app directory. | |
Provides utility functions for process memory.
| ProcMap KittyMemoryEx::getAddressMap | ( | pid_t | pid, |
| uintptr_t | address, | ||
| const std::vector< ProcMap > & | maps = std::vector< ProcMap >() ) |
Retrieves the map information for a specific address in a remote process.
| pid | The remote process ID |
| address | Address to search for. |
| maps | Vector of cached process maps (optional). |
| std::vector< ProcMap > KittyMemoryEx::getAllMaps | ( | pid_t | pid | ) |
Retrieves information about all memory maps in a remote process.
| pid | The remote process ID |

| std::vector< pid_t > KittyMemoryEx::getAllThreads | ( | pid_t | pid | ) |
Retrieves a list of thread IDs for a given process ID.
This function retrieves the thread IDs of all threads associated with the specified process ID by examining the /proc/[pid]/task directory.
| pid | The process ID of the process. |

| std::string KittyMemoryEx::getAppDirectory | ( | const std::string & | pkg | ) |
Retrieves the Android app directory.
| pkg | The app's package name |
| std::vector< std::vector< ProcMap > > KittyMemoryEx::getFileMappings | ( | pid_t | pid, |
| const std::string & | path, | ||
| const std::vector< ProcMap > & | maps = std::vector< ProcMap >() ) |
Returns all contiguous mappings of a file in a remote process.
Finds all memory maps backed by the specified file and groups adjacent maps into contiguous mappings. Two maps are considered contiguous when both their virtual addresses and file offsets are contiguous. Multiple independent mappings of the same file are returned as separate groups.
| pid | The remote process ID |
| path | File path to search for. |
| maps | Vector of cached process maps (optional). |
| std::vector< ProcMap > KittyMemoryEx::getMaps | ( | pid_t | pid, |
| EProcMapFilter | filter, | ||
| const std::string & | name, | ||
| const std::vector< ProcMap > & | maps = std::vector< ProcMap >() ) |
Retrieves information about all memory maps in a remote process.
| pid | The remote process ID |
| filter | Filter type to use. |
| name | Name to filter by. |
| maps | Vector of cached process maps (optional). |
| pid_t KittyMemoryEx::getProcessID | ( | const std::string & | processName | ) |
Retrieves the process ID that matches a given process name.
This function searches for the first process whose command line matches the specified process name and returns its process ID.
| processName | The name of the process to match. |
| std::vector< pid_t > KittyMemoryEx::getProcessIDs | ( | const std::string & | processName | ) |
Retrieves a list of process IDs that match a given process name.
This function searches for all processes whose command line matches the specified process name and returns their process IDs in a vector.
| processName | The name of the process to match. |
| std::string KittyMemoryEx::getProcessName | ( | pid_t | pid | ) |
Retrieves the name of the process by its process ID.
This function reads the command line of the process identified by the given process ID and returns the process name.
| pid | The process ID of the process. |