Merge pull request #25 from garoxas/masterkey

fallback if MasterKey revision not supported by hactool
This commit is contained in:
StudentBlake 2018-09-26 17:04:41 -04:00 committed by GitHub
commit 3c5284c7ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -501,7 +501,14 @@ namespace XCI_Explorer {
TB_SDKVer.Text = strArray[1].Trim();
}
else if (strArray[0] == "Master Key Revision") {
TB_MKeyRev.Text = "MasterKey" + strArray[1].Trim();
string MasterKey = strArray[1].Trim();
if (MasterKey.Contains("Unknown")) {
int keyblob;
if (int.TryParse(new string(MasterKey.TakeWhile(Char.IsDigit).ToArray()), out keyblob)) {
MasterKey = Util.GetMkey((byte)(keyblob + 1)).Replace("MasterKey", "");
}
}
TB_MKeyRev.Text = "MasterKey" + MasterKey;
break;
}
}

View file

@ -33,9 +33,9 @@ namespace XCI_Explorer {
case 4:
return "MasterKey3 (4.0.0-4.1.0)";
case 5:
return "MasterKey4 (5.0.0+)";
return "MasterKey4 (5.0.0-5.1.0)";
case 6:
return "MasterKey5 (?)";
return "MasterKey5 (6.0.0)";
case 7:
return "MasterKey6 (?)";
case 8: