Update FormDiff.cs

This commit is contained in:
0x10 2019-01-30 10:40:36 +08:00 committed by GitHub
parent 508772db4e
commit 1e1fcd984d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,6 +104,7 @@ namespace MifareOneTool
private string Compare() private string Compare()
{ {
StringBuilder stb = new StringBuilder(); StringBuilder stb = new StringBuilder();
int diffCount = 0;
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
{ {
stb.AppendLine("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"); stb.AppendLine("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
@ -121,10 +122,14 @@ namespace MifareOneTool
stb.AppendLine("A: " + Utils.Hex2StrS(sa.Sectors[i].Block[a])); stb.AppendLine("A: " + Utils.Hex2StrS(sa.Sectors[i].Block[a]));
stb.AppendLine("B: " + Utils.Hex2StrS(sb.Sectors[i].Block[a])); stb.AppendLine("B: " + Utils.Hex2StrS(sb.Sectors[i].Block[a]));
stb.AppendLine(" " + res); stb.AppendLine(" " + res);
if(res.Contains("##"))
{
diffCount++;
}
} }
} }
return stb.ToString(); return "共找到 " + diffCount.ToString() + " 处不同\n" + stb.ToString();
} }
} }
} }