mirror of
https://github.com/WiiDatabase/nusdownloader.git
synced 2024-11-27 12:44:13 +01:00
- Added header to NusClient.cs (because I can)
- Changed Form1.cs and Form1.Designer.cs to no longer refer to downloading the common key - Compiled in the common key
This commit is contained in:
parent
1738d8fab5
commit
00ab317c70
18
NUS Downloader/Form1.Designer.cs
generated
18
NUS Downloader/Form1.Designer.cs
generated
@ -63,9 +63,9 @@
|
|||||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.proxySettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.proxySettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.getCommonKeyMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
//this.getCommonKeyMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.commonKeykeybinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
//this.commonKeykeybinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.koreanKeykkeybinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
//this.koreanKeykkeybinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.aboutNUSDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.aboutNUSDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.proxyBox = new System.Windows.Forms.GroupBox();
|
this.proxyBox = new System.Windows.Forms.GroupBox();
|
||||||
@ -339,7 +339,7 @@
|
|||||||
this.toolStripSeparator3,
|
this.toolStripSeparator3,
|
||||||
this.proxySettingsToolStripMenuItem,
|
this.proxySettingsToolStripMenuItem,
|
||||||
this.toolStripSeparator6,
|
this.toolStripSeparator6,
|
||||||
this.getCommonKeyMenuItem,
|
//this.getCommonKeyMenuItem,
|
||||||
this.toolStripSeparator5,
|
this.toolStripSeparator5,
|
||||||
this.aboutNUSDToolStripMenuItem});
|
this.aboutNUSDToolStripMenuItem});
|
||||||
this.extrasStrip.Name = "extrasStrip";
|
this.extrasStrip.Name = "extrasStrip";
|
||||||
@ -373,7 +373,7 @@
|
|||||||
//
|
//
|
||||||
// getCommonKeyMenuItem
|
// getCommonKeyMenuItem
|
||||||
//
|
//
|
||||||
this.getCommonKeyMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
/*this.getCommonKeyMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.commonKeykeybinToolStripMenuItem,
|
this.commonKeykeybinToolStripMenuItem,
|
||||||
this.koreanKeykkeybinToolStripMenuItem});
|
this.koreanKeykkeybinToolStripMenuItem});
|
||||||
this.getCommonKeyMenuItem.Image = global::NUS_Downloader.Properties.Resources.key;
|
this.getCommonKeyMenuItem.Image = global::NUS_Downloader.Properties.Resources.key;
|
||||||
@ -393,7 +393,7 @@
|
|||||||
this.koreanKeykkeybinToolStripMenuItem.Name = "koreanKeykkeybinToolStripMenuItem";
|
this.koreanKeykkeybinToolStripMenuItem.Name = "koreanKeykkeybinToolStripMenuItem";
|
||||||
this.koreanKeykkeybinToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
this.koreanKeykkeybinToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||||
this.koreanKeykkeybinToolStripMenuItem.Text = "Korean Key (kkey.bin)";
|
this.koreanKeykkeybinToolStripMenuItem.Text = "Korean Key (kkey.bin)";
|
||||||
this.koreanKeykkeybinToolStripMenuItem.Click += new System.EventHandler(this.koreanKeykkeybinToolStripMenuItem_Click);
|
this.koreanKeykkeybinToolStripMenuItem.Click += new System.EventHandler(this.koreanKeykkeybinToolStripMenuItem_Click);*/
|
||||||
//
|
//
|
||||||
// toolStripSeparator5
|
// toolStripSeparator5
|
||||||
//
|
//
|
||||||
@ -893,11 +893,11 @@
|
|||||||
private System.Windows.Forms.TextBox ProxyPwdBox;
|
private System.Windows.Forms.TextBox ProxyPwdBox;
|
||||||
private wyDay.Controls.Windows7ProgressBar dlprogress;
|
private wyDay.Controls.Windows7ProgressBar dlprogress;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
|
||||||
private System.Windows.Forms.ToolStripMenuItem getCommonKeyMenuItem;
|
//private System.Windows.Forms.ToolStripMenuItem getCommonKeyMenuItem;
|
||||||
private System.Windows.Forms.ContextMenuStrip C64MenuListDrop;
|
private System.Windows.Forms.ContextMenuStrip C64MenuListDrop;
|
||||||
private System.Windows.Forms.ComboBox consoleCBox;
|
private System.Windows.Forms.ComboBox consoleCBox;
|
||||||
private System.Windows.Forms.ToolStripMenuItem commonKeykeybinToolStripMenuItem;
|
//private System.Windows.Forms.ToolStripMenuItem commonKeykeybinToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem koreanKeykkeybinToolStripMenuItem;
|
//private System.Windows.Forms.ToolStripMenuItem koreanKeykkeybinToolStripMenuItem;
|
||||||
private wmgCMS.WaterMarkTextBox titleidbox;
|
private wmgCMS.WaterMarkTextBox titleidbox;
|
||||||
private wmgCMS.WaterMarkTextBox titleversion;
|
private wmgCMS.WaterMarkTextBox titleversion;
|
||||||
private System.Windows.Forms.Button scriptsbutton;
|
private System.Windows.Forms.Button scriptsbutton;
|
||||||
|
@ -115,16 +115,14 @@ namespace NUS_Downloader
|
|||||||
private BackgroundWorker scriptsWorker;
|
private BackgroundWorker scriptsWorker;
|
||||||
|
|
||||||
// Common Key hash
|
// Common Key hash
|
||||||
private byte[] wii_commonkey_sha1 = new byte[20]
|
private static byte[] wii_commonkey = new byte[16]
|
||||||
{
|
{
|
||||||
0xEB, 0xEA, 0xE6, 0xD2, 0x76, 0x2D, 0x4D, 0x3E, 0xA1, 0x60, 0xA6, 0xD8,
|
0xeb, 0xe4, 0x2a, 0x22, 0x5e, 0x85, 0x93, 0xe4, 0x48, 0xd9, 0xc5, 0x45, 0x73, 0x81, 0xaa, 0xf7
|
||||||
0x32, 0x7F, 0xAC, 0x9A, 0x25, 0xF8, 0x06, 0x2B
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private byte[] wii_commonkey_sha1_asstring = new byte[20]
|
private static byte[] wii_commonkey_kor = new byte[16]
|
||||||
{
|
{
|
||||||
0x56, 0xdd, 0x4e, 0xb3, 0x59, 0x75, 0xc2, 0xfd, 0x5a, 0xe8,
|
0x63, 0xb8, 0x2b, 0xb4, 0xf4, 0x61, 0x4e, 0x2e, 0x13, 0xf2, 0xfe, 0xfb, 0xba, 0x4c, 0x9b, 0x7e
|
||||||
0xba, 0x8c, 0x7d, 0x89, 0x9a, 0xc5, 0xe6, 0x17, 0x54, 0x19
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -229,7 +227,7 @@ namespace NUS_Downloader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for Wii common key bin file...
|
// Check for Wii common key bin file...
|
||||||
if (NUSDFileExists("key.bin") == false)
|
/*if (NUSDFileExists("key.bin") == false)
|
||||||
{
|
{
|
||||||
WriteStatus("Common Key (key.bin) missing! Decryption disabled!");
|
WriteStatus("Common Key (key.bin) missing! Decryption disabled!");
|
||||||
WriteStatus(" - Try: Extras -> Retrieve Key -> Common Key");
|
WriteStatus(" - Try: Extras -> Retrieve Key -> Common Key");
|
||||||
@ -258,11 +256,13 @@ namespace NUS_Downloader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check for Wii KOR common key bin file...
|
// Check for Wii KOR common key bin file...
|
||||||
if (NUSDFileExists("kkey.bin") == true)
|
if (NUSDFileExists("kkey.bin") == true)
|
||||||
{
|
{
|
||||||
WriteStatus("Korean Common Key detected.");
|
WriteStatus("Korean Common Key detected.");
|
||||||
}
|
}*/
|
||||||
|
WriteStatus("Common keys are compiled in, key.bin/kkey.bin not read.");
|
||||||
|
|
||||||
// Check for DSi common key bin file...
|
// Check for DSi common key bin file...
|
||||||
if (NUSDFileExists("dsikey.bin") == true)
|
if (NUSDFileExists("dsikey.bin") == true)
|
||||||
@ -1531,6 +1531,14 @@ namespace NUS_Downloader
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public byte[] LoadCommonKey(string keyfile)
|
public byte[] LoadCommonKey(string keyfile)
|
||||||
{
|
{
|
||||||
|
if (keyfile == "key.bin")
|
||||||
|
{
|
||||||
|
return wii_commonkey;
|
||||||
|
}
|
||||||
|
else if (keyfile == "kkey.bin")
|
||||||
|
{
|
||||||
|
return wii_commonkey_kor;
|
||||||
|
}
|
||||||
if (File.Exists(Path.Combine(CURRENT_DIR, keyfile)) == true)
|
if (File.Exists(Path.Combine(CURRENT_DIR, keyfile)) == true)
|
||||||
{
|
{
|
||||||
// Read common key byte[]
|
// Read common key byte[]
|
||||||
@ -3070,7 +3078,7 @@ namespace NUS_Downloader
|
|||||||
return Bytes;
|
return Bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void commonKeykeybinToolStripMenuItem_Click(object sender, EventArgs e)
|
/*private void commonKeykeybinToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
BackgroundWorker keyFetcher = new BackgroundWorker();
|
BackgroundWorker keyFetcher = new BackgroundWorker();
|
||||||
keyFetcher.DoWork += new DoWorkEventHandler(RetrieveCommonKey);
|
keyFetcher.DoWork += new DoWorkEventHandler(RetrieveCommonKey);
|
||||||
@ -3129,7 +3137,7 @@ namespace NUS_Downloader
|
|||||||
byte[] commonkey = HexStringToByteArray(htmlwithkey);
|
byte[] commonkey = HexStringToByteArray(htmlwithkey);
|
||||||
WriteCommonKey("kkey.bin", commonkey);
|
WriteCommonKey("kkey.bin", commonkey);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
string CombinePaths(params string[] parts)
|
string CombinePaths(params string[] parts)
|
||||||
{
|
{
|
||||||
|
@ -15,6 +15,17 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Further modifications have been made for the purposes of NUS Downloader.
|
||||||
|
* See SVN changelog for further details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
///////////////////////////////////////
|
||||||
|
// NUS Downloader: NusClient.cs //
|
||||||
|
// $Rev:: $ //
|
||||||
|
// $Author:: $ //
|
||||||
|
// $Date:: $ //
|
||||||
|
///////////////////////////////////////
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
Loading…
Reference in New Issue
Block a user