예제 #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (floater)
     {
         float num = float.Parse(txtValue.Text);
         txtValue.Text = (num - 0.01f).ToString();
     }
     else
     {
         int num2 = int.Parse(txtValue.Text);
         txtValue.Text = (num2 - 1).ToString();
     }
     if (AppSettings.Settings.IP_and_XDK_Name != "")
     {
         try
         {
             XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
             communicator.Connect();
             XboxMemoryStream stream = communicator.ReturnXboxMemoryStream();
             communicator.Disconnect();
             HaloReach3d.IO.EndianIO iO = new HaloReach3d.IO.EndianIO(stream, HaloReach3d.IO.EndianType.BigEndian);
             iO.Open();
             PokeValue(iO);
             iO.Close();
             stream.Close();
         }
         catch
         {
         }
     }
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (base.Enabled)
     {
         if (txtArrayBox.Text.Length != txtArrayBox.MaxLength)
         {
             OutputMessenger.OutputMessage("Data array \"" + ValueData.Name + "\" could not be saved due to an invalid length of bytes.", this);
         }
         try
         {
             if (AppSettings.Settings.IP_and_XDK_Name == "")
             {
                 MessageBox.Show("XDK Name/IP not set");
             }
             else
             {
                 XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
                 if (!communicator.Connected)
                 {
                     try
                     {
                         communicator.Connect();
                     }
                     catch
                     {
                     }
                 }
                 XboxMemoryStream        stream = communicator.ReturnXboxMemoryStream();
                 HaloReach3d.IO.EndianIO nio    = new HaloReach3d.IO.EndianIO(stream, HaloReach3d.IO.EndianType.BigEndian);
                 nio.Open();
                 nio.Out.BaseStream.Position = ValueData.Pointer + HMap.Map_Header.mapMagic;
                 try
                 {
                     nio.Out.Write(ExtraFunctions.HexStringToBytes(txtArrayBox.Text), 0, txtArrayBox.Text.Length / 2);
                 }
                 catch
                 {
                     OutputMessenger.OutputMessage("Some invalid byte characters were intered in data array \"" + ValueData.Name + "\".\n They will not be saved.", this);
                     return;
                 }
                 nio.Close();
                 stream.Close();
                 communicator.Disconnect();
                 OutputMessenger.OutputMessage("Poked Chunk Values", this);
             }
         }
         catch
         {
             OutputMessenger.OutputMessage("Couldn't Poke Chunks", this);
         }
     }
 }
예제 #3
0
 public void streampoke(uint offset, string poketype, string ammount)
 {
     if (AppSettings.Settings.IP_and_XDK_Name == "")
     {
         MessageBox.Show("XDK Name/IP not set");
     }
     else
     {
         XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
         communicator.Connect();
         XboxMemoryStream        stream = communicator.ReturnXboxMemoryStream();
         HaloReach3d.IO.EndianIO nio    = new HaloReach3d.IO.EndianIO(stream, HaloReach3d.IO.EndianType.BigEndian);
         nio.Open();
         nio.Out.BaseStream.Position = offset;
         if (poketype == "Float")
         {
             nio.Out.Write(float.Parse(ammount));
         }
         if (poketype == "Double")
         {
             nio.Out.Write(double.Parse(ammount));
         }
         if (poketype == "String")
         {
             nio.Out.Write(ammount);
         }
         if (poketype == "Short")
         {
             nio.Out.Write((short)Convert.ToUInt32(ammount, 0x10));
         }
         if (poketype == "Byte")
         {
             nio.Out.Write((byte)Convert.ToUInt32(ammount, 0x10));
         }
         if (poketype == "Long")
         {
             nio.Out.Write((long)Convert.ToUInt32(ammount, 0x10));
         }
         if (poketype == "Quad")
         {
             nio.Out.Write((long)Convert.ToUInt64(ammount, 0x10));
         }
         if (poketype == "Int")
         {
             nio.Out.Write(Convert.ToUInt32(ammount, 0x10));
         }
         nio.Close();
         stream.Close();
         communicator.Disconnect();
     }
 }
