Skip to content

Commit 3a0c6b1

Browse files
committed
[REFACT] Small cleanup
1 parent 21cd6aa commit 3a0c6b1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

project_template/main.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ size_t g_PayloadSize = 0;
1515
// manually load the PE file using libPeConv
1616
bool load_payload(LPCTSTR pe_path)
1717
{
18-
// manually load the PE file using libPeConv:
19-
size_t g_PayloadSize = 0;
18+
if (g_Payload) {
19+
// already loaded
20+
std::cerr << "[!] The payload is already loaded!\n";
21+
return false;
22+
}
2023
#ifdef LOAD_FROM_PATH
2124
//if the PE is dropped on the disk, you can load it from the file:
2225
g_Payload = peconv::load_pe_executable(pe_path, g_PayloadSize);

0 commit comments

Comments
 (0)