private void SaveButton_Click(object sender, EventArgs e) { if (AddressListDataGrid.Items.Count <= 0) { MessageBox.Show("There isn't any data in the address box!", "Oops!", MessageBoxButton.OK, MessageBoxImage.Warning); return; } SaveFileDialog saveDialog = new SaveFileDialog(); saveDialog.Filter = "MemSearch Binaries (*.msearch)|*.msearch|All files (*.*)|*.*"; saveDialog.FilterIndex = 1; saveDialog.RestoreDirectory = true; if (!saveDialog.ShowDialog().Value) { return; } List <SearchEntry> saveList = new List <SearchEntry>(); foreach (SearchEntry a in AddressListDataGrid.Items) { saveList.Add(a); } SearchLoader.SaveFile(saveDialog.FileName, saveList, SelectedProcess.GetProcess().ProcessName); }
private void SearchThread() { Searching = true; ReadPercentage = 0.0f; BytesRead = 0; TargetSize = 0; MemorySearchResult result = new MemorySearchResult(); List <MemorySegmentInfo> segments = TargetProcess.EnumerateSegments((UInt64)TargetProcess.GetProcess().MainModule.BaseAddress, TargetProcess.GetProcess().MainModule.ModuleMemorySize); foreach (MemorySegmentInfo ms in segments) { TargetSize += (UInt64)ms.SegmentSize; } foreach (MemorySegmentInfo ms in segments) { SearchRegion(ms.SegmentStart, ms.SegmentStart + ms.SegmentSize, ref result); } LastResult = result; Searching = false; ThreadSemaphore.Release(); }
public void SetSelectedProcess(MemoryProcess memProc) { if (!memProc.IsOpen()) { MessageBox.Show("Selected process is closed or inaccessible!", "Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } SelectedProcess = memProc; SelectedProcessLabel.Content = memProc.GetProcess().ProcessName; Searcher.SelectProcess(memProc); EnableControls(true); }