예제 #4
0
        public string getValue(uint offset, string type)
        {
            object obj2 = null;

            if (AppSettings.Settings.IP_and_XDK_Name != "")
            {
                XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
                if (!communicator.Connected)
                {
                    try
                    {
                        communicator.Connect();
                    }
                    catch
                    {
                        start_values = false;
                    }
                }
                XboxMemoryStream        stream = communicator.ReturnXboxMemoryStream();
                HaloReach3d.IO.EndianIO nio    = new HaloReach3d.IO.EndianIO(stream, HaloReach3d.IO.EndianType.BigEndian);
                nio.Open();
                try
                {
                    nio.Out.BaseStream.Position = offset;
                    if ((type == "Float") | (type == "float"))
                    {
                        obj2 = nio.In.ReadSingle();
                    }
                    if ((type == "Double") | (type == "double"))
                    {
                        obj2 = nio.In.ReadDouble();
                    }
                    if ((type == "String") | (type == "string"))
                    {
                        obj2 = nio.In.ReadString();
                    }
                }
                catch
                {
                    return("N/A");
                }
                nio.Close();
                stream.Close();
                communicator.Disconnect();
                return(obj2.ToString());
            }
            return("No Console Typed In");
        }
예제 #5
0
 private void testToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (AppSettings.Settings.IP_and_XDK_Name == "")
     {
         MessageBox.Show("XDK Name/IP not set");
     }
     else
     {
         XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
         communicator.Connect();
         HaloReach3d.IO.EndianIO nio = new HaloReach3d.IO.EndianIO(communicator.ReturnXboxMemoryStream(), HaloReach3d.IO.EndianType.BigEndian);
         nio.Open();
         nio.Out.BaseStream.Position = 0x82a0ad94L;
         nio.Out.Write((uint)0x82919cb0);
         nio.Close();
     }
 }
예제 #6
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (AppSettings.Settings.IP_and_XDK_Name == "")
         {
             MessageBox.Show("XDK Name/IP not set");
         }
         else
         {
             XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
             if (!communicator.Connected)
             {
                 try
                 {
                     communicator.Connect();
                 }
                 catch
                 {
                 }
             }
             XboxMemoryStream        stream = communicator.ReturnXboxMemoryStream();
             HaloReach3d.IO.EndianIO nio    = new HaloReach3d.IO.EndianIO(stream, HaloReach3d.IO.EndianType.BigEndian);
             nio.Open();
             nio.Out.BaseStream.Position = (parentoffset + ReflexiveData.Offset) + Map.Map_Header.mapMagic;
             nio.Out.Write(int.Parse(txtcount.Text));
             nio.Out.Write((int)(int.Parse(txtoffset.Text) + Map.Map_Header.mapMagic));
             nio.Close();
             stream.Close();
             communicator.Disconnect();
             OutputMessenger.OutputMessage("Poked Chunk Values", this);
         }
     }
     catch
     {
         OutputMessenger.OutputMessage("Couldn't Poke Chunks", this);
     }
 }
