mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-25 00:04:57 +00:00
Cleanup and bugfixes; additional notes
This commit is contained in:
@@ -1,28 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BurnOutSharp.ExecutableType.Microsoft;
|
||||
using BurnOutSharp.Matching;
|
||||
|
||||
namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class ThreePLock : IContentCheck
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public List<ContentMatchSet> GetContentMatchSets() => null;
|
||||
// {
|
||||
// return new List<ContentMatchSet>
|
||||
// {
|
||||
// //This produced false positives in some DirectX 9.0c installer files
|
||||
// //"Y" + (char)0xC3 + "U" + (char)0x8B + (char)0xEC + (char)0x83 + (char)0xEC + "0SVW"
|
||||
// new ContentMatchSet(new byte?[]
|
||||
// {
|
||||
// 0x59, 0xC3, 0x55, 0x8B, 0xEC, 0x83, 0xEC, 0x30,
|
||||
// 0x53, 0x56, 0x57
|
||||
// }, "3PLock"),
|
||||
// };
|
||||
// }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
|
||||
{
|
||||
@@ -32,6 +15,9 @@ namespace BurnOutSharp.ProtectionType
|
||||
if (sections == null)
|
||||
return null;
|
||||
|
||||
//This produced false positives in some DirectX 9.0c installer files
|
||||
//"Y" + (char)0xC3 + "U" + (char)0x8B + (char)0xEC + (char)0x83 + (char)0xEC + "0SVW"
|
||||
|
||||
// Get the .ldr and .ldt sections, if they exist -- TODO: Confirm if both are needed or either/or is fine
|
||||
var cmsdSection = sections.FirstOrDefault(s => Encoding.ASCII.GetString(s.Name).StartsWith(".ldr"));
|
||||
var cmstSection = sections.FirstOrDefault(s => Encoding.ASCII.GetString(s.Name).StartsWith(".ldt"));
|
||||
|
||||
Reference in New Issue
Block a user