-Updated to a custom version of libruntimeiospatch so updating works on IOS's besides 58 (patches ported by PabloACZ)

-Updated Spanish translation (thanks NaxoR93)
This commit is contained in:
joostinonline 2015-10-13 20:42:02 +00:00
parent 3bc718bfa2
commit 961844eeb5
8 changed files with 243 additions and 37 deletions

View File

@ -40,7 +40,6 @@ LIBS += -lwiilight -lwiiuse
#LIBS += -lmodplay -lasnd
LIBS += -lbte -logc -lm
LIBS += -lCheckRegion
LIBS += -lruntimeiospatch
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing

View File

@ -1 +1 @@
<Project name="SysCheck HDE"><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.c;*.cpp;*.h" name="source" path="source\"><File path="fatMounter.c"></File><File path="gecko.c"></File><File path="gui.c"></File><File path="http.c"></File><File path="languages.c"></File><File path="mload.c"></File><File path="sha1.c"></File><File path="ssl.c"></File><File path="sys.c"></File><File path="sysCheck.c"></File><File path="SysMenuInfo.c"></File><File path="title.c"></File><File path="tmdIdentification.c"></File><File path="tools.c"></File><File path="update.c"></File><File path="upload.c"></File><File path="wiibasics.c"></File></MagicFolder><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.h" name="include" path="include\"><File path="fatMounter.h"></File><File path="gecko.h"></File><File path="gui.h"></File><File path="http.h"></File><File path="languages.h"></File><File path="mload.h"></File><File path="sha1.h"></File><File path="ssl.h"></File><File path="sys.h"></File><File path="SysMenuInfo.h"></File><File path="title.h"></File><File path="tmdIdentification.h"></File><File path="tools.h"></File><File path="update.h"></File><File path="wiibasics.h"></File></MagicFolder><File path="Makefile"></File></Project>
<Project name="SysCheck HDE"><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.c;*.cpp;*.h" name="source" path="source\"><File path="fatMounter.c"></File><File path="gecko.c"></File><File path="gui.c"></File><File path="http.c"></File><File path="languages.c"></File><File path="mload.c"></File><File path="runtimeiospatch.c"></File><File path="sha1.c"></File><File path="ssl.c"></File><File path="sys.c"></File><File path="sysCheck.c"></File><File path="SysMenuInfo.c"></File><File path="title.c"></File><File path="tmdIdentification.c"></File><File path="tools.c"></File><File path="update.c"></File><File path="upload.c"></File><File path="wiibasics.c"></File></MagicFolder><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.h" name="include" path="include\"><File path="fatMounter.h"></File><File path="gecko.h"></File><File path="gui.h"></File><File path="http.h"></File><File path="languages.h"></File><File path="mload.h"></File><File path="runtimeiospatch.h"></File><File path="sha1.h"></File><File path="ssl.h"></File><File path="sys.h"></File><File path="SysMenuInfo.h"></File><File path="title.h"></File><File path="tmdIdentification.h"></File><File path="tools.h"></File><File path="update.h"></File><File path="wiibasics.h"></File></MagicFolder><File path="Makefile"></File></Project>

BIN
boot.elf

Binary file not shown.

View File

@ -9,9 +9,10 @@
// Copyright (C) 2010 Joseph Jordan <joe.ftpii@psychlaw.com.au>
// Copyright (C) 2012-2013 damysteryman
// Copyright (C) 2012-2013 Christopher Bratusek <nano@tuxfamily.org>
// Copyright (C) 2012-2015 Christopher Bratusek <nano@jpberlin.de>
// Copyright (C) 2013 DarkMatterCore
// Copyright (C) 2014 megazig
// Copyright (C) 2015 FIX94
#ifndef __RUNTIMEIOSPATCH_H__
#define __RUNTIMEIOSPATCH_H__
@ -62,6 +63,7 @@ Wii:
* ES SetIdentify
* Hash Check (aka Trucha)
* New Hash Check (aka New Trucha)
* SSL patches
Sciifii:
* MEM2 Prot

Binary file not shown.

View File