예제 #7
0
        public string getValue(uint offset)
        {
            object obj2 = null;

            if (AppSettings.Settings.IP_and_XDK_Name != "")
            {
                XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
                if (!communicator.Connected)
                {
                    try
                    {
                        communicator.Connect();
                    }
                    catch
                    {
                    }
                }
                XboxMemoryStream        stream = communicator.ReturnXboxMemoryStream();
                HaloReach3d.IO.EndianIO nio    = new HaloReach3d.IO.EndianIO(stream, HaloReach3d.IO.EndianType.BigEndian);
                nio.Open();
                try
                {
                    nio.In.BaseStream.Position = offset;
                    obj2 = nio.In.ReadSingle();
                }
                catch
                {
                    return("N/A");
                }
                nio.Close();
                stream.Close();
                communicator.Disconnect();
                return(obj2.ToString());
            }
            return("No Console Detected");
        }
 public void pokeXbox(uint offset, string poketype, string ammount)
 {
     if (!checkBox1.Checked)
     {
         ammount = int.Parse(ammount).ToString("X");
     }
     try
     {
         if (AppSettings.Settings.IP_and_XDK_Name == "")
         {
             MessageBox.Show("XDK Name/IP not set");
         }
         else
         {
             XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
             if (!communicator.Connected)
             {
                 try
                 {
                     communicator.Connect();
                 }
                 catch
                 {
                 }
             }
             XboxMemoryStream        stream = communicator.ReturnXboxMemoryStream();
             HaloReach3d.IO.EndianIO nio    = new HaloReach3d.IO.EndianIO(stream, HaloReach3d.IO.EndianType.BigEndian);
             nio.Open();
             nio.Out.BaseStream.Position = offset;
             if (poketype == "Unicode String")
             {
                 nio.Out.WriteUnicodeString(ammount, ammount.Length);
             }
             if (poketype == "ASCII String")
             {
                 nio.Out.WriteUnicodeString(ammount, ammount.Length);
             }
             if ((poketype == "String") | (poketype == "string"))
             {
                 nio.Out.Write(ammount);
             }
             if ((poketype == "Float") | (poketype == "float"))
             {
                 nio.Out.Write(float.Parse(ammount));
             }
             if ((poketype == "Double") | (poketype == "double"))
             {
                 nio.Out.Write(double.Parse(ammount));
             }
             if ((poketype == "Short") | (poketype == "short"))
             {
                 nio.Out.Write((short)Convert.ToUInt32(ammount, 0x10));
             }
             if ((poketype == "Byte") | (poketype == "byte"))
             {
                 nio.Out.Write((byte)Convert.ToUInt32(ammount, 0x10));
             }
             if ((poketype == "Long") | (poketype == "long"))
             {
                 nio.Out.Write((long)Convert.ToUInt32(ammount, 0x10));
             }
             if ((poketype == "Quad") | (poketype == "quad"))
             {
                 nio.Out.Write((long)Convert.ToUInt64(ammount, 0x10));
             }
             if ((poketype == "Int") | (poketype == "int"))
             {
                 nio.Out.Write(Convert.ToUInt32(ammount, 0x10));
             }
             if ((poketype == "Bytes") | (poketype == "bytes"))
             {
                 nio.Out.Write(ExtraFunctions.HexStringToBytes(ammount), 0, ExtraFunctions.HexStringToBytes(ammount).Count <byte>());
             }
             nio.Close();
             stream.Close();
             communicator.Disconnect();
         }
     }
     catch
     {
     }
 }
        public string getValue(uint offset, string type)
        {
            string format = "";

            if (checkBox1.Checked)
            {
                format = "X";
            }
            else
            {
                format = "";
            }
            object obj2 = null;

            if (AppSettings.Settings.IP_and_XDK_Name != "")
            {
                XboxDebugCommunicator communicator = new XboxDebugCommunicator(AppSettings.Settings.IP_and_XDK_Name);
                if (!communicator.Connected)
                {
                    try
                    {
                        communicator.Connect();
                    }
                    catch
                    {
                    }
                }
                XboxMemoryStream        stream = communicator.ReturnXboxMemoryStream();
                HaloReach3d.IO.EndianIO nio    = new HaloReach3d.IO.EndianIO(stream, HaloReach3d.IO.EndianType.BigEndian);
                nio.Open();
                nio.In.BaseStream.Position = offset;
                if ((type == "String") | (type == "string"))
                {
                    obj2 = nio.In.ReadString();
                }
                if (type == "Unicode String")
                {
                    obj2 = nio.In.ReadUnicodeString(int.Parse(textBox4.Text));
                }
                if (type == "ASCII String")
                {
                    obj2 = nio.In.ReadAsciiString(int.Parse(textBox4.Text));
                }
                if ((type == "Float") | (type == "float"))
                {
                    obj2 = nio.In.ReadSingle();
                }
                if ((type == "Double") | (type == "double"))
                {
                    obj2 = nio.In.ReadDouble();
                }
                if ((type == "Short") | (type == "short"))
                {
                    obj2 = nio.In.ReadInt16().ToString(format);
                }
                if ((type == "Byte") | (type == "byte"))
                {
                    obj2 = nio.In.ReadByte().ToString(format);
                }
                if ((type == "Long") | (type == "long"))
                {
                    obj2 = nio.In.ReadInt32().ToString(format);
                }
                if ((type == "Quad") | (type == "quad"))
                {
                    obj2 = nio.In.ReadInt64().ToString(format);
                }
                if ((type == "Bytes") | (type == "bytes"))
                {
                    if (textBox4.Text == "")
                    {
                        textBox4.Text = "4";
                    }
                    obj2 = ExtraFunctions.BytesToHexString(nio.In.ReadBytes(int.Parse(textBox4.Text)));
                }
                nio.Close();
                stream.Close();
                communicator.Disconnect();
                return(obj2.ToString());
            }
            MessageBox.Show("XDK Name/IP not set");
            return("No Console Detected");
        }