-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpayload.cpp
More file actions
38 lines (34 loc) · 756 Bytes
/
payload.cpp
File metadata and controls
38 lines (34 loc) · 756 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
#include "pch.h"
#include "exp.h"
void secret_func1()
{
printf("hello from secret_func1\n");
}
void secret_func2()
{
printf("hello from secret_func2\n");
}
void secret_func3()
{
printf("hello from secret_func3\n");
}
// fill vector with really exported functions - in this case s1, s2 and s3
void make_payload(std::vector<exp_pair> &out_res)
{
exp_pair tmp;
char func_name[10];
func_name[0] = 's';
func_name[1] = '2';
func_name[2] = 0;
tmp.name = func_name;
tmp.func = (PVOID)&secret_func2;
out_res.push_back(tmp);
func_name[1] = '1';
tmp.name = func_name;
tmp.func = (PVOID)&secret_func1;
out_res.push_back(tmp);
func_name[1] = '3';
tmp.name = func_name;
tmp.func = (PVOID)&secret_func3;
out_res.push_back(tmp);
}