diff --git a/electron-builder.json b/electron-builder.json index 8434769..d7b69c7 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -25,6 +25,7 @@ "oneClick": "false", "perMachine": "false", "allowToChangeInstallationDirectory": "true" - } + }, + "extraResources": "./resources" } diff --git a/resources/fonts/FiraSans-Light.ttf b/fonts/FiraSans-Light.ttf similarity index 100% rename from resources/fonts/FiraSans-Light.ttf rename to fonts/FiraSans-Light.ttf diff --git a/resources/fonts/FiraSans-Medium.ttf b/fonts/FiraSans-Medium.ttf similarity index 100% rename from resources/fonts/FiraSans-Medium.ttf rename to fonts/FiraSans-Medium.ttf diff --git a/index.html b/index.html index eb2a640..5973ac6 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@

ra1nm8

-

exploit being used: MacDirtyCow (CVE-2022-46689)

+

diff --git a/main.css b/main.css index cbd03e3..cb1c78c 100644 --- a/main.css +++ b/main.css @@ -1,11 +1,11 @@ @font-face { font-family: "fira-sans-medium"; - src: url("./resources/fonts/FiraSans-Medium.ttf"); + src: url("./fonts/FiraSans-Medium.ttf"); } @font-face { font-family: "fira-sans-light"; - src: url("./resources/fonts/FiraSans-Light.ttf"); + src: url("./fonts/FiraSans-Light.ttf"); } .center-align { diff --git a/src/jbbtn.ts b/src/jbbtn.ts index 1777453..be27f21 100644 --- a/src/jbbtn.ts +++ b/src/jbbtn.ts @@ -3,6 +3,10 @@ const btn = document.getElementById("jbbtn") as HTMLButtonElement; const footnote = document.getElementById("footnote") as HTMLParagraphElement; const path = require("path"); const os = require('os'); +const fs = require('fs'); +const homedir = os.homedir(); +const appPath = __dirname.replace("/app.asar", "") + exec('sw_vers -productVersion', (error: any, stdout: string, stderr: any) => { if (error) { console.error(`exec error: ${error}`); @@ -17,25 +21,33 @@ exec('sw_vers -productVersion', (error: any, stdout: string, stderr: any) => { btn.disabled = true; return; } + footnote.innerHTML = "creating directory" + if (!fs.existsSync(path.join(homedir,"ra1nm8"))){ + fs.mkdirSync(path.join(homedir,"ra1nm8")); + }; + footnote.innerHTML = "copying exploit files" + fs.copyFileSync(appPath+"/resources/exploit/switcharoo", path.join(homedir,"ra1nm8/switcharoo")); + fs.copyFileSync(appPath+"/resources/exploit/overwrite_file.bin", path.join(homedir,"ra1nm8/overwrite_file.bin")) + footnote.innerHTML = "waiting for jailbreak" btn.onclick = () => { btn.textContent = "jailbreaking"; btn.disabled = true; btn.style.backgroundColor = "#FFC300"; - exec(path.join(__dirname,"/resources/exploit/switcharoo"+" /etc/pam.d/su "+path.join(__dirname,"/resources/exploit/overwrite_file.bin")), (error: any, stdout: any, stderr: any) => { + exec(path.join(homedir,"ra1nm8/switcharoo"+" /etc/pam.d/su "+path.join(homedir,"ra1nm8/overwrite_file.bin")), (error: any, stdout: any, stderr: any) => { if (error) { console.error(`exec error: ${error}`); if (stderr.includes("RO mapping was modified")){ btn.innerText = "jailbroken" btn.style.backgroundColor = "#32e000" btn.disabled = true - footnote.innerHTML = "successfully jailbroke macOS "+osversion+"! Run su in terminal to gain root." + footnote.innerHTML = "successfully jailbroke macOS "+osversion+"! Run su in terminal to gain root." } else if (stderr.includes("no diff?")){ btn.innerText = "jailbroken" btn.style.backgroundColor = "#32e000" btn.disabled = true - footnote.innerHTML = "successfully jailbroke macOS "+osversion+"! Run su in terminal to gain root." + footnote.innerHTML = "successfully jailbroke macOS "+osversion+"! Run su in terminal to gain root." } } }); }; -}); +}); \ No newline at end of file