Ejemplo n.º 1
0
        //creates threads and assigns them to work a list
        private void SearchForValuesInMultipleThreads()
        {
            List <Thread> threadList = new List <Thread>();

            ScanHistory.Add(new List <ScanStructure>());


            foreach (List <RegionStructure> list in regionLists)
            {
                Thread arsch = new Thread(() => ReadMemory(list));
                arsch.Start();
                threadList.Add(arsch);
            }

            foreach (Thread thread in threadList)
            {
                thread.Join();
            }

            if (ScanHistory.Last().Count <= 10_000)
            {
                ScanHistory.Last().Sort();
            }

            Output = MemoryConverter.CreateDataGrid(ScanHistory, IsString);
        }
Ejemplo n.º 2
0
 private void Schreiben_Click(object sender, EventArgs e)
 {
     {
         byte[] writeboxContent = MemoryConverter.TextBoxContentToByteArray(WriteValueTextBox.Text, ((KeyValuePair <int, string>)InputTypeComboBox.SelectedItem).Key);
         IntPtr test            = new IntPtr(int.Parse(WriteAddressTextBox.Text, System.Globalization.NumberStyles.HexNumber));
         meow.TestWrite(test, writeboxContent);
     }
 }
Ejemplo n.º 3
0
        //TODO richtig machen(is noch irgendwie unsauber)
        private void Freezer_DoWork(object sender, DoWorkEventArgs e)
        {
            byte[] writeboxContent = new byte[0];
            WriteValueTextBox.Invoke((Action)(() => writeboxContent = MemoryConverter.TextBoxContentToByteArray(WriteValueTextBox.Text, ((KeyValuePair <int, string>)InputTypeComboBox.SelectedItem).Key)));
            IntPtr test = new IntPtr(int.Parse(WriteAddressTextBox.Text, System.Globalization.NumberStyles.HexNumber));

            while (Freeze.Checked == true)
            {
                schreiben.Invoke((Action)(() => schreiben.Enabled = false));
                meow.TestWrite(test, writeboxContent);
                Thread.Sleep(100);
            }
            schreiben.Invoke((Action)(() => schreiben.Enabled = true));
        }
Ejemplo n.º 4
0
        //reads changes in memory for addresses in the list and updates these values
        public void RefreshList()
        {
            List <ScanStructure> arsch = new List <ScanStructure>();


            foreach (ScanStructure item in ScanHistory.Last())
            {
                byte[] refresh = new byte[item.Value.Length];
                ReadProcessMemory(targetHandle, item.Address, refresh, (uint)item.Value.Length, out notNecessary);
                arsch.Add(new ScanStructure(item.Address, refresh));
            }
            ScanHistory.Add(arsch);
            Output = MemoryConverter.RefreshDatagrid(ScanHistory, IsString);
            ScanHistory.Remove(ScanHistory.Last());
        }
Ejemplo n.º 5
0
        private void NextScan_Click(object sender, EventArgs e)
        {
            textboxContent = MemoryConverter.TextBoxContentToByteArray(ValueToFindTextBox.Text, ((KeyValuePair <int, string>)InputTypeComboBox.SelectedItem).Key);
            meow.Value     = textboxContent;
            meow.CompareLists();



            source.DataSource        = meow.Output;
            dataGridView1.DataSource = source;


            AddressFoundLabel.Text      = meow.Output.Count().ToString();
            AutoRefreshcheckBox.Enabled = true;


            //foolin around
            //listBox1.DataSource = firstTry.memoryMemory.ConvertAll(delegate (IntPtr i) { return i.ToString("X8"); });
        }
Ejemplo n.º 6
0
        public void PointerStart()
        {
            DumpMemorySynchronously();
            PointerHistory.Add(new List <PointerStructure>());


            IntPtr _currentAddress           = new IntPtr(BitConverter.ToInt32(CurrentAddress, 0));
            MEMORY_BASIC_INFORMATION memInfo = new MEMORY_BASIC_INFORMATION();

            VirtualQueryEx(targetHandle, _currentAddress, out memInfo, (uint)Marshal.SizeOf(memInfo));
            PointerStructure pointer = new PointerStructure((uint)_currentAddress, new RegionStructure(memInfo.BaseAddress, (int)memInfo.RegionSize));

            ZweiundVierzig(pointer);
            //MultiPointerSearch(pointer);


            int egal = 0;

            PointerOutput = MemoryConverter.CreateDataGridForPointer(PointerHistory);
        }
Ejemplo n.º 7
0
        //Compares Lists and removes no longer valid entries and adds the result to the history
        public void CompareLists()
        {
            //just compares the values in the previous list by reading small areas(size of the new value) in VRAM
            List <ScanStructure> ScanResult = new List <ScanStructure>();

            byte[] _value    = Value;
            int    _typesize = TypeSize;
            bool   found;

            byte[] compareBuffer = new byte[_typesize];

            for (int i = ScanHistory.Last().Count() - 1; i >= 0; i--)
            {
                if (ReadProcessMemory(targetHandle, ScanHistory.Last().ElementAt(i).Address, compareBuffer, (uint)_typesize, out notNecessary))
                {
                    for (int k = 0; k < compareBuffer.Length - (_typesize - 1); k++)
                    {
                        found = true;
                        for (int j = 0; j < _typesize; j++)
                        {
                            if (compareBuffer[k + j] != _value[j])
                            {
                                found = false;
                            }
                            if (found)
                            {
                                ScanResult.Add(new ScanStructure(ScanHistory.Last().ElementAt(i).Address, _value));
                                found = false;
                            }
                        }
                    }
                }
            }
            if (ScanResult.Count() <= 20_000)
            {
                ScanResult.Sort();
            }
            ScanHistory.Add(ScanResult);
            Output = MemoryConverter.CreateDataGrid(ScanHistory, IsString);
        }
Ejemplo n.º 8
0
        private void FirstScan_Click(object sender, EventArgs e)
        {
            textboxContent = MemoryConverter.TextBoxContentToByteArray(ValueToFindTextBox.Text, ((KeyValuePair <int, string>)InputTypeComboBox.SelectedItem).Key);
            meow.Value     = textboxContent;
            CheckForString();
            meow.Start();


            source.DataSource        = meow.Output;
            dataGridView1.DataSource = source;


            AddressFoundLabel.Text    = meow.Output.Count().ToString();
            NextScanButton.Enabled    = true;
            ResetButton.Enabled       = true;
            AddressFoundLabel.Visible = true;
            FirstScanButton.Enabled   = false;
            InputTypeComboBox.Enabled = false;


            Collector.RunWorkerAsync();
        }