Пример #1
0
 private void textBoxCommonKey_TextChanged(object sender, EventArgs e)
 {
     if (NusContent.LoadKey(textBoxCommonKey.Text))
     {
         textBoxCommonKey.Text         = "";
         textBoxCommonKey.Enabled      = false;
         panelValidKey.BackgroundImage = Properties.Resources.checkmark_16;
     }
     else
     {
         textBoxCommonKey.Enabled      = true;
         panelValidKey.BackgroundImage = Properties.Resources.x_mark_16;
     }
 }
Пример #2
0
        public void Run(string[] args)
        {
            Cll.Log.WriteLine("64Inject " + _64Injector.Release + " - by phacox.cll");
            Cll.Log.WriteLine("");

            if (NusContent.GetJavaVersion() == null)
            {
                Cll.Log.WriteLine("Warning! Apparently the system does not have Java installed!");
                Cll.Log.WriteLine("Java is needed to NUSPacker (encrypt) and JNUSTool (decrypt).");
                Cll.Log.WriteLine("");
            }
            else
            {
                if (!File.Exists("resources\\nuspacker\\NUSPacker.jar"))
                {
                    Cll.Log.WriteLine("Warning! \"resources\\nuspacker\\NUSPacker.jar\" not found!");
                    Cll.Log.WriteLine("NUSPacker allows you to encrypt the result for WUPInstaller.");
                    Cll.Log.WriteLine("");
                }
                if (!File.Exists("resources\\jnustool\\JNUSTool.jar"))
                {
                    Cll.Log.WriteLine("Warning! \"resources\\jnustool\\JNUSTool.jar\" not found!");
                    Cll.Log.WriteLine("JNUSTool allows you to decrypt Wii U VC games to use as a base.");
                    Cll.Log.WriteLine("");
                }
            }

            if (NusContent.CheckCommonKeyFiles())
            {
                Cll.Log.WriteLine("Common Key found successfully.");
            }
            else
            {
                Cll.Log.WriteLine("Common Key not found. Use load-key option.");
            }

            if (injector.BaseIsLoaded)
            {
                Cll.Log.WriteLine("Base loaded: " + injector.LoadedBase);
            }
            else
            {
                Cll.Log.WriteLine("Base not found. Use load-base option or specify one using the -base option.");
            }
            Cll.Log.WriteLine("");

            if (args.Length == 0)
            {
                ConsoleHelp();
            }
            else if (args.Length == 1 && args[0] == "help")
            {
                ConsoleHelp();
            }
            else if (args.Length == 2 && args[0] == "load-key")
            {
                Cll.Log.WriteLine("load-key: " + args[1]);

                if (NusContent.LoadKey(args[1]))
                {
                    Cll.Log.WriteLine("Common Key loaded successfully.");
                }
                else
                {
                    Cll.Log.WriteLine("The load of the key failed. Is a valid Common Key?");
                }
            }
            else if (args.Length == 2 && args[0] == "load-base")
            {
                Cll.Log.WriteLine("load-base: " + args[1]);
                Cll.Log.WriteLine("Loading base, please wait...");

                if (injector.LoadBase(args[1]))
                {
                    Cll.Log.WriteLine("Base loaded: " + injector.LoadedBase);
                }
                else
                {
                    Cll.Log.WriteLine("The base was not loaded correctly.");
                }
            }
            else if (args.Length >= 1 && args[0] == "create-image")
            {
                if (CreateImage(args))
                {
                    Cll.Log.WriteLine("Image created.");
                }
                else
                {
                    Cll.Log.WriteLine("Image not created.");
                }
            }
            else if (args.Length >= 1 && args[0] == "create-icon")
            {
                if (CreateIcon(args))
                {
                    Cll.Log.WriteLine("Icon created.");
                }
                else
                {
                    Cll.Log.WriteLine("Icon not created.");
                }
            }
            else if ((args.Length == 3 || args.Length == 5) &&
                     (args[0] == "pack" || args[0] == "unpack"))
            {
                PackUnpack(args);
            }
            else
            {
                bool _continue = LoadArgs(args);

                if (_continue)
                {
                    _continue = ValidArgs();
                }

                if (_continue)
                {
                    Inject();
                }
            }
            Cll.Log.WriteLine("Close.");
            Cll.Log.WriteLine("----------------------------------------------------------------");
        }