fallback if MasterKey revision not supported by hactool

This commit is contained in:
Garoxas 2018-09-21 11:14:52 +07:00
parent ad13a76d50
commit a9ae8163d3
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: