From 88d26d4f440e9847a35a2d759ea426b7393e7442 Mon Sep 17 00:00:00 2001 From: Takumi4685 Date: Mon, 23 Dec 2019 09:54:08 +0900 Subject: [PATCH] v0.04 --- PointerSearcher.sln | 7 +++ PointerSearcher/Form1.Designer.cs | 2 +- PointerSearcher/Form1.cs | 14 +++--- PointerSearcher/NoexsDumpDataReader.cs | 2 +- PointerSearcher/PointerSearcher.csproj | 66 ++++++++++++++++++++++++++ readme.md | 9 +++- 6 files changed, 90 insertions(+), 10 deletions(-) diff --git a/PointerSearcher.sln b/PointerSearcher.sln index 4a641b8..df25d23 100644 --- a/PointerSearcher.sln +++ b/PointerSearcher.sln @@ -8,13 +8,20 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Debug|x64.ActiveCfg = Debug|x64 + {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Debug|x64.Build.0 = Debug|x64 + {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Debug|x64.Build.2 = Release64bit|x64 {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Release|Any CPU.ActiveCfg = Release|Any CPU {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Release|Any CPU.Build.0 = Release|Any CPU + {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Release|x64.ActiveCfg = Release|x64 + {47E47974-1D5F-40EB-87ED-4BF3AFA8D4BE}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PointerSearcher/Form1.Designer.cs b/PointerSearcher/Form1.Designer.cs index 76808b3..9ce1fbf 100644 --- a/PointerSearcher/Form1.Designer.cs +++ b/PointerSearcher/Form1.Designer.cs @@ -228,7 +228,7 @@ private void InitializeComponent() this.Controls.Add(this.textBox1); this.Controls.Add(this.buttonRead); this.Name = "Form1"; - this.Text = "PointerSearcher 0.03"; + this.Text = "PointerSearcher 0.04"; ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/PointerSearcher/Form1.cs b/PointerSearcher/Form1.cs index a9b4aac..0610e1b 100644 --- a/PointerSearcher/Form1.cs +++ b/PointerSearcher/Form1.cs @@ -41,7 +41,7 @@ private async void buttonRead_Click(object sender, EventArgs e) buttonRead.Enabled = false; - IDumpDataReader reader = CreateDumpDataReader(dataGridView1.Rows[0],false); + IDumpDataReader reader = CreateDumpDataReader(dataGridView1.Rows[0], false); if (reader == null) { throw new Exception("Invalid input" + Environment.NewLine + "Check highlighted cell"); @@ -60,7 +60,7 @@ private async void buttonRead_Click(object sender, EventArgs e) buttonSearch.Enabled = true; } - catch (System.OperationCanceledException ex) + catch (System.OperationCanceledException) { SetProgressBar(0); System.Media.SystemSounds.Asterisk.Play(); @@ -127,7 +127,7 @@ await Task.Run(() => buttonNarrowDown.Enabled = true; } } - catch (System.OperationCanceledException ex) + catch (System.OperationCanceledException) { SetProgressBar(0); System.Media.SystemSounds.Asterisk.Play(); @@ -204,7 +204,7 @@ private async void buttonNarrowDown_Click(object sender, EventArgs e) { continue; } - IDumpDataReader reader = CreateDumpDataReader(row,true); + IDumpDataReader reader = CreateDumpDataReader(row, true); if (reader != null) { long target = Convert.ToInt64(row.Cells[5].Value.ToString(), 16); @@ -231,7 +231,7 @@ private async void buttonNarrowDown_Click(object sender, EventArgs e) SetProgressBar(100); System.Media.SystemSounds.Asterisk.Play(); } - catch (System.OperationCanceledException ex) + catch (System.OperationCanceledException) { SetProgressBar(0); System.Media.SystemSounds.Asterisk.Play(); @@ -277,7 +277,7 @@ private void ClearRowBackColor(DataGridViewRow row) row.Cells[i].Style.BackColor = Color.White; } } - private IDumpDataReader CreateDumpDataReader(DataGridViewRow row,bool allowUnknownTarget) + private IDumpDataReader CreateDumpDataReader(DataGridViewRow row, bool allowUnknownTarget) { bool canCreate = true; String path = ""; @@ -370,7 +370,7 @@ private IDumpDataReader CreateDumpDataReader(DataGridViewRow row,bool allowUnkno row.Cells[4].Style.BackColor = Color.Red; canCreate = false; } - if(allowUnknownTarget && (target == 0)) + if (allowUnknownTarget && (target == 0)) { //if target address is set to 0,it means unknown address. } diff --git a/PointerSearcher/NoexsDumpDataReader.cs b/PointerSearcher/NoexsDumpDataReader.cs index b566f70..1ac1879 100644 --- a/PointerSearcher/NoexsDumpDataReader.cs +++ b/PointerSearcher/NoexsDumpDataReader.cs @@ -121,7 +121,7 @@ private Int64 ReadLittleEndianInt64(long address) private void ReadIndicate() { - if(indices != null) + if (indices != null) { //if already read indices,skip reading return; diff --git a/PointerSearcher/PointerSearcher.csproj b/PointerSearcher/PointerSearcher.csproj index e724874..01daf68 100644 --- a/PointerSearcher/PointerSearcher.csproj +++ b/PointerSearcher/PointerSearcher.csproj @@ -32,6 +32,72 @@ prompt 4 + + bin\Release64bit\ + TRACE + true + pdbonly + AnyCPU + 7.3 + prompt + MinimumRecommendedRules.ruleset + true + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x64\Release64bit\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\Release x64\ + TRACE + true + pdbonly + AnyCPU + 7.3 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x64\Release x64\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + true + diff --git a/readme.md b/readme.md index f79400c..801f6e7 100644 --- a/readme.md +++ b/readme.md @@ -26,7 +26,9 @@ For example,If Offset Num=1,you will find`[[main+B000]+10]+100` in the case belo And if Offset Num=2,you will find`[[main+A000]+20]+200` in addition ![num](https://user-images.githubusercontent.com/59052622/71303971-1b50bf80-2403-11ea-87f0-478df77e75c7.png) calculating cost will be O(NN*D) (D:Max Depth,N:Offset Num) -1. If too many results,get another dump data and fill out 2nd and subsequent row,select `Narrow Down Result` +1. If too many results,get another dump data and fill out 2nd and subsequent row,select `Narrow Down Result` +If narrow down results with target address 0,tool only checks if pointer code can reaches heap region +If narrow down results with target address not 0,tool checks if pointer code can reaches target address # link * tutorial(Japanese) @@ -37,6 +39,11 @@ https://zit866.hatenablog.com/entry/2019/12/17/012933 * ZiT866 : thanks to making tutorial. # change log +*v0.04* +[improve]change offset expression at least 2 digits to avoid noexs exception +[improve]support narrow down results with target address 0 to only checks if pointer code can reaches heap region +[improve]narrowing down results become faster + *v0.03* [bugfix]actual search depth was MaxDepth+1 by mistake [improve]change UI to show progress