private void ProcessListView_MouseDoubleClick(object sender, MouseEventArgs e) { Int32.TryParse(DataBox.Text, out _dataSize); if (_dataSize == 0) { _dataSize = 4; } if (hasValue) { if (!Int32.TryParse(StartValueBox.Text, out _searchValue)) { MessageBox.Show("Failed to Parse Search Value"); return; } } else { _searchValue = 0; } this.Cursor = Cursors.WaitCursor; PID = (int)ProcessListView.SelectedItems[0].Tag; if (hasValue) { MemoryScan.ConditionalScan((ulong)PID, _dataSize, (UInt32)_searchValue); } else { MemoryScan.UnconditionalScan((ulong)PID, _dataSize); } MainTabControl.SelectTab(1); SearchInitialized = true; PopulateMatches(); this.Cursor = Cursors.Default; }
private void EditValueBtn_Click(object sender, EventArgs e) { if (UInt32.TryParse(EditValueBox.Text, out val)) { if (_validAddress) { if (MemoryScan.WriteAddress(addr, val)) { PopulateMatches(); } else { MessageBox.Show("Failed to Write to Memory"); } } else { MessageBox.Show("Enter A Valid Address"); } } else { MessageBox.Show("Enter A Valid Value"); } }
private void PopulateMatches() { Matches.Clear(); int MC = MemoryScan.MatchCount(); MatchNumLB.Text = MC.ToString(); IntPtr MatchRes = MemoryScan.MatchResult(); if (MatchRes == IntPtr.Zero) { MessageBox.Show("Failed to allocate Memory"); return; } MemoryInfoList.Items.Clear(); for (int I = 0; I < MC; I++) { int MISS = Marshal.SizeOf(typeof(MEMINFO)); Matches.Add((MEMINFO)Marshal.PtrToStructure(MatchRes, typeof(MEMINFO))); MatchRes = IntPtr.Add(MatchRes, MISS); if (I < 100) { ListViewItem LVI = new ListViewItem(I.ToString()); LVI.SubItems.Add("0x" + Matches[I].addr.ToString("X")); LVI.SubItems.Add(Matches[I].val.ToString()); LVI.Tag = Matches[I].addr; MemoryInfoList.Items.Add(LVI); MatchIndex = I; } } MemoryScan.Free_Returned_Matches(); }
private void SpecificBTN_Click(object sender, EventArgs e) { if (UInt32.TryParse(SpecificTextBox.Text, out val)) { MemoryScan.ConditionEquals(val); PopulateMatches(); } }
private void GreaterThanBtn_Click(object sender, EventArgs e) { if (UInt32.TryParse(BetweenBox.Text, out val)) { MemoryScan.GreaterThan(val); PopulateMatches(); } }
private void DecreasedbyBTN_Click(object sender, EventArgs e) { if (UInt32.TryParse(ChangedbyBox.Text, out val)) { MemoryScan.DecreasedBy(val); PopulateMatches(); } }
private void MainTabControl_Selecting(object sender, TabControlCancelEventArgs e) { TabPage Current = (sender as TabControl).SelectedTab; if (Current == MainTabControl.Controls[0]) { DialogResult dialogResult = MessageBox.Show("Changing Tabs Will Lose Current Results, Proceed to Change Tab?", "Data Loss Prevention", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { MemoryScan.Free_Scan(); } else { e.Cancel = true; } } }
private void RemainedBtn_Click(object sender, EventArgs e) { MemoryScan.Remained(); PopulateMatches(); }
private void ChangedButton_Click(object sender, EventArgs e) { MemoryScan.Changed(); PopulateMatches(); }
private void DecreaseButton_Click(object sender, EventArgs e) { MemoryScan.Decreased(); PopulateMatches(); }