diff --git a/boot.elf b/boot.elf index a2acc39..e58c943 100644 Binary files a/boot.elf and b/boot.elf differ diff --git a/include/SysMenuInfo.h b/include/SysMenuInfo.h index b5b3b62..4281151 100644 --- a/include/SysMenuInfo.h +++ b/include/SysMenuInfo.h @@ -55,6 +55,7 @@ typedef struct { u8 priiloader; bool nandAccess; u32 runningIOS; + bool runningIOSType; u32 runningIOSRevision; } SysSettings_t; diff --git a/source/sys.c b/source/sys.c index a7215aa..bfda9f4 100644 --- a/source/sys.c +++ b/source/sys.c @@ -389,31 +389,22 @@ inline s32 RemoveBogusTMD(void) return ES_DeleteTitle(0x100000000LL); } -/* Probably doesn't work */ inline bool CheckBeerTicket(u32 titleID) { char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(0x20); u8 *buffer = NULL; u32 tik_size = 0; - //tik *ticket; + s32 ret = 0; sprintf(filepath, "/ticket/00000001/%08x.tik", titleID); if (read_isfs(filepath, &buffer, &tik_size)) { gprintf("Failed to read IOS%u ticket\n", titleID); return false; } - //ticket = (tik*)(buffer); - //gprintf("Key in IOS%08x ticket is %s.\n", titleID, ticket->cipher_title_key); - int i; - for (i = 0; i < tik_size - sizeof("GottaGetSomeBeer")-1; i++) - { - if (!strncmp((char*)buffer + i, "GottaGetSomeBeer", sizeof("GottaGetSomeBeer")-1)) { - free(buffer); - return true; - } - } + + if (tik_size != 676) return false; + ret = !strcmp((char*)buffer + 0x01BF, "GottaGetSomeBeer"); free(buffer); - return false; - //return !strcmp((char*)ticket->cipher_title_key, "GottaGetSomeBeer"); + return ret; } inline bool CheckIOSType(void) { diff --git a/source/sysCheck.c b/source/sysCheck.c index 11a7a83..1c6f992 100644 --- a/source/sysCheck.c +++ b/source/sysCheck.c @@ -50,6 +50,7 @@ int main(int argc, char **argv) arguments.USB = strlen(argv[0]) && (argv[0][0] == 'U' || argv[0][0] == 'u'); InitGecko(); + gprintf("=============================================================================="); if(argc>=1){ int i; for(i=0; i= CONF_REGION_JP && SystemInfo.systemRegion <= CONF_REGION_CN; // Display the console region