Ejemplo n.º 1
0
 public PointerFinderWorkerListViewUpdate(PointerList pointerList, List <long> path_offset, List <Pointer> path_address, int SectionID)
 {
     this.PointerList = pointerList;
     this.PathOffset  = new List <long>(path_offset);
     this.PathAddress = new List <Pointer>(path_address);
     this.SectionID   = SectionID;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Invoke thread-safe calls with a delegate event
        /// </summary>
        private void NextFinderWorkerEvent(PointerList pointerList, PointerFinderWorkerArgs pointerFinderWorkerArgs)
        {
            if (InvokeRequired)
            {
                NextFinderHandler ng = new NextFinderHandler(NextFinderWorkerEvent);
                this.Invoke(ng, pointerList, pointerFinderWorkerArgs);
            }
            else
            {
                List <PointerResult> newPointerResultList = new List <PointerResult>();
                pointer_list_view.Rows.Clear();

                for (int i = 0; i < pointerResults.Count; ++i)
                {
                    if (i % 100 == 0)
                    {
                        next_pointer_finder_worker.ReportProgress((int)(30 * (float)(i) / pointerResults.Count) + 70);
                    }

                    PointerResult pointerResult = pointerResults[i];
                    ulong         tailAddress   = pointerList.GetTailAddress(pointerResult, processManager.MappedSectionList);
                    if (tailAddress == pointerFinderWorkerArgs.Address)
                    {
                        newPointerResultList.Add(pointerResult);
                        ++result_counter;

                        if (result_counter < 2000)
                        {
                            int row_index = pointer_list_view.Rows.Add();
                            DataGridViewCellCollection row = pointer_list_view.Rows[row_index].Cells;

                            for (int j = 0; j < pointerResult.Offsets.Length; ++j)
                            {
                                row[j].Value = (pointerResult.Offsets[j].ToString("X"));                           //offset
                            }

                            if (pointerResult.Offsets.Length > 0)
                            {
                                row[row.Count - 2].Value = (pointerResult.GetBaseAddress(processManager.MappedSectionList).ToString("X"));   //address
                                row[row.Count - 1].Value = (processManager.MappedSectionList.GetSectionName(pointerResult.BaseSectionID));   //section
                            }
                        }
                    }
                }
                if (newPointerResultList.Count == 0 && MessageBox.Show("Whether to continue?", "Next Scan results are zero", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes ||
                    newPointerResultList.Count > 0)
                {
                    pointerResults = newPointerResultList;
                }

                next_pointer_finder_worker.ReportProgress(100);
            }
        }
Ejemplo n.º 3
0
        private void PointerList_NewPathGeneratedEvent(PointerList pointerList, List <long> path_offset, List <Pointer> path_address)
        {
            if (path_address.Count > 0)
            {
                int baseSectionID = processManager.MappedSectionList.GetMappedSectionID(path_address[path_offset.Count - 1].Address);

                if (fast_scan && !processManager.MappedSectionList[baseSectionID].Name.StartsWith("executable"))
                {
                    return;
                }

                PointerFinderWorkerListViewUpdate view_info = new PointerFinderWorkerListViewUpdate(pointerList, path_offset, path_address, baseSectionID);
                pointer_finder_worker.ReportProgress(95, view_info);
            }
        }
Ejemplo n.º 4
0
        public void PointerSearchInit(ProcessManager processManager, MemoryHelper memoryHelper, PointerList pointerList)
        {
            ulong address = this.Start;
            int   length  = this.Length;

            const int buffer_length = 1024 * 1024 * 128;

            while (length != 0)
            {
                int cur_length = buffer_length;

                if (cur_length > length)
                {
                    cur_length = length;
                    length     = 0;
                }
                else
                {
                    length -= cur_length;
                }

                byte[] buffer = memoryHelper.ReadMemory(address, (int)cur_length);

                memoryHelper.CompareWithMemoryBufferPointerScanner(processManager, buffer, pointerList, address);

                address += (ulong)cur_length;
            }
        }