コード例 #1
0
ファイル: Form1.cs プロジェクト: darryl47nopra/Splat-AIO-2
        private void PokeGear(uint baseAddress, Dictionary <uint, uint[]> gear)
        {
            // Sort the Dictionary's keys so that starter gear will appear first
            List <uint> sortedKeys = gear.Keys.ToList();

            sortedKeys.Sort();

            foreach (uint objectId in sortedKeys)
            {
                uint[] abilities = gear[objectId];

                // Poke the memory addresses
                Gecko.poke(baseAddress, objectId);                  // objectId
                Gecko.poke(baseAddress + 0x00000004, 0x00000004);   // level
                Gecko.poke(baseAddress + 0x00000008, 0x00000004);   // slots
                Gecko.poke(baseAddress + 0x0000000C, abilities[0]); // slot 1
                Gecko.poke(baseAddress + 0x00000010, abilities[1]); // slot 2
                Gecko.poke(baseAddress + 0x00000014, abilities[2]); // slot 3
                Gecko.poke(baseAddress + 0x00000024, 0x00000024);   // date
                Gecko.poke(baseAddress + 0x00000028, 0x00010000);   // new flag

                // Move to next gear slot in the inventory
                baseAddress += 0x00000030;

                // debug
                // Console.WriteLine("poked (objectId = " + objectId + ", new baseAddress = " + baseAddress + ")");
            }

            if (sendStats)
            {
                Statistics.WriteToSlot(10, 1);
            }
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Gecko = new TCPGecko(IPBox.Text, 7331);
            try
            {
                Gecko.Connect();
            }
            catch (ETCPGeckoException exc)
            {
                MessageBox.Show("Connection to the TCPGecko failed: \n\n" + exc.Message + "\n\nCheck your network connection/firewall.", "Connection failed", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return;
            }

            Gecko.poke(0x10014cfc, 0x00000001);
            System.Threading.Thread.Sleep(1000);
            if (Gecko.peek(0x10014D00) == 0x00000000)
            {
                /*
                 * MessageBox.Show("register: " + String.Format("{0:x2}", Gecko.peek(0x10014D00)), "info", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 * MessageBox.Show("✘", "fail", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 */
                hasExtendedHandlerInstalled = false;
            }
            else
            {
                /*
                 * MessageBox.Show("register: " + String.Format("{0:x2}", Gecko.peek(0x10014D00)), "info", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 * MessageBox.Show("✓", "good", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 */
                hasExtendedHandlerInstalled = true;
            }
            Gecko.poke(0x10014cfc, 0x00000000);

            Gecko.poke(0x10613EC4, 0x756C6174);
            Gecko.poke(0x10613ED4, 0x68650000);
            Gecko.poke(0x10613F10, 0x63650000);

            groupBox2.Enabled     = true;
            DisconnButton.Enabled = true;
            ConnectButton.Enabled = false;
        }
コード例 #3
0
 void PokeButtonClick(object sender, EventArgs e)
 {
     try
     {
         uint addressConverted = Convert.ToUInt32(addressBox.Text);
         uint valueConverted   = Convert.ToUInt32(valueBox.Text);
         gecko.poke(addressConverted, valueConverted);
     }
     catch (Exception)
     {
         MessageBox.Show("Failed to poke values.");
         return;
     }
 }
コード例 #4
0
ファイル: Form1.cs プロジェクト: BKOOL999/safe_nightpatcher
        private void buttonConnect_Click(object sender, EventArgs e)
        {
            Gecko = new TCPGecko(IPBox.Text, 7331);
            try
            {
                Gecko.Connect();
            }
            catch (ETCPGeckoException)
            {
                MessageBox.Show("Connection to the Gecko client failed!: \n\n" + "\n\nPlease check your network connection/firewall.", "Connection failed", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return;
            }

            //offset difference checker
            uint JRAddr = Gecko.peek(0x106E975C) + 0x92D8;

            if (Gecko.peek(JRAddr) == 0x000003F2)
            {
                diff = JRAddr - 0x12CDADA0;
            }
            else
            {
                MessageBox.Show("The program cannot find the Splattershot Jr. in memory.  It's possible the program doesn't support the version of Gecko you are using.  Please make sure Splatoon is running and try again using a supported version of Gecko. ", "Unsupported Gecko version found!", MessageBoxButtons.OK, MessageBoxIcon.Hand);

                Gecko.Disconnect();
                return;
            }

            Gecko.poke(0x10014cfc, 0x00000001);
            System.Threading.Thread.Sleep(100);

            groupBox2.Enabled     = true;
            groupBox3.Enabled     = true;
            groupBox4.Enabled     = true;
            buttonDisconn.Enabled = true;
            buttonConnect.Enabled = false;
            if (checkBox1.Checked)
            {
                mapCheckerTimer.Start();
            }

            Configuration.currentConfig.lastIp   = IPBox.Text;
            Configuration.currentConfig.AutoPoke = checkBox1.Checked;
            Configuration.Save();
        }
コード例 #5
0
        void PokeValuesButtonClick(object sender, EventArgs e)
        {
            uint converted    = Convert.ToUInt32(addressBox.Text, 32);
            uint convertedTwo = Convert.ToUInt32(valueBox.Text, 32);

            try
            {
                Gecko.poke(converted, convertedTwo);
            }
            catch (ArgumentException)
            {
                MessageBox.Show("Failed to poke values.");
            }
            catch (Exception)
            {
                MessageBox.Show("Failed to poke values.");
            }
        }
コード例 #6
0
ファイル: Form1.cs プロジェクト: BKOOL999/safe_nightpatcher
        private void DeleteObjects()
        {
            bool tmp     = false;
            uint MapData = Gecko.peek(Base);
            uint Object  = Gecko.peek(MapData + 0x00000038);

            if (Gecko.peek(Object + 0x00000030) == 0x442835A8)
            {
                tmp = true;
            }
            else if (Gecko.peek(Gecko.peek(MapData + 0x00000058) + 0x00000030) == 0x442835A8)
            {
                tmp = true;
            }
            else if (Gecko.peek(Gecko.peek(MapData + 0x0000006c) + 0x00000030) == 0x442835A8)
            {
                tmp = true;
            }
            else if (Gecko.peek(Gecko.peek(MapData + 0x00000060) + 0x00000030) == 0x442835A8)
            {
                tmp = true;
            }
            if (Gecko.peek(0x12B4F15C) == 0x00000001 && Gecko.peek(0x10709294) == 0x4B616973 && tmp == true && hammerheadBridgeBox.Checked)
            {
                MapData = Gecko.peek(Base);
                Object  = Gecko.peek(MapData);

                uint Object1;
                uint Object2;
                uint Object3;
                uint Object4;

                if (Gecko.peek(Gecko.peek(MapData + 0x00000038) + 0x00000030) == 0x442835A8)
                {
                    Object1 = Gecko.peek(MapData + 0x00000038);
                    Object2 = Gecko.peek(MapData + 0x0000003c);
                    Object3 = Gecko.peek(MapData + 0x00000040);
                    Object4 = Gecko.peek(MapData + 0x00000044);
                }
                else if (Gecko.peek(Gecko.peek(MapData + 0x00000058) + 0x00000030) == 0x442835A8)
                {
                    Object1 = Gecko.peek(MapData + 0x00000058);
                    Object2 = Gecko.peek(MapData + 0x0000005c);
                    Object3 = Gecko.peek(MapData + 0x00000060);
                    Object4 = Gecko.peek(MapData + 0x00000064);
                }
                else if (Gecko.peek(Gecko.peek(MapData + 0x0000006c) + 0x00000030) == 0x442835A8)
                {
                    Object1 = Gecko.peek(MapData + 0x0000006c);
                    Object2 = Gecko.peek(MapData + 0x00000070);
                    Object3 = Gecko.peek(MapData + 0x00000074);
                    Object4 = Gecko.peek(MapData + 0x00000078);
                }
                else
                {
                    Object1 = Gecko.peek(MapData + 0x00000060);
                    Object2 = Gecko.peek(MapData + 0x00000064);
                    Object3 = Gecko.peek(MapData + 0x00000068);
                    Object4 = Gecko.peek(MapData + 0x0000006c);
                }

                uint Object1_Model = Gecko.peek(Object1 + 0x000001E4);
                uint Object2_Model = Gecko.peek(Object2 + 0x000001E4);
                uint Object3_Model = Gecko.peek(Object3 + 0x000001E4);
                uint Object4_Model = Gecko.peek(Object4 + 0x000001E4);

                System.Threading.Thread.Sleep(100);
                Object1 = Object1 + 0x00000004;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object1 + (i * 0x00000008), 0x00000000);
                }
                Object1 = Object1 + 0x00000010;
                for (uint i = 0; i < 2; i++)
                {
                    Gecko.poke(Object1 + (i * 0x00000004), 0x00000000);
                }

                Object1_Model = Object1_Model + 0x00000054;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object1_Model + (i * 0x00000008), 0x00000000);
                }
                Object1_Model = Object1_Model + 0x00000040;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object1_Model + (i * 0x00000008), 0x00000000);
                }
                Object1_Model = Object1_Model + 0x00000010;
                for (uint i = 0; i < 3; i++)
                {
                    Gecko.poke(Object1_Model + (i * 0x00000004), 0x00000000);
                }

                Object2 = Object2 + 0x00000004;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object2 + (i * 0x00000008), 0x00000000);
                }
                Object2 = Object2 + 0x00000010;
                for (uint i = 0; i < 2; i++)
                {
                    Gecko.poke(Object2 + (i * 0x00000004), 0x00000000);
                }

                Object2_Model = Object2_Model + 0x00000054;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object2_Model + (i * 0x00000008), 0x00000000);
                }
                Object2_Model = Object2_Model + 0x00000040;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object2_Model + (i * 0x00000008), 0x00000000);
                }
                Object2_Model = Object2_Model + 0x00000010;
                for (uint i = 0; i < 3; i++)
                {
                    Gecko.poke(Object2_Model + (i * 0x00000004), 0x00000000);
                }

                Object3 = Object3 + 0x00000004;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object3 + (i * 0x00000008), 0x00000000);
                }
                Object3 = Object3 + 0x00000010;
                for (uint i = 0; i < 2; i++)
                {
                    Gecko.poke(Object3 + (i * 0x00000004), 0x00000000);
                }

                Object3_Model = Object3_Model + 0x00000054;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object3_Model + (i * 0x00000008), 0x00000000);
                }
                Object3_Model = Object3_Model + 0x00000040;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object3_Model + (i * 0x00000008), 0x00000000);
                }
                Object3_Model = Object3_Model + 0x00000010;
                for (uint i = 0; i < 3; i++)
                {
                    Gecko.poke(Object3_Model + (i * 0x00000004), 0x00000000);
                }

                Object4 = Object4 + 0x00000004;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object4 + (i * 0x00000008), 0x00000000);
                }
                Object4 = Object4 + 0x00000010;
                for (uint i = 0; i < 2; i++)
                {
                    Gecko.poke(Object4 + (i * 0x00000004), 0x00000000);
                }

                Object4_Model = Object4_Model + 0x00000054;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object4_Model + (i * 0x00000008), 0x00000000);
                }
                Object4_Model = Object4_Model + 0x00000040;
                for (uint i = 0; i < 5; i++)
                {
                    Gecko.poke(Object4_Model + (i * 0x00000008), 0x00000000);
                }
                Object4_Model = Object4_Model + 0x00000010;
                for (uint i = 0; i < 3; i++)
                {
                    Gecko.poke(Object4_Model + (i * 0x00000004), 0x00000000);
                }
            }
            else
            {
                System.Threading.Thread.Sleep(500);
            }
        }
