Skip to content

Commit

Permalink
fix uninstall & ios 11
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeajames authored Feb 3, 2019
1 parent 7f803f2 commit 38b8a97
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions rootlessJB/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ - (IBAction)jailbrek:(id)sender {
printf("[-] Error using hgsp! '%s'\n", mach_error_string(ret));
printf("[*] Using exploit!\n");

taskforpidzero = exploit();
if (!maxVersion("11.4.1") && maxVersion("12.1.2")) {
taskforpidzero = voucher_swap();
}
else if (maxVersion("11.3.1")) {
taskforpidzero = exploit();
}

if (!MACH_PORT_VALID(taskforpidzero)) {
LOG("[-] Exploit failed");
Expand Down Expand Up @@ -129,9 +134,14 @@ - (IBAction)jailbrek:(id)sender {
}

LOG("[*] Starting fun");

kernel_slide_init();
init_with_kbase(taskforpidzero, 0xfffffff007004000 + kernel_slide);
if (!maxVersion("11.4.1") && maxVersion("12.1.2")) {
kernel_slide_init();
init_with_kbase(taskforpidzero, 0xfffffff007004000 + kernel_slide);
}
else if (maxVersion("11.3.1")) {
init_jelbrek(taskforpidzero);
}

LOG("[i] Kernel base: 0x%llx", KernelBase);

//---- basics ----//
Expand Down Expand Up @@ -435,7 +445,13 @@ - (IBAction)uninstall:(id)sender {
if (ret) {
printf("[-] Error using hgsp! '%s'\n", mach_error_string(ret));
printf("[*] Using exploit!\n");
taskforpidzero = exploit();

if (!maxVersion("11.4.1") && maxVersion("12.1.2")) {
taskforpidzero = voucher_swap();
}
else if (maxVersion("11.3.1")) {
taskforpidzero = exploit();
}

if (!MACH_PORT_VALID(taskforpidzero)) {
LOG("[-] Exploit failed");
Expand All @@ -446,7 +462,12 @@ - (IBAction)uninstall:(id)sender {
}
}
else {
taskforpidzero = exploit();
if (!maxVersion("11.4.1") && maxVersion("12.1.2")) {
taskforpidzero = voucher_swap();
}
else if (maxVersion("11.3.1")) {
taskforpidzero = exploit();
}

if (!MACH_PORT_VALID(taskforpidzero)) {
LOG("[-] Exploit failed");
Expand All @@ -456,7 +477,15 @@ - (IBAction)uninstall:(id)sender {
}
}
LOG("[*] Starting fun");
init_jelbrek(taskforpidzero);

if (!maxVersion("11.4.1") && maxVersion("12.1.2")) {
kernel_slide_init();
init_with_kbase(taskforpidzero, 0xfffffff007004000 + kernel_slide);
}
else if (maxVersion("11.3.1")) {
init_jelbrek(taskforpidzero);
}

LOG("[i] Kernel base: 0x%llx", KernelBase);

//---- basics ----//
Expand Down

0 comments on commit 38b8a97

Please sign in to comment.