mirror of
https://github.com/WiiDatabase/nusdownloader.git
synced 2024-11-27 12:44:13 +01:00
Added new fixes to my build changes. hopefully...
This commit is contained in:
parent
44920dc610
commit
1e76a7bfea
7
NUS Downloader/Form1.Designer.cs
generated
7
NUS Downloader/Form1.Designer.cs
generated
@ -314,7 +314,6 @@
|
|||||||
this.databaseStrip.Name = "databaseStrip";
|
this.databaseStrip.Name = "databaseStrip";
|
||||||
this.databaseStrip.ShowItemToolTips = false;
|
this.databaseStrip.ShowItemToolTips = false;
|
||||||
this.databaseStrip.Size = new System.Drawing.Size(164, 170);
|
this.databaseStrip.Size = new System.Drawing.Size(164, 170);
|
||||||
//this.databaseStrip.Opening += new System.ComponentModel.CancelEventHandler(this.databaseStrip_Opening);
|
|
||||||
//
|
//
|
||||||
// SystemMenuList
|
// SystemMenuList
|
||||||
//
|
//
|
||||||
@ -760,9 +759,9 @@
|
|||||||
this.contentModBox.Controls.Add(this.button11);
|
this.contentModBox.Controls.Add(this.button11);
|
||||||
this.contentModBox.Controls.Add(this.button9);
|
this.contentModBox.Controls.Add(this.button9);
|
||||||
this.contentModBox.Controls.Add(this.button10);
|
this.contentModBox.Controls.Add(this.button10);
|
||||||
this.contentModBox.Location = new System.Drawing.Point(278, 434);
|
this.contentModBox.Location = new System.Drawing.Point(265, 146);
|
||||||
this.contentModBox.Name = "contentModBox";
|
this.contentModBox.Name = "contentModBox";
|
||||||
this.contentModBox.Size = new System.Drawing.Size(249, 69);
|
this.contentModBox.Size = new System.Drawing.Size(249, 329);
|
||||||
this.contentModBox.TabIndex = 41;
|
this.contentModBox.TabIndex = 41;
|
||||||
this.contentModBox.TabStop = false;
|
this.contentModBox.TabStop = false;
|
||||||
this.contentModBox.Text = "Edit Title Contents";
|
this.contentModBox.Text = "Edit Title Contents";
|
||||||
@ -1172,7 +1171,6 @@
|
|||||||
this.Controls.Add(this.saveaswadbox);
|
this.Controls.Add(this.saveaswadbox);
|
||||||
this.Controls.Add(this.databaseButton);
|
this.Controls.Add(this.databaseButton);
|
||||||
this.Controls.Add(this.button5);
|
this.Controls.Add(this.button5);
|
||||||
this.Controls.Add(this.contentModBox);
|
|
||||||
this.Controls.Add(this.proxyBox);
|
this.Controls.Add(this.proxyBox);
|
||||||
this.Controls.Add(this.button4);
|
this.Controls.Add(this.button4);
|
||||||
this.Controls.Add(this.wadnamebox);
|
this.Controls.Add(this.wadnamebox);
|
||||||
@ -1185,6 +1183,7 @@
|
|||||||
this.Controls.Add(this.button7);
|
this.Controls.Add(this.button7);
|
||||||
this.Controls.Add(this.radioButton1);
|
this.Controls.Add(this.radioButton1);
|
||||||
this.Controls.Add(this.radioButton2);
|
this.Controls.Add(this.radioButton2);
|
||||||
|
this.Controls.Add(this.contentModBox);
|
||||||
this.Controls.Add(this.packbox);
|
this.Controls.Add(this.packbox);
|
||||||
this.Controls.Add(this.statusbox);
|
this.Controls.Add(this.statusbox);
|
||||||
this.Controls.Add(this.ignoreticket);
|
this.Controls.Add(this.ignoreticket);
|
||||||
|
@ -19,7 +19,7 @@ namespace NUS_Downloader
|
|||||||
const string NUSURL = "http://nus.cdn.shop.wii.com/ccs/download/";
|
const string NUSURL = "http://nus.cdn.shop.wii.com/ccs/download/";
|
||||||
const string DSiNUSURL = "http://nus.cdn.t.shop.nintendowifi.net/ccs/download/";
|
const string DSiNUSURL = "http://nus.cdn.t.shop.nintendowifi.net/ccs/download/";
|
||||||
// TODO: Always remember to change version!
|
// TODO: Always remember to change version!
|
||||||
string version = "v1.4 Beta";
|
string version = "v1.3 Beta";
|
||||||
WebClient generalWC = new WebClient();
|
WebClient generalWC = new WebClient();
|
||||||
static RijndaelManaged rijndaelCipher;
|
static RijndaelManaged rijndaelCipher;
|
||||||
static bool dsidecrypt = false;
|
static bool dsidecrypt = false;
|
||||||
@ -206,6 +206,7 @@ namespace NUS_Downloader
|
|||||||
{
|
{
|
||||||
// Directory stuff
|
// Directory stuff
|
||||||
string currentdir = Application.StartupPath;
|
string currentdir = Application.StartupPath;
|
||||||
|
|
||||||
if (currentdir.EndsWith(Convert.ToString(Path.DirectorySeparatorChar.ToString())) == false)
|
if (currentdir.EndsWith(Convert.ToString(Path.DirectorySeparatorChar.ToString())) == false)
|
||||||
currentdir += Path.DirectorySeparatorChar.ToString();
|
currentdir += Path.DirectorySeparatorChar.ToString();
|
||||||
|
|
||||||
@ -771,6 +772,7 @@ namespace NUS_Downloader
|
|||||||
|
|
||||||
// Current directory...
|
// Current directory...
|
||||||
string currentdir = Application.StartupPath;
|
string currentdir = Application.StartupPath;
|
||||||
|
|
||||||
if (!(currentdir.EndsWith(Path.DirectorySeparatorChar.ToString())) || !(currentdir.EndsWith(Path.AltDirectorySeparatorChar.ToString())))
|
if (!(currentdir.EndsWith(Path.DirectorySeparatorChar.ToString())) || !(currentdir.EndsWith(Path.AltDirectorySeparatorChar.ToString())))
|
||||||
currentdir += Path.DirectorySeparatorChar.ToString();
|
currentdir += Path.DirectorySeparatorChar.ToString();
|
||||||
|
|
||||||
@ -852,6 +854,7 @@ namespace NUS_Downloader
|
|||||||
dlprogress.Value = 50;
|
dlprogress.Value = 50;
|
||||||
|
|
||||||
// Download CETK after tmd...
|
// Download CETK after tmd...
|
||||||
|
bool ticket_exists = true;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DownloadNUSFile(titleid, "cetk", titledirectory, 0, wiimode);
|
DownloadNUSFile(titleid, "cetk", titledirectory, 0, wiimode);
|
||||||
@ -874,16 +877,21 @@ namespace NUS_Downloader
|
|||||||
WriteStatus("Ticket not found! Continuing, however WAD packing and decryption are not possible!");
|
WriteStatus("Ticket not found! Continuing, however WAD packing and decryption are not possible!");
|
||||||
packbox.Checked = false;
|
packbox.Checked = false;
|
||||||
decryptbox.Checked = false;
|
decryptbox.Checked = false;
|
||||||
|
ticket_exists = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
downloadstartbtn.Text = "Prerequisites: (2/2)";
|
downloadstartbtn.Text = "Prerequisites: (2/2)";
|
||||||
dlprogress.Value = 100;
|
dlprogress.Value = 100;
|
||||||
|
|
||||||
|
byte[] cetkbuf = new byte[0];
|
||||||
|
byte[] titlekey = new byte[0];
|
||||||
|
if (ticket_exists)
|
||||||
|
{
|
||||||
// Create ticket file holder
|
// Create ticket file holder
|
||||||
byte[] cetkbuf = FileLocationToByteArray(titledirectory + Path.DirectorySeparatorChar.ToString() + @"cetk");
|
cetkbuf = FileLocationToByteArray(titledirectory + Path.DirectorySeparatorChar.ToString() + @"cetk");
|
||||||
|
|
||||||
// Obtain TitleKey
|
// Obtain TitleKey
|
||||||
byte[] titlekey = new byte[16];
|
titlekey = new byte[16];
|
||||||
if (decryptbox.Checked == true)
|
if (decryptbox.Checked == true)
|
||||||
{
|
{
|
||||||
// Load TitleKey into it's byte[]
|
// Load TitleKey into it's byte[]
|
||||||
@ -925,10 +933,13 @@ namespace NUS_Downloader
|
|||||||
WriteStatus("Title Key: " + DisplayBytes(Decrypt(titlekey), ""));
|
WriteStatus("Title Key: " + DisplayBytes(Decrypt(titlekey), ""));
|
||||||
titlekey = Decrypt(titlekey);
|
titlekey = Decrypt(titlekey);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Read the tmd as a stream...
|
// Read the tmd as a stream...
|
||||||
byte[] tmd = FileLocationToByteArray(titledirectory + tmdfull);
|
byte[] tmd = FileLocationToByteArray(titledirectory + tmdfull);
|
||||||
|
|
||||||
|
if (ticket_exists == true)
|
||||||
|
{
|
||||||
// Locate Certs **************************************
|
// Locate Certs **************************************
|
||||||
if (!(CertsValid()))
|
if (!(CertsValid()))
|
||||||
{
|
{
|
||||||
@ -939,6 +950,7 @@ namespace NUS_Downloader
|
|||||||
else
|
else
|
||||||
WriteStatus("Using cached certs...");
|
WriteStatus("Using cached certs...");
|
||||||
// /Locate Cert **************************************
|
// /Locate Cert **************************************
|
||||||
|
}
|
||||||
|
|
||||||
// Read Title Version...
|
// Read Title Version...
|
||||||
string tmdversion = "";
|
string tmdversion = "";
|
||||||
@ -953,12 +965,11 @@ namespace NUS_Downloader
|
|||||||
if (sysversion != "0")
|
if (sysversion != "0")
|
||||||
WriteStatus("Requires: IOS" + sysversion);
|
WriteStatus("Requires: IOS" + sysversion);
|
||||||
|
|
||||||
// Renaming would be ideal, but gives too many errors...
|
// Renaming would be ideal, but gives too many permission errors...
|
||||||
/*if ((currentdir + titleid + "v" + titleversion.Text + Path.DirectorySeparatorChar.ToString()) != titledirectory)
|
/*if ((currentdir + titleid + "v" + titleversion.Text + Path.DirectorySeparatorChar.ToString()) != titledirectory)
|
||||||
{
|
{
|
||||||
Directory.Move(titledirectory, currentdir + titleid + "v" + titleversion.Text + Path.DirectorySeparatorChar.ToString());
|
Directory.Move(titledirectory, currentdir + titleid + "v" + titleversion.Text + Path.DirectorySeparatorChar.ToString());
|
||||||
titledirectory = currentdir + titleid + "v" + titleversion.Text + Path.DirectorySeparatorChar.ToString();
|
titledirectory = currentdir + titleid + "v" + titleversion.Text + Path.DirectorySeparatorChar.ToString();
|
||||||
DirectoryInfo di = new DirectoryInfo(titledirectory);
|
|
||||||
} */
|
} */
|
||||||
|
|
||||||
// Read Content #...
|
// Read Content #...
|
||||||
@ -3467,6 +3478,12 @@ namespace NUS_Downloader
|
|||||||
File.Delete("database.xml");
|
File.Delete("database.xml");
|
||||||
File.WriteAllText("database.xml", database);
|
File.WriteAllText("database.xml", database);
|
||||||
|
|
||||||
|
// Load it up...
|
||||||
|
ClearDatabaseStrip();
|
||||||
|
FillDatabaseStrip();
|
||||||
|
LoadRegionCodes();
|
||||||
|
ShowInnerToolTips(false);
|
||||||
|
|
||||||
WriteStatus("Database successfully updated!");
|
WriteStatus("Database successfully updated!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3637,7 +3654,7 @@ namespace NUS_Downloader
|
|||||||
if (!(Directory.Exists(currentdir + "scripts")))
|
if (!(Directory.Exists(currentdir + "scripts")))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(currentdir + "scripts");
|
Directory.CreateDirectory(currentdir + "scripts");
|
||||||
WriteStatus(" - Created 'scrips\' directory.");
|
WriteStatus(" - Created 'scripts\' directory.");
|
||||||
}
|
}
|
||||||
string time = RemoveIllegalCharacters(DateTime.Now.ToShortTimeString());
|
string time = RemoveIllegalCharacters(DateTime.Now.ToShortTimeString());
|
||||||
File.WriteAllText(String.Format(currentdir + "scripts\\{0}_Update_{1}_{2}_{3} {4}.nus", RegionID, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Year, time), script_text);
|
File.WriteAllText(String.Format(currentdir + "scripts\\{0}_Update_{1}_{2}_{3} {4}.nus", RegionID, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Year, time), script_text);
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<UpdatePeriodically>false</UpdatePeriodically>
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
<UpdateRequired>false</UpdateRequired>
|
<UpdateRequired>false</UpdateRequired>
|
||||||
<MapFileExtensions>true</MapFileExtensions>
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
<ApplicationRevision>10</ApplicationRevision>
|
<ApplicationRevision>11</ApplicationRevision>
|
||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
@ -6,6 +6,18 @@ namespace NUS_Downloader
|
|||||||
{
|
{
|
||||||
class TMD
|
class TMD
|
||||||
{
|
{
|
||||||
|
// TMD Variables
|
||||||
|
public byte[] SignatureType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Signature Types
|
||||||
|
public enum SigTypes : byte[]
|
||||||
|
{
|
||||||
|
RSA_2048 = new byte[4] {0x00, 0x01, 0x00, 0x01},
|
||||||
|
RSA_4048 = new byte[4] {0x00, 0x01, 0x00, 0x01}
|
||||||
|
} */
|
||||||
/*
|
/*
|
||||||
* Title metadata is a format used to store information about a title (a single standalone game, channel, etc.) and all its installed contents, including which contents they consist of and their SHA1 hashes.
|
* Title metadata is a format used to store information about a title (a single standalone game, channel, etc.) and all its installed contents, including which contents they consist of and their SHA1 hashes.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user