-
Notifications
You must be signed in to change notification settings - Fork 53
en_get_maps
伏秋洛 edited this page Jun 17, 2023
·
1 revision
#include "process.h"
#include "proc.h"
using namespace hak;
TEST(GetMaps, Main) {
std::string packageName = "bin.mt.plus";
try {
auto pid = hak::find_process(packageName);
std::cout << "pid: " << pid << "\n";
auto process = std::make_shared<hak::process>(pid);
process->set_memory_mode(memory_mode::SYSCALL);
auto maps = process->get_maps();
} catch (std::exception& e) {
std::cout << "error: " << e.what() << "\n";
}
}
#include "process.h"
#include "proc.h"
using namespace hak;
TEST(GetMaps, Main) {
std::string packageName = "bin.mt.plus";
try {
auto pid = hak::find_process(packageName);
std::cout << "pid: " << pid << "\n";
auto process = std::make_shared<hak::process>(pid);
process->set_memory_mode(memory_mode::SYSCALL);
auto maps = process->get_maps(memory_range::AS | memory_range::JH);
} catch (std::exception& e) {
std::cout << "error: " << e.what() << "\n";
}
}
Only through learning and communication!