@ -1,6 +1,6 @@
#include <stdio.h>
#include <gccore.h>
#include "sys.h"
#include "sys.h"
#include "fatMounter.h"
#include "languages.h"
@ -255,56 +255,56 @@ int initLanguages(struct tm today)
TXT_IOSSkipped = "Ignorato";
break;
case CONF_LANG_SPANISH:
case CONF_LANG_SPANISH:
MSG_GetConsoleRegion = "Obteniendo la region de la consola...";
MSG_GetSysMenuVer = "Obteniendo la version del Menu de Sistema...";
MSG_GetHBCVer = "Obteniendo version de Canal Homebrew y IOS que usa...";
MSG_GetRunningIOS = "Obteniendo version y revision de IOS usado...";
MSG_GetHBCVer = "Obteniendo la version del Canal Homebrew y del IOS que usa...";
MSG_GetRunningIOS = "Obteniendo la version y revision del IOS usado...";
MSG_GetConsoleID = "Obteniendo ID de la consola...";
MSG_GetBoot2 = "Obteniendo la version de boot2...";
TXT_Region = "Region";
TXT_Unknown = "Desconocido";
MSG_GetNrOfTitles = "Obteniendo numero de titulos...";
ERR_GetNrOfTitles = "No se pudo obtener numero de titulos.";
ERR_GetNrOfTitles = "No se pudo obtener el numero de titulos.";
MSG_GetTitleList = "Obteniendo lista de titulos...";
ERR_GetTitleList = "No se pudo obtener lista de titulos.";
ERR_GetIosTMDSize = "Error al llamar ES_GetStoredTMDSize de IOS%d.";
ERR_GetIosTMD = "Error al llamar ES_GetStoredTMD de IOS%d.";
ERR_GetTitleList = "No se pudo obtener la lista de titulos.";
ERR_GetIosTMDSize = "Error al obtener el ES_GetStoredTMDSize del IOS%d.";
ERR_GetIosTMD = "Error al obtener el ES_GetStoredTMD del IOS%d.";
MSG_MountSD = "Montando Tarjeta SD...";
MSG_UnmountSD = "Desmontando Tarjeta SD...";
MSG_InitFAT = "Inicializando sistema de archivos FAT...";
ERR_InitFAT = "Imposible inicializar sistema de archivos FAT.";
ERR_InitFAT = "Error al inicializar sistema de archivos FAT.";
MSG_SortTitles = "Ordenando titulos...";
MSG_GetCertificates = "Obteniendo certificados de la NAND...";
ERR_GetCertificates = "No se pudieron obtener certificados de la NAND...";
ERR_GetCertificates = "No se pudieron obtener los certificados de la NAND...";
TXT_SysMenu = "Menu de Sistema %1.1f%c (v%d)";
TXT_SysMenu2 = "Menu de Sistema %s%s (v%d)";
TXT_SysMenu3 = "Menu de Sistema %1.1f%c (v%d, Info: v%d %s)";
TXT_NO_HBC = "No esta' instalado el Canal Homebrew";
TXT_HBC = "Canal Homebrew 1.0.%d corriendo en IOS%d";
TXT_HBC_NEW = "Canal Homebrew 1.1.0 corriendo en IOS%d";
TXT_HBC_112 = "Canal Homebrew 1.1.%d corriendo en %d";
TXT_HBF = "Homebrew Filter rev%d corriendo en IOS58";
TXT_NO_HBC = "El Canal Homebrew no esta instalado";
TXT_HBC = "Canal Homebrew 1.0.%d ejecutandose en IOS%d";
TXT_HBC_NEW = "Canal Homebrew 1.1.0 ejecutandose en IOS%d";
TXT_HBC_112 = "Canal Homebrew 1.1.%d ejecutandose en IOS%d";
TXT_HBF = "Homebrew Filter rev%d ejecutandose en IOS58";
TXT_Hollywood = "Hollywood v0x%x";
TXT_ConsoleID = "ID de consola: %d";
TXT_ConsoleType = "Tipo Consola: %s";
TXT_ShopCountry ="Canal Tienda Country: %s (%u)";
TXT_ConsoleType = "Tipo de consola: %s";
TXT_ShopCountry ="Pais del Canal Tienda: %s (%u)";
TXT_vBoot2 = "Boot2 v%u";
TXT_NrOfTitles = "Encontrados %d titulos.";
TXT_NrOfTitles = "%d titulos encontrados.";
TXT_NrOfIOS = "Se encontraron %d IOS en esta consola. %d de ellos son stubs.";
TXT_AppTitle = "SysCheck HDE %s por JoostinOnline, Double_A, R2-D2199, y Nano";
TXT_AppIOS = "...corre en %sIOS%d (rev %d).";
ERR_AllocateMemory = "Imposible asignar memoria para %d titulos.";
ERR_OpenFile = "Imposible abrir el archivo!";
MSG_SelectIOS = "Este IOS sera analizado (Selecciona):";
TXT_AppIOS = "...ejecutado en %sIOS%d (rev %d).";
ERR_AllocateMemory = "Error al asignar memoria para %d titulos.";
ERR_OpenFile = "Error al abrir el archivo!";
MSG_SelectIOS = "Este IOS sera analizado (seleccionar):";
MSG_All = "Todos";
MSG_TestingIOS = "Analizando %s...";
MSG_ReloadIOS = "Recargando IOS%d (rev %d)...";
MSG_GenerateReport = "Generando reporte...";
MSG_ReportSuccess = "Exito! Quieres ver el reporte?";
MSG_ReportError = "Error! Quieres mostrar el reporte igualmente?";
MSG_ReportError = "Error! Quieres ver el reporte de todas formas?";
TXT_Stub = " Stub";
TXT_Trucha = " Trucha Bug,";
TXT_Trucha = " Bug Trucha,";
TXT_ES = " ES Identify,";
TXT_Flash = " Acceso Flash,";
TXT_NAND = " Acceso NAND,";
@ -317,17 +317,17 @@ int initLanguages(struct tm today)
BUT_HBC = "Canal Homebrew";
BUT_Shutoff = "Apagar";
BUT_SysMenu = "Menu de Sistema";
BUT_Update = "Actualizacion";
BUT_Update = "Actualizar";
TXT_Priiloader = "Priiloader instalado";
TXT_PreFiix = "PreFiix instalado";
MSG_Update = "Actualizacion SysCheck...";
MSG_NoUpdate = "Esta version esta actualizada!";
MSG_UpdateSuccess = "La actualizacion se ha cargado con exito!";
MSG_Update = "Actualizando SysCheck...";
MSG_NoUpdate = "Esta version es la ultima!";
MSG_UpdateSuccess = "La actualizacion se ha realizado satisfactoriamente!";
MSG_UpdateFail = "El proceso de actualizacion ha fallado!";
TXT_DVD = "Unidad de la fecha: %s";
TXT_NoDVD = "No se ha detectado la fecha de la unidad";
TXT_DVD = "Fecha de la unidad: %s";
TXT_NoDVD = "No se ha podido detectar la fecha de la unidad!";
BUT_ConfirmUpload = "Subir informe";
TXT_Upload = "Cargar el informe...";
TXT_Upload = "Subiendo el informe...";
BUT_OK = "OK";
TXT_OriginalRegion = " (region de origen: ";
TXT_IOSSkipped = "Omitido";

