-
Notifications
You must be signed in to change notification settings - Fork 54
zh_read_memory
伏秋洛 edited this page Jun 14, 2023
·
2 revisions
读取内存,是正常且必须的操作,否则这个项目毫无意义。该项目提供了3中读取/写入内存的方式,包括 注入后直接操作,操作/proc/pid/mem文件,通过syscall。
提供内核模块外放内存操作接口规避检测(咕咕咕),如有需要请提交issue催更。
#include "process.h"
#include "reader.h"
using namespace hak;
pid_t pid = 123456;
auto process = std::make_shared<hak::process>(pid);
process->set_memory_mode(memory_mode::SYSCALL); // set mode
auto reader = hak::memory_reader(process);
上诉代码中reader为内存读取器,我们提供了一些接口。
#include "process.h"
using namespace hak;
pid_t pid = 123456;
auto process = std::make_shared<hak::process>(pid);
process->set_memory_mode(memory_mode::SYSCALL); // set mode
int data;
pointer address = 0x1234567;
process->read(address, &data, sizeof(data));
Only through learning and communication!