mirror of
https://github.com/TheOfficialFloW/bd-jb
synced 2024-12-22 14:38:50 -05:00
Reduce JIT allocation size to 1MB.
This commit is contained in:
parent
304686cfc0
commit
3314b0e7bc
@ -79,8 +79,11 @@ class Exploit implements Runnable {
|
||||
|
||||
socket.close();
|
||||
|
||||
Screen.println("[*] Executing payload...");
|
||||
Screen.println("[*] Mapping payload...");
|
||||
long payload = jit.mapPayload("/OS/HDD/download0/mnt_ada/payload.bin", 0x4000);
|
||||
Screen.println("[+] payload: " + Long.toHexString(payload));
|
||||
|
||||
Screen.println("[*] Executing payload...");
|
||||
int ret = (int) api.call(payload, api.dlsym(API.LIBKERNEL_MODULE_HANDLE, "sceKernelDlsym"));
|
||||
Screen.println("[+] Result: " + ret);
|
||||
} catch (Exception e) {
|
||||
|
@ -149,12 +149,12 @@ public final class JIT {
|
||||
throw new IllegalArgumentException("Invalid data section offset.");
|
||||
}
|
||||
|
||||
// TODO: Currently we just use maximum size so that the address is predictable.
|
||||
long size = MAX_CODE_SIZE;
|
||||
// TODO: Currently we hardcode the size so that the address is predictable.
|
||||
long size = 1 * 1024 * 1024;
|
||||
// long size = file.length() + 0x88 + ALIGNMENT - 1;
|
||||
// if (size >= MAX_CODE_SIZE) {
|
||||
// throw new IllegalArgumentException("Payload is too big.");
|
||||
// }
|
||||
if (size >= MAX_CODE_SIZE) {
|
||||
throw new IllegalArgumentException("Payload is too big.");
|
||||
}
|
||||
|
||||
// Allocate JIT memory.
|
||||
long name = api.malloc(4);
|
||||
|
Loading…
Reference in New Issue
Block a user