-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathGoldHEN.h
93 lines (74 loc) · 2.06 KB
/
GoldHEN.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* GoldHEN Plugin SDK - a prx hook/patch sdk for Orbis OS
*
* Credits
* - SiSTRo <https://github.com/SiSTR0>
* - ctn123 <https://github.com/ctn123>
* - OSM <https://github.com/OSM-Made>
* - jocover <https://github.com/jocover>
* - bucanero <https://github.com/bucanero>
* - OpenOrbis Team <https://github.com/OpenOrbis>
* - nik <https://github.com/nkrapivin>
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
struct jailbreak_backup
{
uint32_t cr_uid;
uint32_t cr_ruid;
uint32_t cr_rgid;
uint32_t cr_groups;
uint64_t cr_paid;
uint64_t cr_caps[2];
void* cr_prison;
void* fd_cdir;
void* fd_jdir;
void* fd_rdir;
};
struct proc_info {
int pid;
char name[40];
char path[64];
char titleid[16];
char contentid[64];
char version[6];
uint64_t base_address;
} __attribute__((packed));
struct proc_rw {
uint64_t address;
void *data;
uint64_t length;
uint64_t write_flags;
} __attribute__((packed));
struct proc_prx_load {
char process_name[32];
char prx_path[100];
uint64_t res;
} __attribute__((packed));
struct proc_prx_unload {
char process_name[32];
uint64_t prx_handle;
uint64_t res;
} __attribute__((packed));
#define GOLDHEN_SDK_CMD_VERSION 0
#define GOLDHEN_SDK_CMD_KLOG 1
#define GOLDHEN_SDK_CMD_JAILBREAK 2
#define GOLDHEN_SDK_CMD_UNJAILBREAK 3
#define GOLDHEN_SDK_CMD_PROCESS_INFO 4
#define GOLDHEN_SDK_CMD_PROCESS_RW 5
#define GOLDHEN_SDK_CMD_PROCESS_PRX_LOAD 6
#define GOLDHEN_SDK_CMD_PROCESS_PRX_UNLOAD 7
#define GOLDHEN_SDK_VERSION 0x00000100 // 1.00
extern int sys_sdk_cmd(uint64_t cmd, void *data);
extern int sys_sdk_jailbreak(struct jailbreak_backup* jb);
extern int sys_sdk_unjailbreak(struct jailbreak_backup* jb);
uint32_t sys_sdk_version();
int sys_sdk_proc_info(struct proc_info* info);
int sys_sdk_proc_rw(struct proc_rw* data);
int sys_sdk_proc_prx_load(char* process_name, char* prx_path);
int sys_sdk_proc_prx_unload(char* process_name, int prx_handle);
#ifdef __cplusplus
}
#endif