-
Notifications
You must be signed in to change notification settings - Fork 1
/
payloads.cpp
executable file
·51 lines (46 loc) · 1.11 KB
/
payloads.cpp
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
#include "main.h"
#include "FctCallHelper.h"
#include "CreatePayload.h"
class Payload_1 : public FctCallHelper
{
public:
Payload_1(uint cookieValue, uint slideValue,
const char* fileName) :
FctCallHelper(cookieValue,
slideValue,
fileName,
0x500) // max total Size to use (EXAMPLE)
{
// INSTRUCTION: Use the helper functions to create the payload here.
}
};
class Payload_2 : public FctCallHelper
{
public:
Payload_2(uint cookieValue, uint slideValue,
const char* fileName) :
FctCallHelper(cookieValue,
slideValue,
fileName,
0x42000) // max total Size to use (EXAMPLE)
{
// INSTRUCTION: Use the helper functions to create the payload here.
}
};
// ETC.
IROP* CreatePayload::generate(uint payloadNumber)
{
if (payloadNumber == 1)
_rop = new Payload_1(_cookieValue, _slideValue, _fileName);
else if (payloadNumber == 2)
_rop = new Payload_2(_cookieValue, _slideValue, _fileName);
// ETC.
else
exit(printf("Payload %d does not exit\n", payloadNumber));
return _rop;
}
CreatePayload::~CreatePayload()
{
if (_rop != NULL)
delete _rop;
}