Skip to content

Commit

Permalink
i hate commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Thyssenkrupp234 committed Mar 7, 2023
1 parent 985f232 commit ceca183
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
3 changes: 2 additions & 1 deletion electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"oneClick": "false",
"perMachine": "false",
"allowToChangeInstallationDirectory": "true"
}
},
"extraResources": "./resources"
}

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<h1 id="ra1nm8t" class="center-align">ra1nm8</h1>
<div class="center-align" id="btndiv">
<button id="jbbtn">jailbreak</button>
<p class="font-light" id="footnote">exploit being used: MacDirtyCow (CVE-2022-46689)</p>
<p class="font-light" id="footnote"></p>
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions main.css
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
20 changes: 16 additions & 4 deletions src/jbbtn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand All @@ -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 <strong><code>su</code></strong> in terminal to gain root."
footnote.innerHTML = "successfully jailbroke macOS "+osversion+"! Run <strong><code>su</code></strong> 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 <strong><code>su</code></strong> in terminal to gain root."
footnote.innerHTML = "successfully jailbroke macOS "+osversion+"! Run <strong><code>su</code></strong> in terminal to gain root."
}
}
});
};
});
});

0 comments on commit ceca183

Please sign in to comment.