-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPyShellCode.h.in
More file actions
34 lines (26 loc) · 923 Bytes
/
Copy pathPyShellCode.h.in
File metadata and controls
34 lines (26 loc) · 923 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
/*
* Thomas Keck 2017
*/
#pragma once
#define PyShellCode_VERSION_MAJOR @PyShellCode_VERSION_MAJOR@
#define PyShellCode_VERSION_MINOR @PyShellCode_VERSION_MINOR@
#include <sys/mman.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
struct ExecutableCode {
size_t length;
void *addr;
};
struct ExecutableCode* create_ExecutableCode_from_File(const char *filename);
struct ExecutableCode* create_ExecutableCode_from_ShellCode(const char *shellcode, size_t length);
int valid_ExecutableCode(struct ExecutableCode* code);
int64_t execute_ExecutableCode(struct ExecutableCode* code);
int64_t execute_with_void_ptr_ExecutableCode(struct ExecutableCode* code, void *arguments);
void destroy_ExecutableCode(struct ExecutableCode* code);
void print_ExecutableCode(struct ExecutableCode* code);
void PrintVersion(void);