forked from NytroRST/ShellcodeCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDLLBaseAddress.h
More file actions
45 lines (29 loc) · 724 Bytes
/
DLLBaseAddress.h
File metadata and controls
45 lines (29 loc) · 724 Bytes
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
42
43
44
45
#ifndef DLLBASE_H
#define DLLBASE_H
#include <vector>
#include <string>
#include <iostream>
#include "Platform.h"
using namespace std;
// Class to work with DLL base address on the stack
class DLLBaseAddress
{
public:
// Struct to save DLL base offset address on the stack
struct DLLBase
{
string Name;
size_t Offset;
};
static vector<DLLBase> DLLOffsets;
static size_t CurrentDLLOffset;
// Create kernel32 DLL base index
static void InitDLLBaseAddress();
// Check if a DLL base index already exists
static bool DLLBaseExists(string p_sDLLName);
// Add a DLL base index
static void AddDLLBase(string p_sDLLName);
// Get DLL base index
static size_t GetDLLBase(string p_sDLLName);
};
#endif