-
Notifications
You must be signed in to change notification settings - Fork 2
/
DirectMemoryTools.h
41 lines (31 loc) · 1.12 KB
/
DirectMemoryTools.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// Created by bbgsm on 2024/9/5.
//
#ifndef DIRECTMEMORYTOOLS_H
#define DIRECTMEMORYTOOLS_H
#include <string>
#include <vector>
#include "MemoryToolsBase.h"
#include "Type.h"
// 直接读取/操作进程内存
class DirectMemoryTools : public MemoryToolsBase {
private:
mulong memRead(void *buff, mulong len, Addr addr, offset off) override;
mulong memWrite(void *buff, mulong len, Addr addr, offset off) override;
public:
~DirectMemoryTools() override;
DirectMemoryTools();
bool init(std::string bm) override;
void close() override;
std::vector<PProcess> getProcessList() override;
void initModuleRegions() override;
void initMemoryRegions() override;
int getPID(std::string bm) override; // 获取pid
Handle createScatter() override;
void addScatterReadV(Handle handle, void *buff, mulong len, Addr addr) override;
void addScatterReadV(Handle handle, void *buff, mulong len, Addr addr, offset off) override;
void executeReadScatter(Handle handle) override;
void closeScatterHandle(Handle handle) override;
void execAndCloseScatterHandle(Handle handle) override;
};
#endif