예제 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Console.WriteLine("Black Ops Zombies Trainer by cl0ck.");
            Console.WriteLine("This trainer may work in the campaign mode but is untested!");
            Console.WriteLine("Printing info about MemoryTools.dll");
            mreader.AboutMemoryTools();

            if (process != null)
            {
                //Exits if multiplayer exe
                if (process.MainModule.ModuleName != "BlackOps.exe")
                {
                    MessageBox.Show("This tool is not designed to support cheating on muliplayer!", "Nice try f****r :P", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                    Application.Exit();
                }

                if (process.MainModule.ModuleMemorySize != 69693440)
                {
                    MessageBox.Show("Unpredicted game size! \nExiting to prevent online cheating and memory corruption!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    Application.Exit();
                }

                mreader.ReadProcess = process;
                mreader.Openprocess();

                HotKeyTimer.Enabled = true;

                //Calculate Pointsoffset
                Pointsoffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (PointsOffsetAdr < 0)
                {
                    Pointsoffset -= (uint)Math.Abs(PointsOffsetAdr);
                }
                else
                {
                    Pointsoffset += (uint)PointsOffsetAdr;
                }

                // Calculate KillCountsoffset
                KillCountOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (KillCountOffsetAdr < 0)
                {
                    KillCountOffset -= (uint)Math.Abs(KillCountOffsetAdr);
                }
                else
                {
                    KillCountOffset += (uint)KillCountOffsetAdr;
                }

                //Calculate HeadShotCountOffset
                HeadShotCountOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (HeadShotCountOffsetAdr < 0)
                {
                    HeadShotCountOffset -= (uint)Math.Abs(HeadShotCountOffsetAdr);
                }
                else
                {
                    HeadShotCountOffset += (uint)HeadShotCountOffsetAdr;
                }

                //Calculate WeaponTwoClipOffset
                WeaponTwoClipOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (WeaponTwoClipOffsetAdr < 0)
                {
                    WeaponTwoClipOffset -= (uint)Math.Abs(WeaponTwoClipOffsetAdr);
                }
                else
                {
                    WeaponTwoClipOffset += (uint)WeaponTwoClipOffsetAdr;
                }

                //Calculate WeaponThreeClipOffset
                WeaponThreeClipOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (WeaponThreeClipOffsetAdr < 0)
                {
                    WeaponThreeClipOffset -= (uint)Math.Abs(WeaponThreeClipOffsetAdr);
                }
                else
                {
                    WeaponThreeClipOffset += (uint)WeaponThreeClipOffsetAdr;
                }

                //Calculate ToggleNoclipOffset
                ToggleNoclipOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (ToggleNoclipOffsetAdr < 0)
                {
                    ToggleNoclipOffset -= (uint)Math.Abs(ToggleNoclipOffsetAdr);
                }
                else
                {
                    ToggleNoclipOffset += (uint)ToggleNoclipOffsetAdr;
                }

                ToggleGodmodeOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (ToggleGodmodeOffsetAdr < 0)
                {
                    ToggleGodmodeOffset -= (uint)Math.Abs(ToggleGodmodeOffsetAdr);
                }
                else
                {
                    ToggleGodmodeOffset += (uint)ToggleGodmodeOffsetAdr;
                }

                //Calculate WeponOneIDOffset
                WeaponOneIDOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (WeaponOneIDOffsetAdr < 0)
                {
                    WeaponOneIDOffset -= (uint)Math.Abs(WeaponOneIDOffsetAdr);
                }
                else
                {
                    WeaponOneIDOffset += (uint)WeaponOneIDOffsetAdr;
                }

                //Calculate WeaponTwoIDOffset
                WeaponTwoIDOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (WeaponTwoIDOffsetAdr < 0)
                {
                    WeaponTwoIDOffset -= (uint)Math.Abs(WeaponTwoIDOffsetAdr);
                }
                else
                {
                    WeaponTwoIDOffset += (uint)WeaponTwoIDOffsetAdr;
                }

                //Calculate WeaponThreeIDOffset
                WeaponThreeIDOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (WeaponThreeIDOffsetAdr < 0)
                {
                    WeaponThreeIDOffset -= (uint)Math.Abs(WeaponThreeIDOffsetAdr);
                }
                else
                {
                    WeaponThreeIDOffset += (uint)WeaponThreeIDOffsetAdr;
                }

                //Calculate IsLookingAtZombieOffset
                IsLookingAtZombieOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(BaseAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesOut), 0);
                if (IsLookingAtZombieOffsetAdr < 0)
                {
                    IsLookingAtZombieOffset -= (uint)Math.Abs(IsLookingAtZombieOffsetAdr);
                }
                else
                {
                    IsLookingAtZombieOffset += (uint)IsLookingAtZombieOffsetAdr;
                }
            }
            else
            {
                MessageBox.Show("Error. Please make sure Black Ops is running before starting the trainer!", "Could not find Black Ops", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(1);
            }

            this.Text = ("Black Ops Zombies Trainer by cl0ck | Version " + ProductVersion + " | reading PID " + process.Id.ToString());
            string ttt = (int.Parse(process.Modules[0].BaseAddress.ToString(), System.Globalization.NumberStyles.Integer)).ToString("X");

            Console.WriteLine("Trainner attached to BlackOps @ PID " + process.Id.ToString() + " using the base memory adress 0x" + (int.Parse(process.Modules[0].BaseAddress.ToString(), System.Globalization.NumberStyles.Integer)).ToString("X") + " ( " + process.Modules[0].BaseAddress.ToString() + " in deciaml)");
            Console.WriteLine("Printing game details to console...");
            Console.WriteLine(process.Modules[0].FileVersionInfo);
            Console.Title = this.Text;
            this.Text     = "Black Ops Zombies Trainer by cl0ck";
        }
예제 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Console.WriteLine("FTL Trainer by cl0ck.");
            Console.WriteLine("Printing info about MemoryTools.dll");
            mreader.AboutMemoryTools();
            if (process != null)
            {
                mreader.ReadProcess = process;
                mreader.Openprocess();

                Offset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(PointerAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesout), 0);
                if (PointerOffset < 0)
                {
                    Offset -= (uint)PointerOffset;
                }
                else
                {
                    Offset += (uint)PointerOffset;
                }

                ShipOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(ShipPointerAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesout), 0);
                if (ShipOffset < 0)
                {
                    Offset -= (uint)PointerOffset;
                }
                else
                {
                    Offset += (uint)PointerOffset;
                }
            }
            else
            {
                MessageBox.Show("Error. Please make sure FTL is running before starting the trainer!", "Could not find FTL", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(1);
            }
            this.Text = ("FTL Trainer by cl0ck | Version " + ProductVersion + " | reading PID " + process.Id.ToString());
            string ttt = (int.Parse(process.Modules[0].BaseAddress.ToString(), System.Globalization.NumberStyles.Integer)).ToString("X");

            Console.WriteLine("Trainner attached to FTL @ PID " + process.Id.ToString() + " using the base memory adress 0x" + (int.Parse(process.Modules[0].BaseAddress.ToString(), System.Globalization.NumberStyles.Integer)).ToString("X") + " ( " + process.Modules[0].BaseAddress.ToString() + " in deciaml)");
            Console.WriteLine("Printing game details to console...");
            Console.WriteLine(process.Modules[0].FileVersionInfo);
            Console.WriteLine("Updating values in trainer to match game...");
            UpdatePosTimer.Enabled = true;
            Console.Title          = this.Text;
            this.Text = "FTL Trainer by cl0ck";

            //Code to set values

ReloadOnError:
            bool ErrorReadingValues = false;

            if (ErrorReadingValues = true)
            {
                Console.WriteLine("Attempting to recalculate memory pointers and offsets!");
                Offset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(PointerAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesout), 0);
                if (PointerOffset < 0)
                {
                    Offset -= (uint)PointerOffset;
                }
                else
                {
                    Offset += (uint)PointerOffset;
                }

                ShipOffset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(ShipPointerAdress + (uint)process.Modules[0].BaseAddress), 4, out bytesout), 0);
                if (ShipOffset < 0)
                {
                    Offset -= (uint)PointerOffset;
                }
                else
                {
                    Offset += (uint)PointerOffset;
                }
            }

            try
            {
                //Sets scrap value
                ScrapValueNumericUpDown.Value = BitConverter.ToInt32(mreader.ReadMemory((IntPtr)Offset + 0x4D4, 4, out bytesout), 0);
                Console.WriteLine("Set trainer scrap value to " + ScrapValueNumericUpDown.Value);
            }
            catch (Exception)
            {
                //Sets scrap value
                ScrapValueNumericUpDown.Value = 999999999;
                Console.WriteLine("Set trainer scrap value to " + ScrapValueNumericUpDown.Value);
            }

            try
            {
                //Sets Reactor value
                ReactorLevelUpDown.Value = BitConverter.ToInt32(mreader.ReadMemory((IntPtr)ShipOffset + 0x04, 4, out bytesout), 0);
                Console.WriteLine("Set trainer reactor level value to " + ReactorLevelUpDown.Value);
            }
            catch (Exception)
            {
                //Sets Reactor value
                ReactorLevelUpDown.Value = 60;
                Console.WriteLine("Set trainer reactor level value to " + ReactorLevelUpDown.Value);
            }


            try
            {
                //Sets fuel value
                NumericFuel.Value = BitConverter.ToInt32(mreader.ReadMemory((IntPtr)Offset + 0x494, 4, out bytesout), 0);
                Console.WriteLine("Set trainer fuel value to " + NumericFuel.Value);
            }
            catch (Exception)
            {
                //Sets fuel value
                NumericFuel.Value = 999999999;
                Console.WriteLine("Set trainer fuel value to " + NumericFuel.Value);
            }

            try
            {
                //Sets drone parts value
                NumericDroneParts.Value = BitConverter.ToInt32(mreader.ReadMemory((IntPtr)Offset + 0x800, 4, out bytesout), 0);
                Console.WriteLine("Set trainer drone parts value to " + NumericDroneParts.Value);
            }
            catch (Exception)
            {
                //Sets drone parts value
                NumericDroneParts.Value = 999999999;
                Console.WriteLine("Set trainer drone parts value to " + NumericDroneParts.Value);
            }

            try
            {
                //Sets hull hp value
                NumeriHullHP.Value = BitConverter.ToInt32(mreader.ReadMemory((IntPtr)Offset + 0xcc, 4, out bytesout), 0);
                Console.WriteLine("Set hull HP value to " + NumeriHullHP.Value);
            }
            catch (Exception)
            {
                //Sets hull hp value
                NumeriHullHP.Value = 999999999;
                Console.WriteLine("Set hull HP value to " + NumeriHullHP.Value);
            }

            try
            {
                //Sets Max HUll HP
                NumericMaxHull.Value = BitConverter.ToInt32(mreader.ReadMemory((IntPtr)Offset + 0xd0, 4, out bytesout), 0);
                Console.WriteLine("Set trainer max hull HP value to " + NumericMaxHull.Value);
            }
            catch (Exception)
            {
                //Sets Max HUll HP
                NumericMaxHull.Value = 999999999;
                Console.WriteLine("Set trainer max hull HP value to " + NumericMaxHull.Value);
            }


            Console.WriteLine("Done!");
            if (NumeriHullHP.Value == 0)
            {
                MessageBox.Show("Due to how FTL handles it's memory pointers the trainer cannot calculate the offsets until you have started the main game. Please select a ship and start before you continue", "PLEASE READ!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                //goto ReloadOnError;
            }
        }