Inject raw data into a module.
More...
Inject raw data into a module.
Sometimes, there is a need to inject data directly. This can also be used to inject code for functions too small to be hooked. Unlike hooks only one module can patch a given module and given address at a time. Also note that the original data will be saved by the kernel. That means huge patches are not recommended!
§ taiInjectAbs()
SceUID taiInjectAbs |
( |
void * |
dest, |
|
|
const void * |
src, |
|
|
size_t |
size |
|
) |
| |
Injects data into the current process bypassing MMU flags.
- See also
- taiInjectAbsForKernel
- Parameters
-
| dest | The address to inject |
[in] | src | Source data |
[in] | size | The size of the injection in bytes |
- Returns
- A tai patch reference on success, < 0 on error
- TAI_ERROR_PATCH_EXISTS if the address is already patched
Definition at line 276 of file taihen-user.c.
§ taiInjectAbsForKernel()
SceUID taiInjectAbsForKernel |
( |
SceUID |
pid, |
|
|
void * |
dest, |
|
|
const void * |
src, |
|
|
size_t |
size |
|
) |
| |
Injects data into a process bypassing MMU flags.
- Parameters
-
[in] | pid | The pid of the target (can be KERNEL_PID) |
| dest | The destination in the process address space |
[in] | src | The source in kernel address space |
[in] | size | The size of the injection in bytes |
- Returns
- A tai patch reference on success, < 0 on error
- TAI_ERROR_PATCH_EXISTS if the address is already patched
Definition at line 219 of file taihen.c.
§ taiInjectData()
HELPER SceUID taiInjectData |
( |
SceUID |
modid, |
|
|
int |
segidx, |
|
|
uint32_t |
offset, |
|
|
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
Helper function for taiInjectDataForUser.
- See also
- taiInjectDataForUser
- Parameters
-
[in] | modid | The module UID from taiGetModuleInfo |
[in] | segidx | Index of the ELF segment containing the data to patch |
[in] | offset | The offset from the start of the segment |
[in] | data | The data in kernel address space |
[in] | size | The size of the injection in bytes |
Definition at line 402 of file taihen.h.
§ taiInjectDataForKernel()
SceUID taiInjectDataForKernel |
( |
SceUID |
pid, |
|
|
SceUID |
modid, |
|
|
int |
segidx, |
|
|
uint32_t |
offset, |
|
|
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
Inject data into a process bypassing MMU flags given an offset.
- Parameters
-
[in] | pid | The pid of the target (can be KERNEL_PID) |
[in] | modid | The module UID from taiGetModuleInfoForKernel |
[in] | segidx | Index of the ELF segment containing the data to patch |
[in] | offset | The offset from the start of the segment |
[in] | data | The data in kernel address space |
[in] | size | The size of the injection in bytes |
- Returns
- A tai patch reference on success, < 0 on error
- TAI_ERROR_PATCH_EXISTS if the address is already patched
Definition at line 236 of file taihen.c.
§ taiInjectDataForUser()
Inject data into the current process bypassing MMU flags given an offset.
- See also
- taiInjectDataForKernel
- Parameters
-
- Returns
- A tai patch reference on success, < 0 on error
- TAI_ERROR_PATCH_EXISTS if the address is already patched
Definition at line 304 of file taihen-user.c.
§ taiInjectRelease()
int taiInjectRelease |
( |
SceUID |
tai_uid | ) |
|
Release an injection for the calling process.
- See also
- taiInjectReleaseForKernel
- Parameters
-
[in] | tai_uid | The tai patch reference to free |
- Returns
- Zero on success, < 0 on error
Definition at line 344 of file taihen-user.c.
§ taiInjectReleaseForKernel()
int taiInjectReleaseForKernel |
( |
SceUID |
tai_uid | ) |
|
Release an injection.
- Parameters
-
[in] | tai_uid | The tai patch reference to free |
- Returns
- Zero on success, < 0 on error
Definition at line 255 of file taihen.c.