Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Always set ease_nro_restriction on install
Browse files Browse the repository at this point in the history
  • Loading branch information
plutoo committed Feb 20, 2018
1 parent 98cc2db commit a830fb1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pegaswitch/exploit/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,19 @@ function main ()
alert('Failed to pwn sdb!');
}

sc.getServices(["set:sys", "set:fd"], function (setsys, setfd) {
var setSetting = function (session, cls, nam, value) { // session is set:fd
var a = new Uint32Array(1);
a[0] = value;
var x1 = utils.str2ab(cls);
var x2 = utils.str2ab(nam);
return sc.ipcMsg(2).xDescriptor(x1, 48, 0).xDescriptor(x2, 48, 1).aDescriptor(a, 4, 0).sendTo(session).asResult();
}

utils.log("Setting ease_nro_restriction");
setSetting(setfd, "ro", "ease_nro_restriction", 1).assertOk();
});

this.sdb.onready = function()
{
utils.log("Running installer.nro");
Expand Down

0 comments on commit a830fb1

Please sign in to comment.