Skip to content

Commit

Permalink
v2.1
Browse files Browse the repository at this point in the history
- Changed how the difference is detected when comparing bytes, it now takes into account ? characters
- Made the byte length 8 by default.
  • Loading branch information
ItsBranK committed Jul 6, 2021
1 parent 2dbe9cb commit 957865e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MainFrm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 23 additions & 3 deletions MainFrm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public partial class MainFrm : Form
string CurrentDifferenceAOB;
string CurrentHex;

enum OutputModes : UInt32
enum OutputModes : byte
{
MODE_HEX = 1,
MODE_HEX_ESCAPED = 2,
Expand Down Expand Up @@ -130,7 +130,7 @@ string CompareBytes(string inputAOB, string compareAOB)
result = result.Remove(result.Length - 1);
}

if (compareAOB != result)
if (DifferenceBox.Text != result)
{
StatusLbl.Text = "Difference detected, it is recommended you repeat multiple times!";
StatusLbl.ForeColor = RedColor;
Expand Down Expand Up @@ -379,9 +379,29 @@ private void CompareBtn_Click(object sender, EventArgs e)
CurrentBaseAOB = FixSpacing(false, BaseBox.Text);
CurrentCompareAOB = FixSpacing(false, CompareBox.Text);
CurrentDifferenceAOB = CompareBytes(CurrentBaseAOB, CurrentCompareAOB);

if (CurrentBaseAOB != CurrentDifferenceAOB)
{
StatusLbl.Text = "Difference detected, it is recommended you repeat multiple times!";
StatusLbl.ForeColor = RedColor;
}
else
{
if (FirstScan)
{
StatusLbl.Text = "First scan detected, it is recommended you repeat multiple times!";
StatusLbl.ForeColor = OrangeColor;
FirstScan = false;
}
else
{
StatusLbl.Text = "No difference detected, array of bytes match!";
StatusLbl.ForeColor = GreenColor;
}
}

DifferenceBox.Text = FixSpacing(true, CurrentDifferenceAOB);
CurrentHex = CreateHex(CurrentDifferenceAOB);

HexBox.Text = FixSpacing(true, CurrentHex);

HexEscapedBox.Text = "\\x" + HexBox.Text;
Expand Down
4 changes: 2 additions & 2 deletions Signature Maker.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30128.74
# Visual Studio Version 17
VisualStudioVersion = 17.0.31423.177
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Signature Maker", "Signature Maker.csproj", "{3730EFDB-B35B-4407-A983-985E44A5C9EF}"
EndProject
Expand Down

0 comments on commit 957865e

Please sign in to comment.