-
Notifications
You must be signed in to change notification settings - Fork 68
/
UnShell.h
39 lines (34 loc) · 938 Bytes
/
UnShell.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
#pragma once
#include "stdafx.h"
class UnShell
{
public:
UnShell();
~UnShell();
public:
BOOL puUnShell() { return this->UnShellEx(); }
BOOL puRepCompressionData(){ return this->RepCompressionData(); }
BOOL puDeleteSectionInfo(){ return this->DeleteSectionInfo(); }
BOOL puSaveUnShell(){ return this->SaveUnShell(); }
const std::string puGetUnShellPath() { return m_sUnShellPath.c_str(); }
void puClose();
private:
BOOL UnShellEx();
BOOL RepCompressionData();
BOOL DeleteSectionInfo();
BOOL SaveUnShell();
private:
void* m_Base = nullptr;
void* m_NtAddress = nullptr;
HANDLE hFile = nullptr;
void* m_studBase = nullptr;
PIMAGE_DOS_HEADER pDosHander;
PIMAGE_NT_HEADERS pHeadres;
PIMAGE_SECTION_HEADER pSection;
char* UnShellNewFile = nullptr;
DWORD m_dwTotaldwSize = 0;
char* m_pSectionData = nullptr;
FILE *fpFile = nullptr;
std::string m_sUnShellPath = "";
};
using SingleUnShell = ustdex::Singleton<UnShell>;