Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Init & fill variables
            string line = new string('-', Console.WindowWidth);
            offsets = new Dictionary<string, string>();
            PrintSideInfo(line);

            PrintInfo("[>]=-- Zat's CSGO-Dumper v.{0}", Assembly.GetExecutingAssembly().GetName().Version.ToString());

            //Wait for process
            PrintSideInfo(line);
            PrintSideInfo("");
            PrintSideInfo(line);

            //Preparation: Gather module info
            PrintStatus("Waiting for process to spawn and load...");
            int x = Console.CursorLeft;
            int a = 0;
            do
            {
                Console.CursorLeft = x;
                Console.Write(a++ % 2 == 0.0 ? "?" : " ");
                Thread.Sleep(100);
                if (Process.GetProcessesByName(PROCESS_NAME).Length == 0)
                    continue;
                scanner = new SigScanner(Process.GetProcessesByName(PROCESS_NAME)[0], IntPtr.Zero, MAX_DUMP_SIZE);
                dllClientAddress = GetModuleBaseAddressByName(scanner.Process, @"bin\client.dll").ToInt32();
                dllEngineAddress = GetModuleBaseAddressByName(scanner.Process, @"engine.dll").ToInt32();
                dllClientSize = GetModuleSize(scanner.Process, @"bin\client.dll");
                dllEngineSize = GetModuleSize(scanner.Process, @"engine.dll");
            } while (scanner == null || dllEngineAddress == 0 || dllClientAddress == 0);
            Console.CursorLeft = x;

            PrintSideInfo("[client.dll:0x{0}:{1}]", dllClientAddress.ToString("X").PadLeft(8, '0'), ByteSizeToString(dllClientSize));
            PrintSideInfo("[engine.dll:0x{0}:{1}]", dllEngineAddress.ToString("X").PadLeft(8, '0'), ByteSizeToString(dllEngineSize));
            PrintSideInfo(line);

            //Find one offset step by step
            PrintInfo("~ General");
            PrintStatus("Scanning for EntityList...");
            FindEntityList();
            PrintStatus("Scanning for LocalPlayer...");
            FindLocalPlayer();
            PrintStatus("Scanning for FlashMaxDuration...");
            FindFlashMaxDuration();
            PrintStatus("Scanning for FindFlashMaxAlpha...");
            FindFlashMaxAlpha();
            PrintStatus("Scanning for RadarBase...");
            FindRadarBase();
            PrintStatus("Scanning for ScoreBoardBase...");
            FindScoreBoardBase();
            PrintStatus("Scanning for ServerBase...");
            FindServerBase();
            PrintStatus("Scanning for EnginePointer...");
            FindEnginePointer();
            PrintStatus("Scanning for SetViewAngles...");
            FindSetViewAngles();
            PrintStatus("Scanning for CrosshairIndex");
            FindCrosshairIndex();
            PrintStatus("Scanning for GlowObjectBase...");
            FindGlowObjectBase();
            PrintStatus("Scanning for VMatrix...");
            FindViewMatrix();
            PrintInfo("~ Controls");
            PrintStatus("Scanning for attack...");
            FindAttack();
            PrintStatus("Scanning for attack2...");
            FindAttack2();
            PrintStatus("Scanning for forward...");
            FindForward();
            PrintStatus("Scanning for backward...");
            FindBackward();
            PrintStatus("Scanning for moveright...");
            FindLeft();
            PrintStatus("Scanning for moveleft...");
            FindRight();
            PrintStatus("Scanning for jump...");
            FindJump();

            //End

            PrintSideInfo(line);
            PrintInfo("Dump finished");
            PrintStatus("* Dump finished *");
            if (offsets.Count > 0)
            {
                if (GetKeyFromUser("Would you like to save these offsets? [Y/N]", ConsoleKey.Enter, ConsoleKey.Y, ConsoleKey.N) == ConsoleKey.Y)
                {
                    SaveOffsets();
                }
            }
            PrintInfo("Press any key to exit.");
            Console.ReadKey();
        }