コード例 #7
0
ファイル: Main.cs プロジェクト: CatRosalina/octoslots
 private void patchOctosfx(int i)
 {
     if (i < 1)
     {
         Gecko.poke(0x105EC6BC, 0x65724374);
         Gecko.poke(0x105EC6C0, 0x726C0000);
     }
     else
     {
         Gecko.poke(0x105EC6BC, 0x65724F74);
         Gecko.poke(0x105EC6C0, 0x68657200);
     }
 }
コード例 #8
0
 void BigInklingButtonClick(object sender, EventArgs e)
 {
     try
     {
         Gecko.poke(0x105EF2B0, 0x3FC00000);
         statusLabel.Text = "Big Inkling hack poked.";
     }
     catch (Exception)
     {
         MessageBox.Show("Failed to poke Big Inkling hack.");
         statusLabel.Text = "Failed to poke Big Inkling hack.";
     }
 }
コード例 #9
0
ファイル: Form1.cs プロジェクト: yahya14/GeckoMapTester
        private void PokeButton_Click(object sender, EventArgs e)
        {
            //disable online
            if (DojoCheckBox.Checked)
            {
                Gecko.poke(0x10613C2C, 0x5F476573);
                Gecko.poke(0x10613C3C, 0x756C6174);
                Gecko.poke(0x10613C4C, 0x68650000);
                Gecko.poke(0x10613C88, 0x63650000);
            }

            try
            {
                PokeAllMaps(((NameWrapper)NameCBox.SelectedItem).dataName);
            }
            catch (NullReferenceException)
            {
                PokeAllMaps(NameCBox.Text);
            }

            try
            {
                PokeAllSceneEnvSetNames(((NameWrapper)seCBox.SelectedItem).dataName);
            }
            catch (NullReferenceException)
            {
                PokeAllSceneEnvSetNames(seCBox.Text);
            }

            MessageBox.Show("Success!", "GeckoTool", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
        }
コード例 #10
0
        public void Assemble(UInt32 address, String command)
        {
            if (!File.Exists(GAs))
            {
                MessageBox.Show(GAs + " not found! Cannot assemble!");
                return;
            }

            if (!File.Exists(GLd))
            {
                MessageBox.Show(GLd + " not found! Cannot assemble!");
                return;
            }

            if (!File.Exists(GOc))
            {
                MessageBox.Show(GOc + " not found! Cannot assemble!");
                return;
            }

            command = command.Trim();

            if (isBranch(command))
            {
                if (!extractTargetAddress(address, ref command))
                {
                    MessageBox.Show("Command parsing error!");
                    return;
                }
            }

            StreamWriter sw = new StreamWriter("ass.txt");

            sw.WriteLine(command);
            sw.Close();

            Process proc = new Process();

            proc.StartInfo.WindowStyle           = ProcessWindowStyle.Hidden;
            proc.StartInfo.UseShellExecute       = false;
            proc.StartInfo.FileName              = GAs;
            proc.StartInfo.Arguments             = "-mgekko -mregnames -o ass.o ass.txt";
            proc.StartInfo.CreateNoWindow        = true;
            proc.StartInfo.RedirectStandardError = true;
            proc.Start();
            String output = String.Empty;

            while (!proc.StandardError.EndOfStream)
            {
                output += proc.StandardError.ReadLine() + "\n";
            }
            proc.WaitForExit(/*2000*/);
            int exitCode = proc.ExitCode;

            proc.Close();
            File.Delete("ass.txt");
            if (exitCode != 0 || !File.Exists("ass.o"))
            {
                if (File.Exists("ass.o"))
                {
                    File.Delete("ass.o");
                }
                MessageBox.Show(output);
                return;
            }

            proc = new Process();
            proc.StartInfo.WindowStyle           = ProcessWindowStyle.Hidden;
            proc.StartInfo.UseShellExecute       = false;
            proc.StartInfo.FileName              = GLd;
            proc.StartInfo.Arguments             = " -Ttext 0x80000000 -o ass2.o ass.o";
            proc.StartInfo.CreateNoWindow        = true;
            proc.StartInfo.RedirectStandardError = true;
            proc.Start();
            output = String.Empty;
            while (!proc.StandardError.EndOfStream)
            {
                output += proc.StandardError.ReadLine() + "\n";
            }
            proc.WaitForExit();

            exitCode = proc.ExitCode;
            proc.Close();
            File.Delete("ass.o");
            if (exitCode != 0 || !File.Exists("ass2.o"))
            {
                if (File.Exists("ass2.o"))
                {
                    File.Delete("ass2.o");
                }
                MessageBox.Show(output);
                return;
            }

            proc = new Process();
            proc.StartInfo.WindowStyle           = ProcessWindowStyle.Hidden;
            proc.StartInfo.UseShellExecute       = false;
            proc.StartInfo.FileName              = GOc;
            proc.StartInfo.Arguments             = " -O binary ass2.o ass.bin";
            proc.StartInfo.CreateNoWindow        = true;
            proc.StartInfo.RedirectStandardError = true;
            proc.Start();
            output = String.Empty;
            while (!proc.StandardError.EndOfStream)
            {
                output += proc.StandardError.ReadLine() + "\n";
            }
            proc.WaitForExit();

            exitCode = proc.ExitCode;
            proc.Close();
            File.Delete("ass2.o");
            if (exitCode != 0)
            {
                if (File.Exists("ass.bin"))
                {
                    File.Delete("ass.bin");
                }
                MessageBox.Show(output);
                return;
            }

            UInt32     machineCode;
            FileStream sr = new FileStream("ass.bin", FileMode.Open);

            machineCode = GlobalFunctions.ReadStream(sr);
            sr.Close();
            File.Delete("ass.bin");

            try
            {
                gecko.poke(address, machineCode);

                System.Threading.Thread.Sleep(100);
                DissToBox(address);
            }
            catch (ETCPGeckoException e)
            {
                exceptionHandling.HandleException(e);
            }
        }
コード例 #11
0
        private void writeString(string s, uint offset)
        {
            uint push = 0;
            int  pos  = 0;

            if (offset % 4 != 0)
            {
                push    = s[pos++];
                offset -= offset % 4;
                Gecko.poke(offset, push);
                offset += 4;
            }
            for (; pos < s.Length; pos += 2, offset += 4)
            {
                if (pos + 1 == s.Length)
                {
                    push = (uint)(s[pos] << 16) + (Gecko.peek(offset) & 0xFF);
                }
                push = (uint)(s[pos] << 16) + s[pos + 1];
                Gecko.poke(offset, push);
            }
        }