From eb79f766e941bc66a36db703cf854fc8a6d3c115 Mon Sep 17 00:00:00 2001 From: Alexander Boulton Date: Sun, 18 May 2025 06:55:10 +0100 Subject: [PATCH] Prevent running kexploit more than once. --- lapse.mjs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lapse.mjs b/lapse.mjs index f3f8919..e294158 100644 --- a/lapse.mjs +++ b/lapse.mjs @@ -1663,6 +1663,15 @@ export async function kexploit() { await init(); const _init_t2 = performance.now(); + // If setuid is successful, we dont need to run the kexploit again + try { + if (sysi('setuid', 0) == 0) { + log("Not running kexploit again.") + return; + } + } + catch (e) {} + // fun fact: // if the first thing you do since boot is run the web browser, WebKit can // use all the cores @@ -1752,4 +1761,4 @@ kexploit().then(() => { payload_loader.addr, payload_buffer, ); -}) \ No newline at end of file +})