Fix a couple things:

- Fix PECompact 2 version string
- Fix UPX (NOS Variant) over-matching
This commit is contained in:
Matt Nadareski
2021-03-21 23:14:37 -07:00
parent bb4f16d91f
commit ea022de022
2 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ namespace BurnOutSharp.PackerType
new Matcher(new byte?[] { 0x70, 0x65, 0x63, 0x31 }, "PE Compact 1"),
// PEC2
new Matcher(new byte?[] { 0x50, 0x45, 0x43, 0x32 }, GetVersion, "PE Compact 2 v"),
new Matcher(new byte?[] { 0x50, 0x45, 0x43, 0x32 }, GetVersion, "PE Compact 2"),
// PECompact2
new Matcher(new byte?[]
@@ -32,7 +32,7 @@ namespace BurnOutSharp.PackerType
public static string GetVersion(string file, byte[] fileContent, int position)
{
return BitConverter.ToInt16(fileContent, position + 4).ToString();
return $"v{BitConverter.ToInt16(fileContent, position + 4)}";
}
}
}

View File

@@ -14,8 +14,8 @@ namespace BurnOutSharp.PackerType
// UPX!
new Matcher(new byte?[] { 0x55, 0x50, 0x58, 0x21 }, GetVersion, "Inno Setup"),
// NOS
new Matcher(new byte?[] { 0x4E, 0x4F, 0x53 }, GetVersion, "UPX (NOS Variant)"),
// NOS
new Matcher(new byte?[] { 0x4E, 0x4F, 0x53, 0x20 }, GetVersion, "UPX (NOS Variant)"),
new Matcher(
new List<byte?[]>