Exemplo n.º 1
0
        public virtual void Attach()
        {
#if DEBUG
            if (Debugger.IsAttached)
            {
                Logger.Info("Trying to attach to debugger");

                int count = 0;

                while (true)
                {
                    try
                    {
                        ProcessAttacher.Attach();
                        Logger.Info("Debugger Attached");
                        return;
                    }
                    catch (Exception e)
                    {
                        count++;
                        if (count > 20)
                        {
                            Logger.WarnException("Unable to attach to debugger", e);
                            return;
                        }

                        Thread.Sleep(100);
                    }
                }
            }
#endif
        }
Exemplo n.º 2
0
        private static void Initialize()
        {
            Thread.CurrentThread.IsBackground = true;
            Thread.CurrentThread.Priority     = ThreadPriority.Highest;

            while (Reader == null)
            {
                Reader = ProcessAttacher.AttachToGame();
            }
            Pointers = ProcessAttacher.Pointers;
            PointersManager.ScanSignatures(Reader, ProcessAttacher.Pointers);

            client      = new Client(Pointers.pClient, Reader);
            engine      = new Engine(Pointers.pEngine, Reader);
            clientState = engine.GetClientState();

            do
            {
                Console.WriteLine("Searching for the game...");
                Console.WriteLine("View Angles: " + clientState.ViewAngles);
                Console.WriteLine("Game State: " + clientState.State);
                Thread.Sleep(1000);
                Reader.Update();
            } while (clientState.State != GameStates.Full);

            new CheatModules.ESP();
            new CheatModules.Triggerbot();
            new CheatModules.AimbotBasic();
            new CheatModules.Misc();
            new CheatModules.PlayersList();

            while (true)
            {
                var temp        = Reader.ReadInt32Uncached(client.address + Signatures.dwLocalPlayer);
                var currentTick = Reader.ReadInt32Uncached((IntPtr)temp + Netvars.m_nTickBase);

                if (ingameTick != currentTick)
                {
                    Reader.Update();
                    ingameTick = currentTick;
                }

                Thread.Sleep(1);
            }
        }