204
source/runtimeiospatch.c Normal file
View File

@ -0,0 +1,204 @@
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// Copyright (C) 2010 Joseph Jordan <joe.ftpii@psychlaw.com.au>
// Copyright (C) 2012-2013 damysteryman
// Copyright (C) 2012-2015 Christopher Bratusek <nano@jpberlin.de>
// Copyright (C) 2013 DarkMatterCore
// Copyright (C) 2014 megazig
// Copyright (C) 2015 FIX94
#include <gccore.h>
#include <ogc/machine/processor.h>
#include <stdio.h>
#include <string.h>
#include "runtimeiospatch.h"
#include "gecko.h"
#define MEM_REG_BASE 0xd8b4000
#define MEM_PROT (MEM_REG_BASE + 0x20a)
static inline void disable_memory_protection(void) {
write32(MEM_PROT, read32(MEM_PROT) & 0x0000FFFF);
}
static const u8 di_readlimit_old[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0A, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
0x7E, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08
};
static const u8 di_readlimit_patch[] = { 0x7e, 0xd4 };
static const u8 isfs_permissions_old[] = { 0x42, 0x8B, 0xD0, 0x01, 0x25, 0x66 };
static const u8 isfs_permissions_patch[] = { 0x42, 0x8B, 0xE0, 0x01, 0x25, 0x66 };
static const u8 setuid_old[] = { 0xD1, 0x2A, 0x1C, 0x39 };
static const u8 setuid_patch[] = { 0x46, 0xC0 };
static const u8 es_identify_old[] = { 0x28, 0x03, 0xD1, 0x23 };
static const u8 es_identify_patch[] = { 0x00, 0x00 };
static const u8 hash_old[] = { 0x20, 0x07, 0x23, 0xA2 };
static const u8 hash_patch[] = { 0x00 };
static const u8 new_hash_old[] = { 0x20, 0x07, 0x4B, 0x0B };
static const u8 addticket_vers_check[] = { 0xD2, 0x01, 0x4E, 0x56 };
static const u8 addticket_patch[] = { 0xE0 };
static const u8 es_set_ahbprot_old[] = { 0x68, 0x5B, 0x22, 0xEC, 0x00, 0x52, 0x18, 0x9B, 0x68, 0x1B, 0x46, 0x98, 0x07, 0xDB };
static const u8 es_set_ahbprot_patch[] = { 0x01 };
/* SSL patches made by FIX94 for Nintendont. Ported to libruntimeiospatch by DarkMatterCore */
static const u8 ssl_patch1_old[] = { 0xFE, 0x0E, 0xE3, 0x50, 0x00, 0x00, 0x05, 0x9F };
static const u8 ssl_patch1_new[] = { 0xFE, 0x0E, 0xE3, 0x28, 0xF1, 0x02, 0x05, 0x9F }; // Fixes SSL error -9 (wrong host)
static const u8 ssl_patch2_old[] = { 0x00, 0x00, 0x0A, 0x00, 0x00, 0x09, 0xEA, 0x00 };
static const u8 ssl_patch2_new[] = { 0x00, 0x00, 0xEA, 0x00, 0x00, 0x09, 0xEA, 0x00 }; // Fixes SSL error -10 (part 1) (wrong root cert)
static const u8 ssl_patch3_old[] = { 0x00, 0x00, 0x1A, 0x00, 0x00, 0x08, 0xE3, 0xE0 };
static const u8 ssl_patch3_new[] = { 0x00, 0x00, 0xEA, 0x00, 0x00, 0x08, 0xE3, 0xE0 }; // Fixes SSL error -10 (part 2) (wrong root cert)
static const u8 ssl_patch4_old[] = { 0x00, 0x00, 0xDA, 0x00, 0x00, 0x16, 0xE7, 0x96 };
static const u8 ssl_patch4_new[] = { 0x00, 0x00, 0xEA, 0x00, 0x00, 0x16, 0xE7, 0x96 }; // Fixes SSL error -11 (wrong client cert)
//Following patches added to iospatch.c by damysteryman, taken from sciifii v5
static const u8 MEM2_prot_old[] = { 0xB5, 0x00, 0x4B, 0x09, 0x22, 0x01, 0x80, 0x1A, 0x22, 0xF0 };
static const u8 MEM2_prot_patch[] = { 0xB5, 0x00, 0x4B, 0x09, 0x22, 0x00, 0x80, 0x1A, 0x22, 0xF0 };
static const u8 ES_OpenTitleContent1_old[] = { 0x9D, 0x05, 0x42, 0x9D, 0xD0, 0x03 };
static const u8 ES_OpenTitleContent1_patch[] = { 0x9D, 0x05, 0x42, 0x9D, 0xE0, 0x03 };
static const u8 ES_OpenTitleContent2_old[] = { 0xD4, 0x01, 0x4C, 0x36, 0xE0, 0x3B };
static const u8 ES_OpenTitleContent2_patch[] = { 0xE0, 0x01, 0x4C, 0x36, 0xE0, 0x3B };
static const u8 ES_ReadContent_old[] = { 0xFC, 0x0F, 0xB5, 0x30, 0x1C, 0x14, 0x1C, 0x1D, 0x4B,
0x0E, 0x68, 0x9B, 0x2B, 0x00, 0xD0, 0x03, 0x29, 0x00, 0xDB, 0x01,
0x29, 0x0F, 0xDD, 0x01 };
static const u8 ES_ReadContent_patch[] = { 0xFC, 0x0F, 0xB5, 0x30, 0x1C, 0x14, 0x1C, 0x1D, 0x4B,
0x0E, 0x68, 0x9B, 0x2B, 0x00, 0x46, 0xC0, 0x29, 0x00, 0x46, 0xC0,
0x29, 0x0F, 0xE0, 0x01 };
static const u8 ES_CloseContent_old[] = { 0xB5, 0x10, 0x4B, 0x10, 0x68, 0x9B, 0x2B, 0x00, 0xD0,
0x03, 0x29, 0x00, 0xDB, 0x01, 0x29, 0x0F, 0xDD, 0x01 };
static const u8 ES_CloseContent_patch[] = { 0xB5, 0x10, 0x4B, 0x10, 0x68, 0x9B, 0x2B, 0x00, 0x46,
0xC0, 0x29, 0x00, 0x46, 0xC0, 0x29, 0x0F, 0xE0, 0x01 };
static const u8 ES_TitleVersionCheck_old[] = { 0xD2, 0x01, 0x4E, 0x56 };
static const u8 ES_TitleVersionCheck_patch[] = { 0xE0, 0x01, 0x4E, 0x56 };
static const u8 ES_TitleDeleteCheck_old[] = { 0xD8, 0x00, 0x4A, 0x04 };
static const u8 ES_TitleDeleteCheck_patch[] = { 0xE0, 0x00, 0x4A, 0x04 };
//Following set of patches made by damysteryman for use with Wii U's vWii
static const u8 Kill_AntiSysTitleInstallv3_pt1_old[] = { 0x68, 0x1A, 0x2A, 0x01, 0xD0, 0x05 }; // Make sure that the pt1
static const u8 Kill_AntiSysTitleInstallv3_pt1_patch[] = { 0x68, 0x1A, 0x2A, 0x01, 0x46, 0xC0 }; // patch is applied twice. -dmm
static const u8 Kill_AntiSysTitleInstallv3_pt2_old[] = { 0xD0, 0x02, 0x33, 0x06, 0x42, 0x9A, 0xD1, 0x01 }; // Make sure that the pt2 patch
static const u8 Kill_AntiSysTitleInstallv3_pt2_patch[] = { 0x46, 0xC0, 0x33, 0x06, 0x42, 0x9A, 0xE0, 0x01 }; // is also applied twice. -dmm
static const u8 Kill_AntiSysTitleInstallv3_pt3_old[] = { 0x68, 0xFB, 0x2B, 0x00, 0xDB, 0x01 };
static const u8 Kill_AntiSysTitleInstallv3_pt3_patch[] = { 0x68, 0xFB, 0x2B, 0x00, 0xDB, 0x10 };
/* ISFS_SetAttr patches made by megazig */
static const u8 isfs_setattr_pt1_old[] = { 0x42, 0xAB, 0xD0, 0x02, 0x20, 0x66 };
static const u8 isfs_setattr_pt1_patch[] = { 0x42, 0xAB, 0xE0, 0x02, 0x20, 0x66 };
static const u8 isfs_setattr_pt2_old[] = { 0x2D, 0x00, 0xD0, 0x02, 0x20, 0x66 };
static const u8 isfs_setattr_pt2_patch[] = { 0x2D, 0x00, 0xE0, 0x02, 0x20, 0x66 };
static u8 apply_patch(const char *name, const u8 *old, u32 old_size, const u8 *patch, size_t patch_size, u32 patch_offset, bool verbose) {
u8 *ptr_start = (u8*)*((u32*)0x80003134), *ptr_end = (u8*)0x94000000;
u8 found = 0;
if(verbose)
gprintf(" Patching %-30s", name);
u8 *location = NULL;
while (ptr_start < (ptr_end - patch_size)) {
if (!memcmp(ptr_start, old, old_size)) {
found++;
location = ptr_start + patch_offset;
u8 *start = location;
u32 i;
for (i = 0; i < patch_size; i++) {
*location++ = patch[i];
}
DCFlushRange((u8 *)(((u32)start) >> 5 << 5), (patch_size >> 5 << 5) + 64);
ICInvalidateRange((u8 *)(((u32)start) >> 5 << 5), (patch_size >> 5 << 5) + 64);
}
ptr_start++;
}
if(verbose){
if (found)
gprintf(" patched\n");
else
gprintf(" not patched\n");
}
return found;
}
s32 IosPatch_AHBPROT(bool verbose) {
if (AHBPROT_DISABLED) {
disable_memory_protection();
s32 ret = apply_patch("es_set_ahbprot", es_set_ahbprot_old, sizeof(es_set_ahbprot_old), es_set_ahbprot_patch, sizeof(es_set_ahbprot_patch), 25, verbose);
if (ret)
return ret;
else
return ERROR_PATCH;
}
return ERROR_AHBPROT;
}
s32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose) {
s32 count = 0;
if (AHBPROT_DISABLED) {
disable_memory_protection();
if(wii)
{
if(verbose) gprintf(">> Applying standard Wii patches:\n");
count += apply_patch("di_readlimit", di_readlimit_old, sizeof(di_readlimit_old), di_readlimit_patch, sizeof(di_readlimit_patch), 12, verbose);
count += apply_patch("isfs_permissions", isfs_permissions_old, sizeof(isfs_permissions_old), isfs_permissions_patch, sizeof(isfs_permissions_patch), 0, verbose);
count += apply_patch("es_setuid", setuid_old, sizeof(setuid_old), setuid_patch, sizeof(setuid_patch), 0, verbose);
count += apply_patch("es_identify", es_identify_old, sizeof(es_identify_old), es_identify_patch, sizeof(es_identify_patch), 2, verbose);
count += apply_patch("hash_check", hash_old, sizeof(hash_old), hash_patch, sizeof(hash_patch), 1, verbose);
count += apply_patch("new_hash_check", new_hash_old, sizeof(new_hash_old), hash_patch, sizeof(hash_patch), 1, verbose);
count += apply_patch("isfs_setattr_pt1", isfs_setattr_pt1_old, sizeof(isfs_setattr_pt1_old), isfs_setattr_pt1_patch, sizeof(isfs_setattr_pt1_patch), 0, verbose);
count += apply_patch("isfs_setattr_pt2", isfs_setattr_pt2_old, sizeof(isfs_setattr_pt2_old), isfs_setattr_pt2_patch, sizeof(isfs_setattr_pt2_patch), 0, verbose);
count += apply_patch("ssl_patch1", ssl_patch1_old, sizeof(ssl_patch1_old), ssl_patch1_new, sizeof(ssl_patch1_new), 0, verbose);
count += apply_patch("ssl_patch2", ssl_patch2_old, sizeof(ssl_patch2_old), ssl_patch2_new, sizeof(ssl_patch2_new), 0, verbose);
count += apply_patch("ssl_patch3", ssl_patch3_old, sizeof(ssl_patch3_old), ssl_patch3_new, sizeof(ssl_patch3_new), 0, verbose);
count += apply_patch("ssl_patch4", ssl_patch4_old, sizeof(ssl_patch4_old), ssl_patch4_new, sizeof(ssl_patch4_new), 0, verbose);
}
if(sciifii)
{
if(verbose) gprintf(">> Applying Sciifii patches:\n");
count += apply_patch("MEM2_prot", MEM2_prot_old, sizeof(MEM2_prot_old), MEM2_prot_patch, sizeof(MEM2_prot_patch), 0, verbose);
count += apply_patch("ES_OpenTitleContent1", ES_OpenTitleContent1_old, sizeof(ES_OpenTitleContent1_old), ES_OpenTitleContent1_patch, sizeof(ES_OpenTitleContent1_patch), 0, verbose);
count += apply_patch("ES_OpenTitleContent2", ES_OpenTitleContent2_old, sizeof(ES_OpenTitleContent2_old), ES_OpenTitleContent2_patch, sizeof(ES_OpenTitleContent2_patch), 0, verbose);
count += apply_patch("ES_ReadContent_prot", ES_ReadContent_old, sizeof(ES_ReadContent_old), ES_ReadContent_patch, sizeof(ES_ReadContent_patch), 0, verbose);
count += apply_patch("ES_CloseContent", ES_CloseContent_old, sizeof(ES_CloseContent_old), ES_CloseContent_patch, sizeof(ES_CloseContent_patch), 0, verbose);
count += apply_patch("ES_TitleVersionCheck", ES_TitleVersionCheck_old, sizeof(ES_TitleVersionCheck_old), ES_TitleVersionCheck_patch, sizeof(ES_TitleVersionCheck_patch), 0, verbose);
count += apply_patch("ES_TitleDeleteCheck", ES_TitleDeleteCheck_old, sizeof(ES_TitleDeleteCheck_old), ES_TitleDeleteCheck_patch, sizeof(ES_TitleDeleteCheck_patch), 0, verbose);
}
if(vwii)
{
if(verbose) gprintf(">> Applying vWii patches:\n");
count += apply_patch("Kill_AntiSysTitleInstallv3_pt1", Kill_AntiSysTitleInstallv3_pt1_old, sizeof(Kill_AntiSysTitleInstallv3_pt1_old), Kill_AntiSysTitleInstallv3_pt1_patch, sizeof(Kill_AntiSysTitleInstallv3_pt1_patch), 0, verbose);
count += apply_patch("Kill_AntiSysTitleInstallv3_pt2", Kill_AntiSysTitleInstallv3_pt2_old, sizeof(Kill_AntiSysTitleInstallv3_pt2_old), Kill_AntiSysTitleInstallv3_pt2_patch, sizeof(Kill_AntiSysTitleInstallv3_pt2_patch), 0, verbose);
count += apply_patch("Kill_AntiSysTitleInstallv3_pt3", Kill_AntiSysTitleInstallv3_pt3_old, sizeof(Kill_AntiSysTitleInstallv3_pt3_old), Kill_AntiSysTitleInstallv3_pt3_patch, sizeof(Kill_AntiSysTitleInstallv3_pt3_patch), 0, verbose);
}
return count;
}
return ERROR_AHBPROT;
}
s32 IosPatch_FULL(bool wii, bool sciifii, bool vwii, bool verbose, int IOS) {
s32 ret = 0;
s32 xret = 0;
if (AHBPROT_DISABLED)
ret = IosPatch_AHBPROT(verbose);
else
return ERROR_AHBPROT;
if (ret) {
IOS_ReloadIOS(IOS);
xret = IosPatch_RUNTIME(wii, sciifii, vwii, verbose);
} else {
xret = ERROR_PATCH;
}
return xret;
}

View File

@ -14,7 +14,8 @@
#include <stdarg.h>
#include <di/di.h>
#include <CheckRegion.h>
#include <runtimeiospatch/runtimeiospatch.h>
//#include <runtimeiospatch/runtimeiospatch.h>
#include "runtimeiospatch.h"
#include "SysMenuInfo.h"
#include "fatMounter.h"
@ -50,7 +51,7 @@ int main(int argc, char **argv)
arguments.USB = strlen(argv[0]) && (argv[0][0] == 'U' || argv[0][0] == 'u');
InitGecko();
gprintf("\n\n==============================================================================\n");
gprintf(" \n \n==============================================================================\n");
if(argc>=1){
int i;
for(i=0; i<argc; i++){
@ -74,7 +75,7 @@ int main(int argc, char **argv)
SystemInfo.deviceType = IS_WII_U;
memset(SystemInfo.miosInfo, 0, sizeof(SystemInfo.miosInfo));
if (AHB_ACCESS && !arguments.forceNoAHBPROT) IosPatch_RUNTIME(true, false, false, false);
if (AHB_ACCESS && !arguments.forceNoAHBPROT) IosPatch_RUNTIME(true, false, false, true);
SystemInfo.nandAccess = CheckNANDAccess();
// Get and display the current date and time