mirror of
https://github.com/StudentBlake/XCI-Explorer
synced 2024-11-22 12:13:03 +00:00
Changed to target .NET 4.8, bumped version number, fixed lingering temp files
This commit is contained in:
parent
7de76c8b39
commit
24fab83cd4
4 changed files with 35 additions and 32 deletions
|
@ -11,9 +11,9 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("XCI Explorer")]
|
[assembly: AssemblyProduct("XCI Explorer")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
[assembly: Guid("206c6c47-87b1-477f-b6e6-f7e7c1a92f8f")]
|
[assembly: Guid("206c6c47-87b1-477f-b6e6-f7e7c1a92f8f")]
|
||||||
[assembly: AssemblyFileVersion("1.4.9")]
|
[assembly: AssemblyFileVersion("1.5.0")]
|
||||||
[assembly: AssemblyVersion("1.4.9")]
|
[assembly: AssemblyVersion("1.5.0")]
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<AssemblyName>XCI-Explorer</AssemblyName>
|
<AssemblyName>XCI-Explorer</AssemblyName>
|
||||||
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
|
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
|
||||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace XCI_Explorer
|
||||||
{
|
{
|
||||||
using (var client = new WebClient())
|
using (var client = new WebClient())
|
||||||
{
|
{
|
||||||
client.DownloadFile(Util.Base64Decode("aHR0cHM6Ly9wYXN0ZWJpbi5jb20vcmF3L3dZbUxUTkxx"), "keys.txt");
|
client.DownloadFile(Util.Base64Decode("aHR0cHM6Ly9wYXN0ZWJpbi5jb20vcmF3L2NWR3JQSHp6"), "keys.txt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ namespace XCI_Explorer
|
||||||
where x.Length > 1
|
where x.Length > 1
|
||||||
select x).ToDictionary((string[] x) => x[0].Trim(), (string[] x) => x[1]);
|
select x).ToDictionary((string[] x) => x[0].Trim(), (string[] x) => x[1]);
|
||||||
Mkey = "master_key_";
|
Mkey = "master_key_";
|
||||||
string MkeyL = "master_key_";
|
string MkeyL = "master_key_";
|
||||||
if (NCA.NCA_Headers[0].MasterKeyRev == 0 || NCA.NCA_Headers[0].MasterKeyRev == 1)
|
if (NCA.NCA_Headers[0].MasterKeyRev == 0 || NCA.NCA_Headers[0].MasterKeyRev == 1)
|
||||||
{
|
{
|
||||||
Mkey += "00";
|
Mkey += "00";
|
||||||
|
@ -134,7 +134,7 @@ namespace XCI_Explorer
|
||||||
int num = NCA.NCA_Headers[0].MasterKeyRev - 1;
|
int num = NCA.NCA_Headers[0].MasterKeyRev - 1;
|
||||||
string capchar = num.ToString("X");
|
string capchar = num.ToString("X");
|
||||||
string lowchar = capchar.ToLower();
|
string lowchar = capchar.ToLower();
|
||||||
Mkey = Mkey + "0" + capchar;
|
Mkey = Mkey + "0" + capchar;
|
||||||
MkeyL = MkeyL + "0" + lowchar;
|
MkeyL = MkeyL + "0" + lowchar;
|
||||||
}
|
}
|
||||||
else if (NCA.NCA_Headers[0].MasterKeyRev >= 17)
|
else if (NCA.NCA_Headers[0].MasterKeyRev >= 17)
|
||||||
|
@ -203,7 +203,7 @@ namespace XCI_Explorer
|
||||||
MessageBox.Show("File is corrupt or unsupported.");
|
MessageBox.Show("File is corrupt or unsupported.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Error: " + e.ToString() + "\nFile is corrupt or unsupported.");
|
MessageBox.Show("Error: " + e.ToString() + "\nFile is corrupt or unsupported.");
|
||||||
}
|
}
|
||||||
|
@ -649,7 +649,7 @@ namespace XCI_Explorer
|
||||||
else if (strArray[0] == "Master Key Revision")
|
else if (strArray[0] == "Master Key Revision")
|
||||||
{
|
{
|
||||||
string MasterKey = strArray[1].Trim();
|
string MasterKey = strArray[1].Trim();
|
||||||
int keyblob;
|
int keyblob;
|
||||||
|
|
||||||
if (MasterKey.Contains("Unknown"))
|
if (MasterKey.Contains("Unknown"))
|
||||||
{
|
{
|
||||||
|
@ -657,15 +657,15 @@ namespace XCI_Explorer
|
||||||
{
|
{
|
||||||
MasterKey = Util.GetMkey((byte)(keyblob + 1)).Replace("MasterKey", "");
|
MasterKey = Util.GetMkey((byte)(keyblob + 1)).Replace("MasterKey", "");
|
||||||
}
|
}
|
||||||
TB_MKeyRev.Text = "MasterKey" + MasterKey;
|
TB_MKeyRev.Text = "MasterKey" + MasterKey;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MasterKey = MasterKey.Split(new char[2] { 'x', ' ' })[1];
|
||||||
|
keyblob = Convert.ToInt32(MasterKey, 16);
|
||||||
|
MasterKey = Util.GetMkey((byte)(keyblob + 1));
|
||||||
|
TB_MKeyRev.Text = MasterKey;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
MasterKey = MasterKey.Split(new char[2] {'x',' '})[1];
|
|
||||||
keyblob = Convert.ToInt32(MasterKey, 16);
|
|
||||||
MasterKey = Util.GetMkey((byte)(keyblob+1));
|
|
||||||
TB_MKeyRev.Text = MasterKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -674,10 +674,19 @@ namespace XCI_Explorer
|
||||||
process.Close();
|
process.Close();
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
if (Directory.Exists("tmp"))
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File.Delete("meta");
|
||||||
|
Directory.Delete("data", true);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Directory.Delete("tmp", true);
|
Directory.Delete("tmp", true);
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
TB_Capacity.Text = "eShop";
|
TB_Capacity.Text = "eShop";
|
||||||
|
|
||||||
|
@ -708,15 +717,12 @@ namespace XCI_Explorer
|
||||||
|
|
||||||
if (SecureName[si].EndsWith(".cnmt.nca"))
|
if (SecureName[si].EndsWith(".cnmt.nca"))
|
||||||
{
|
{
|
||||||
if (File.Exists("meta"))
|
try
|
||||||
{
|
{
|
||||||
File.Delete("meta");
|
File.Delete("meta");
|
||||||
}
|
|
||||||
|
|
||||||
if (Directory.Exists("data"))
|
|
||||||
{
|
|
||||||
Directory.Delete("data", true);
|
Directory.Delete("data", true);
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
using (FileStream fileStream2 = File.OpenWrite("meta"))
|
using (FileStream fileStream2 = File.OpenWrite("meta"))
|
||||||
{
|
{
|
||||||
|
@ -779,15 +785,12 @@ namespace XCI_Explorer
|
||||||
|
|
||||||
if (ncaTarget.Contains(SecureName[si]))
|
if (ncaTarget.Contains(SecureName[si]))
|
||||||
{
|
{
|
||||||
if (File.Exists("meta"))
|
try
|
||||||
{
|
{
|
||||||
File.Delete("meta");
|
File.Delete("meta");
|
||||||
}
|
|
||||||
|
|
||||||
if (Directory.Exists("data"))
|
|
||||||
{
|
|
||||||
Directory.Delete("data", true);
|
Directory.Delete("data", true);
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
using (FileStream fileStream2 = File.OpenWrite("meta"))
|
using (FileStream fileStream2 = File.OpenWrite("meta"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||||
|
|
Loading…
Reference in a new issue