private static void StartCheat() { //We make the config if it dosen't exist. KeyUtils = new KeyUtils(); PrintInfo("> Waiting for CSGO to start up..."); while (!ProcUtils.ProcessIsRunning(GameProcess)) { Thread.Sleep(250); } _procUtils = new ProcUtils(GameProcess, WinAPI.ProcessAccessFlags.VirtualMemoryRead | WinAPI.ProcessAccessFlags.VirtualMemoryWrite | WinAPI.ProcessAccessFlags.VirtualMemoryOperation); MemUtils = new MemUtils { Handle = _procUtils.Handle }; PrintInfo("> Waiting for CSGOs window to show up..."); while ((_hWnd = WinAPI.FindWindowByCaption(_hWnd, GameTitle)) == IntPtr.Zero) { Thread.Sleep(250); } ProcessModule clientDll, engineDll; PrintInfo("> Waiting for CSGO to load client.dll..."); while ((clientDll = _procUtils.GetModuleByName(@"bin\client.dll")) == null) { Thread.Sleep(250); } PrintInfo("> Waiting for CSGO to load engine.dll..."); while ((engineDll = _procUtils.GetModuleByName(@"engine.dll")) == null) { Thread.Sleep(250); } //will update everything we need. Memory = new Memory(engineDll, clientDll); _triggerBot = new TriggerBot(); _rcs = new Rcs(); _bunnyJump = new BunnyJump(); _sonar = new Sonar(); Timer1.Elapsed += Timer1Elapsed; Timer1.Start(); PrintSuccess("Cheat is now running."); Application.Run(); }
public static void Attach(System.Diagnostics.Process process, bool isInjected = false) { if (_isAttached) { return; } if (isInjected) { Memory = new LocalProcessMemory(process); } else { Memory = new ExternalProcessMemory(process); } Thread.Sleep(2000); Renderer = new Renderer(process); ClientBase = Memory.GetModule("client.dll").BaseAddress; EngineBase = Memory.GetModule("engine.dll").BaseAddress; Offsets.Initialize(); ClientState = Memory.Read <int>(EngineBase + Offsets.ClientState.Base); Objects = new ObjectManager(ClientBase + Offsets.Misc.EntityList); Box = new Box(); HeadHelper = new HeadHelper(); SkinChanger = new SkinChanger(); ControlRecoil = new Rcs(); TriggerBot = new TriggerBot(); KeyUtils = new KeyUtils(); BunnyJump = new BunnyJump(); SoundEsp = new SoundEsp(); Radar = new Radar(); NoFlash = new NoFlash(); AutoPistol = new AutoPistol(); Glow = new Glow(); AimAssist = new AimAssist(); var enginePtr = Memory.Read <IntPtr>(EngineBase + Offsets.ClientState.Base); if (enginePtr == IntPtr.Zero) { throw new Exception("Couldn't find Engine Ptr - are you sure your offsets are up to date?"); } Client = new GameClient(enginePtr); _isAttached = true; }