mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-06 03:58:02 +08:00
Add more information to kernel exploit process.
This commit is contained in:
parent
eb84268a09
commit
e8b1d583ec
@ -470,38 +470,59 @@ Result svchax_init(bool patch_srv)
|
||||
if(!__ctr_svchax) {
|
||||
if(__service_ptr) {
|
||||
if(kver > SYSTEM_VERSION(2, 51, 2)) {
|
||||
printf("Unsupported firmware version.");
|
||||
return -1;
|
||||
} else if(kver > SYSTEM_VERSION(2, 50, 11)) {
|
||||
printf("Executing waithax...");
|
||||
if(waithax_run()) {
|
||||
printf("Executing k_enable_all_svcs...");
|
||||
waithax_backdoor(k_enable_all_svcs);
|
||||
|
||||
printf("Cleaning up waithax...");
|
||||
waithax_cleanup();
|
||||
|
||||
printf("waithax complete.");
|
||||
__ctr_svchax = 1;
|
||||
}
|
||||
} else {
|
||||
if(kver > SYSTEM_VERSION(2, 46, 0)) {
|
||||
printf("Executing memchunkhax2...");
|
||||
do_memchunkhax2();
|
||||
} else {
|
||||
printf("Executing memchunkhax1...");
|
||||
do_memchunkhax1();
|
||||
}
|
||||
|
||||
printf("Executing k_enable_all_svcs...");
|
||||
svc_7b((backdoor_fn) k_enable_all_svcs);
|
||||
|
||||
printf("memchunkhax complete.");
|
||||
__ctr_svchax = 1;
|
||||
}
|
||||
} else {
|
||||
printf("Executing k_enable_all_svcs...");
|
||||
svc_7b((backdoor_fn) k_enable_all_svcs);
|
||||
|
||||
printf("SVC access patch complete.");
|
||||
__ctr_svchax = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (patch_srv && __ctr_svchax && !__ctr_svchax_srv)
|
||||
{
|
||||
printf("Patching PID to 0...");
|
||||
u32 PID_kaddr = read_kaddr(CURRENT_KPROCESS) + (g_is_new3ds ? 0xBC : (kver > SYSTEM_VERSION(2, 40, 0)) ? 0xB4 : 0xAC);
|
||||
u32 old_PID = read_kaddr(PID_kaddr);
|
||||
write_kaddr(PID_kaddr, 0);
|
||||
|
||||
printf("Reinitializing srv...");
|
||||
srvExit();
|
||||
srvInit();
|
||||
|
||||
printf("Restoring PID...");
|
||||
write_kaddr(PID_kaddr, old_PID);
|
||||
|
||||
printf("Service access patch complete.");
|
||||
__ctr_svchax_srv = 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user