MCPcopy Create free account
hub / github.com/Cryptogenic/PS5-IPV6-Kernel-Exploit / find_worker

Function find_worker

document/en/ps5/exploit.js:45–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45function find_worker() {
46
47 const PTHREAD_NEXT_THREAD_OFFSET = 0x38;
48 const PTHREAD_STACK_ADDR_OFFSET = 0xA8;
49 const PTHREAD_STACK_SIZE_OFFSET = 0xB0;
50
51 for (let thread = p.read8(libKernelBase.add32(OFFSET_lk__thread_list)); thread.low != 0x0 && thread.hi != 0x0; thread = p.read8(thread.add32(PTHREAD_NEXT_THREAD_OFFSET))) {
52 let stack = p.read8(thread.add32(PTHREAD_STACK_ADDR_OFFSET));
53 let stacksz = p.read8(thread.add32(PTHREAD_STACK_SIZE_OFFSET));
54 if (stacksz.low == 0x80000) {
55 return stack;
56 }
57 }
58 alert("failed to find worker.");
59}
60
61async function userland() {
62 p.pre_chain = pre_chain;

Callers 1

userlandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected