-
Notifications
You must be signed in to change notification settings - Fork 0
/
EmberEyes.h
59 lines (49 loc) · 1.68 KB
/
EmberEyes.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include <BlackBone/Process/Process.h>
#include <BlackBone/Patterns/PatternSearch.h>
#include <iostream>
#include <wincrypt.h>
#pragma comment(lib,"Crypt32.lib")
using namespace blackbone;
const char EMBEREYES_VERSION[] = "v0.1";
#define DeleteHandle(x) \
if (x && x != INVALID_HANDLE_VALUE) \
{ \
CloseHandle(x); \
x = 0; \
}
#define DeleteWinINetHandle(x) \
if (x) \
{ \
InternetCloseHandle(x); \
x = 0; \
}
#define CleanupError() \
bResult = false; \
goto CLEAR_EXIT;
#define CleanupSuccess() \
bResult = true; \
goto CLEAR_EXIT;
#define IMPORTAPI( DLLFILE, FUNCNAME, RETTYPE, ...)\
typedef RETTYPE( WINAPI* type##FUNCNAME )( __VA_ARGS__ );\
type##FUNCNAME FUNCNAME = (type##FUNCNAME)GetProcAddress((LoadLibraryW(DLLFILE), GetModuleHandleW(DLLFILE)), #FUNCNAME);
typedef struct ustring
{
DWORD dwLength;
DWORD dwMaximumLength;
LPVOID lpBuffer;
}ustring;
class EmberEyes {
public:
void PrintBannerHelpMenu();
protected:
void PrintBanner();
void PrintHelpMenu();
BOOL Rc4(PBYTE pbData, DWORD dwDataLength, PBYTE pbRc4Key);
PBYTE Base64(bool bSign, char* lpData, DWORD dwDataLength, DWORD& pcchString);
PBYTE MVirtualAlloc(DWORD dwSize,DWORD dwProtect);
void MVirtualFree(PBYTE lpAddress);
BOOL MReadFile(const char* cpFilePath,PBYTE& pbFileBuffer,DWORD& dwFileSize);
BOOL MWriteFile(const char* cpFilePath, PBYTE pbBuffer, DWORD dwSize);
void PrintErrorMsg(const char* pbErrorMsg);
};