mirror of
https://github.com/modmii/SysCheck-ModMii-Edition.git
synced 2024-11-25 09:36:54 +01:00
-Disabled vIOS check on a real Wii because it was causing problems
-Fixed the drive date bug (for real this time) -Fixed possible crash when there is no AHB access -Fixed crash when unknown System Menu version is installed
This commit is contained in:
parent
8c9566996a
commit
c40aade1d7
Binary file not shown.
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
@ -2,11 +2,12 @@
|
||||
<app version="1">
|
||||
<name>SysCheck HacksDen Edition</name>
|
||||
<coder>Double_A, R2-D2199, JoostinOnline, Nano</coder>
|
||||
<version>2.3.1 HD Edition</version>
|
||||
<release_date>20150121000000</release_date>
|
||||
<version>2.3.2 HD Edition</version>
|
||||
<release_date>20150128000000</release_date>
|
||||
<short_description>System Checker HacksDen Edition</short_description>
|
||||
<long_description>Homebrew application which does several checks on installed IOS and custom IOS:
|
||||
- Base IOS Detection
|
||||
- vIOS Detection
|
||||
- IOS Stub
|
||||
- Fake signature (aka Trucha Bug)
|
||||
- ES_DiVerify (aka ES_Identify)
|
||||
@ -21,6 +22,12 @@ The author can not be held responsible for any damage sysCheck might cause!
|
||||
|
||||
------------------
|
||||
Changelog
|
||||
Version 2.3.2 HacksDen Edition
|
||||
* Disabled vIOS check on a real Wii because it was causing problems
|
||||
* Fixed the drive date bug (for real this time)
|
||||
* Fixed possible crash when there is no AHB access
|
||||
* Fixed crash when unknown System Menu version is installed
|
||||
|
||||
Version 2.3.1 HacksDen Edition
|
||||
* Added hashes for hermes cIOS 2XX[38+60]v4, 2XX[38+37]v4, and 2XX[57]v5.1 (thanks Cyan)
|
||||
* Now reports if you have a vIOS installed
|
||||
|
@ -1 +1 @@
|
||||
Version=39
|
||||
Version=40
|
@ -46,6 +46,11 @@ enum {
|
||||
LAST
|
||||
};
|
||||
|
||||
enum {
|
||||
CONSOLE_WII = 0,
|
||||
CONSOLE_WII_U
|
||||
};
|
||||
|
||||
enum {
|
||||
HBC_NONE = 0,
|
||||
HBC_HAXX,
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define _UPDATE_H_
|
||||
|
||||
/* Constants */
|
||||
#define REVISION 39
|
||||
#define REVISION 40
|
||||
#define PATH "sd:/apps/SysCheckHDE/"
|
||||
|
||||
s32 updateApp(void);
|
||||
|
@ -39,138 +39,6 @@ inline void *AllocateMemory(u32 size) {
|
||||
return memalign(32, round_up(size, 32));
|
||||
}
|
||||
|
||||
char sanitizeRegion( char region ) {
|
||||
switch (region){
|
||||
case 'U':
|
||||
case 'E':
|
||||
case 'J':
|
||||
case 'K':
|
||||
return region;
|
||||
break;
|
||||
default:
|
||||
return 'X';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int ctoi(char c) {
|
||||
switch(c){
|
||||
case '1': return 1;
|
||||
case '2': return 2;
|
||||
case '3': return 3;
|
||||
case '4': return 4;
|
||||
case '5': return 5;
|
||||
case '6': return 6;
|
||||
case '7': return 7;
|
||||
case '8': return 8;
|
||||
case '9': return 9;
|
||||
default:
|
||||
case '0': return 0;
|
||||
}
|
||||
}
|
||||
|
||||
s32 __FileCmp(const void *a, const void *b)
|
||||
{
|
||||
dirent_t *hdr1 = (dirent_t *)a;
|
||||
dirent_t *hdr2 = (dirent_t *)b;
|
||||
|
||||
if (hdr1->type == hdr2->type)
|
||||
return strcmp(hdr1->name, hdr2->name);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 getdir(char *path, dirent_t **ent, u32 *cnt)
|
||||
{
|
||||
u32 num = 0;
|
||||
|
||||
int i, j, k;
|
||||
|
||||
if(ISFS_ReadDir(path, NULL, &num) != ISFS_OK) return -1;
|
||||
|
||||
|
||||
char *nbuf = (char *)AllocateMemory((ISFS_MAXPATH + 1) * num);
|
||||
char ebuf[ISFS_MAXPATH + 1];
|
||||
|
||||
if(nbuf == NULL) return -2;
|
||||
|
||||
if(ISFS_ReadDir(path, nbuf, &num) != ISFS_OK) return -3;
|
||||
|
||||
*cnt = num;
|
||||
|
||||
*ent = AllocateMemory(sizeof(dirent_t) * num);
|
||||
|
||||
for(i = 0, k = 0; i < num; i++)
|
||||
{
|
||||
for(j = 0; nbuf[k] != 0; j++, k++)
|
||||
ebuf[j] = nbuf[k];
|
||||
ebuf[j] = 0;
|
||||
k++;
|
||||
|
||||
strcpy((*ent)[i].name, ebuf);
|
||||
}
|
||||
|
||||
qsort(*ent, *cnt, sizeof(dirent_t), __FileCmp);
|
||||
|
||||
free(nbuf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
char getSystemMenuRegionFromContent() {
|
||||
s32 cfd;
|
||||
s32 ret;
|
||||
u32 num;
|
||||
dirent_t *list;
|
||||
char contentpath[ISFS_MAXPATH];
|
||||
char path[ISFS_MAXPATH];
|
||||
int i, j;
|
||||
u32 cnt = 0;
|
||||
u8 *buffer;
|
||||
u8 match[] = "C:\\Revolution", match2[] = "Final";
|
||||
char region = 'X';
|
||||
ISFS_Initialize();
|
||||
sprintf(contentpath, "/title/%08x/%08x/content", 1, 2);
|
||||
|
||||
if (getdir(contentpath, &list, &num) < 0) return region;
|
||||
|
||||
fstats filestats;
|
||||
for(cnt=0; region == 'X' && cnt < num; cnt++) {
|
||||
sprintf(path, "/title/%08x/%08x/content/%s", 1, 2, list[cnt].name);
|
||||
|
||||
cfd = ISFS_Open(path, ISFS_OPEN_READ);
|
||||
if (cfd < 0) continue;
|
||||
|
||||
if (ISFS_GetFileStats(cfd, &filestats) < 0) continue;
|
||||
|
||||
buffer=(u8*)AllocateMemory(filestats.file_length);
|
||||
|
||||
ret = ISFS_Read(cfd, buffer, filestats.file_length);
|
||||
ISFS_Close(cfd);
|
||||
if (ret < 0) continue;
|
||||
|
||||
for(i = 0; i < filestats.file_length - 49; i += 1 ) {
|
||||
if(memcmp((buffer+i), match, 13) == 0) {
|
||||
for(j=0; j<30; j++){
|
||||
if( memcmp((buffer+i+j+24), match2, 5) == 0) {
|
||||
region = buffer[i+j+30];
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if(sysVersion == 0.0) {
|
||||
// int first = ctoi(buffer[i+24]);
|
||||
// int second = ctoi(buffer[i+26]);
|
||||
// sysVersion = first + (0.1 * second);
|
||||
//}
|
||||
break;
|
||||
}
|
||||
}
|
||||
free(buffer);
|
||||
}
|
||||
free(list);
|
||||
ISFS_Deinitialize();
|
||||
return sanitizeRegion(region);
|
||||
}
|
||||
|
||||
float GetSysMenuNintendoVersion(u32 sysVersion)
|
||||
{
|
||||
float ninVersion = 0.0;
|
||||
@ -274,7 +142,7 @@ float GetSysMenuNintendoVersion(u32 sysVersion)
|
||||
}
|
||||
|
||||
char GetSysMenuRegion(u32 sysVersion) {
|
||||
char SysMenuRegion;
|
||||
char SysMenuRegion = 'X';
|
||||
switch(sysVersion)
|
||||
{
|
||||
case 1: //Pre-launch
|
||||
@ -335,9 +203,6 @@ char GetSysMenuRegion(u32 sysVersion) {
|
||||
case 518: //4.3K
|
||||
SysMenuRegion = 'K';
|
||||
break;
|
||||
default:
|
||||
SysMenuRegion = getSystemMenuRegionFromContent();
|
||||
break;
|
||||
}
|
||||
return SysMenuRegion;
|
||||
}
|
||||
|
@ -326,6 +326,7 @@ inline s32 RemoveBogusTMD(void)
|
||||
|
||||
|
||||
inline bool CheckIOSType(u32 start_address) {
|
||||
if (AHB_ACCESS == false) return false;
|
||||
const char WL_String[] = {0x57, 0x4C, 0x3A, 0x20, 0x30, 0x32, 0x2F, 0x30, 0x32, 0x2F, 0x31, 0x32};
|
||||
u32 i;
|
||||
for(i = start_address; i < 0x94000000 - sizeof(WL_String); i++) {
|
||||
|
@ -616,12 +616,15 @@ int main(int argc, char **argv)
|
||||
gprintf("// IOS_ReloadIOS(%d)\n", ios[i].titleID);
|
||||
logfile("// IOS_ReloadIOS(%d)\r\n", ios[i].titleID);
|
||||
|
||||
if (SystemInfo.deviceType == CONSOLE_WII_U)
|
||||
IosPatch_FULL(false, false, false, false, ios[i].titleID);
|
||||
else
|
||||
IOS_ReloadIOS(ios[i].titleID);
|
||||
|
||||
// Test IOS type
|
||||
gprintf("// Test IOS type\n");
|
||||
logfile("// Test IOS type\r\n");
|
||||
ios[i].infovIOS = CheckIOSType(IOS_TOP);
|
||||
if(SystemInfo.deviceType == CONSOLE_WII_U) ios[i].infovIOS = CheckIOSType(IOS_TOP);
|
||||
|
||||
// Test fake signature
|
||||
gprintf("// Test fake signature\n");
|
||||
@ -686,8 +689,13 @@ int main(int argc, char **argv)
|
||||
// Reload the running IOS
|
||||
sprintf(MSG_Buffer, MSG_ReloadIOS, runningIOS, runningIOSRevision);
|
||||
printLoading(MSG_Buffer);
|
||||
IosPatch_FULL(false, false, false, false, runningIOS);
|
||||
if (SystemInfo.deviceType == CONSOLE_WII_U) {
|
||||
IosPatch_FULL(false, false, false, false, runningIOS);
|
||||
ios[runningIOS].infovIOS = CheckIOSType(IOS_TOP);
|
||||
} else {
|
||||
IOS_ReloadIOS(ios[i].titleID);
|
||||
}
|
||||
CheckTime(current_time, 500);
|
||||
|
||||
//--Generate Report--
|
||||
|
@ -153,12 +153,12 @@ void formatDate(u32 date, char ReportBuffer[200][100]) {
|
||||
char temp[8] = {0};
|
||||
char day[2] = {0};
|
||||
char month[2] = {0};
|
||||
char year[4] = {0};
|
||||
char year[5] = {0};
|
||||
|
||||
snprintf(temp, sizeof(temp), "%08x", date);
|
||||
sprintf(temp, "%08x", date);
|
||||
snprintf(year, sizeof(year), "%c%c%c%c", temp[0], temp[1], temp[2], temp[3]);
|
||||
snprintf(month, sizeof(month), "%c%c", temp[4], temp[5]);
|
||||
snprintf(day, sizeof(day), "%c%c", temp[6], temp[7]);
|
||||
sprintf(month, "%c%c", temp[4], temp[5]);
|
||||
sprintf(day, "%c%c", temp[6], temp[7]);
|
||||
|
||||
gprintf("MONTH: %s\n", month);
|
||||
gprintf("DAY: %s\n", day);
|
||||
@ -173,10 +173,10 @@ void formatDate(u32 date, char ReportBuffer[200][100]) {
|
||||
case CONF_LANG_GERMAN:
|
||||
case CONF_LANG_ITALIAN:
|
||||
case CONF_LANG_SPANISH:
|
||||
snprintf(result, sizeof(result), "%s.%s.%s", day, month, year);
|
||||
sprintf(result, "%s.%s.%s", day, month, year);
|
||||
break;
|
||||
default:
|
||||
snprintf(result, sizeof(result), "%s.%s.%s", month, day, year); // You don't say "I was born 1990 January 1" The year comes last
|
||||
sprintf(result, "%s.%s.%s", month, day, year); // You don't say "I was born 1990 January 1" The year comes last
|
||||
break;
|
||||
}
|
||||
gprintf("String: %s\n", result);
|
||||
|
Loading…
Reference in New Issue
Block a user