Example #1
0
        public override void Run()
        {
            base.Run();


            Process[] processes = Process.GetProcesses();

            //todo also scan for the 64 bit exe
            foreach (Process process in processes)
            {
                if (process.ProcessName.Contains("Wreckfest"))
                {
                    mainProcess = process;
                }
            }



            if (mainProcess == null) //no processes, better stop
            {
                ui.StatusTextChanged("Wreckfest_x64.exe exe not running!");
                return;
            }

            //Warning! This also covers 64 bit, so..

            if (mainProcess.MainWindowTitle.Contains("32bit") == false)
            {
                ui.StatusTextChanged("Wreckfest 32-bit supported only!");
                return;//todo work out why I can't re-click init
            }

            //For current WF builds we can start at //1400000000 safely. This is set in the UI

            long lStart = ui.StartAddressIndex;

            lStart -= 1000000;//skip a meg back
            if (lStart < 0)
            {
                lStart = 0;
            }

            RegularMemoryScan scan = new RegularMemoryScan(mainProcess, lStart, 34359720776);// 140737488355327); //32gig

            scan.ScanProgressChanged += new RegularMemoryScan.ScanProgressedEventHandler(scan_ScanProgressChanged);
            scan.ScanCompleted       += new RegularMemoryScan.ScanCompletedEventHandler(scan_ScanCompleted);
            scan.ScanCanceled        += new RegularMemoryScan.ScanCanceledEventHandler(scan_ScanCanceled);

            ui.StatusTextChanged("Starting Search from " + lStart);

            //Search string in WF memory
            string scanString = "carRootNode" + vehicleString;

            //incidentally, this would have been a better place to set the offset
            scan.StartScanForString(scanString, 1);
        }
        public override void Run()
        {
            base.Run();


            Process[] processes = Process.GetProcesses();

            foreach (Process process in processes)
            {
                if (process.ProcessName.Contains("DIRT5"))
                {
                    mainProcess = process;
                }
            }

            if (mainProcess == null) //no processes, better stop
            {
                ui.StatusTextChanged("DIRT5 exe not running!");
                return;
            }


            RegularMemoryScan scan = new RegularMemoryScan(mainProcess, 0, 34359720776);// 140737488355327); //32gig

            scan.ScanProgressChanged += new RegularMemoryScan.ScanProgressedEventHandler(scan_ScanProgressChanged);
            scan.ScanCompleted       += new RegularMemoryScan.ScanCompletedEventHandler(scan_ScanCompleted);
            scan.ScanCanceled        += new RegularMemoryScan.ScanCanceledEventHandler(scan_ScanCanceled);

            /*
             * string scanString = "";
             * while (scanString.Length < 24)
             *  scanString += "\0";
             * scanString += "A";
             *
             * if (vehicleString.Length < 20)
             *  scanString = scanString.Remove(20, 1).Insert(20, "\u0001");
             *
             * scanString = scanString.Remove(0, vehicleString.Length).Insert(0, vehicleString);
             */

            string scanString = "B`U>B`U>";


            scan.StartScanForString(scanString, 1);
        }
Example #3
0
        public override void Run()
        {
            base.Run();


            Process[] processes = Process.GetProcesses();

            foreach (Process process in processes)
            {
                if (process.ProcessName.Contains("Wreckfest"))
                {
                    mainProcess = process;
                }
            }

            if (mainProcess == null) //no processes, better stop
            {
                ui.StatusTextChanged("Wreckfest_x64.exe exe not running!");
                return;
            }


            //For current WF builds we can start at //1400000000 safely. This is set in the UI

            long lStart = 1400000000;

            lStart -= 1000000;//skip a meg back
            if (lStart < 0)
            {
                lStart = 0;
            }

            RegularMemoryScan scan = new RegularMemoryScan(mainProcess, lStart, 34359720776);// 140737488355327); //32gig            scan.ScanProgressChanged += new RegularMemoryScan.ScanProgressedEventHandler(scan_ScanProgressChanged);

            scan.ScanCompleted += new RegularMemoryScan.ScanCompletedEventHandler(scan_ScanCompleted);
            scan.ScanCanceled  += new RegularMemoryScan.ScanCanceledEventHandler(scan_ScanCanceled);


            string scanString = "carRootNode" + vehicleString;

            scan.StartScanForString(scanString, 1);
        }