-
Notifications
You must be signed in to change notification settings - Fork 3
/
InjectMemoryTools.h
40 lines (29 loc) · 1.13 KB
/
InjectMemoryTools.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
//
// Created by bbgsm on 2024/10/15.
//
#ifndef MODULEMEMORYTOOLS_H
#define MODULEMEMORYTOOLS_H
#include "MemoryToolsBase.h"
#include "Type.h"
class InjectMemoryTools : 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:
~InjectMemoryTools() override;
InjectMemoryTools();
// 注入进程名判断,不限制传空字符
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 //MODULEMEMORYTOOLS_H