From 9e21c28e524121506253dbd9ff80f8b8704b6c53 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 17 Jul 2021 21:11:38 -0700 Subject: [PATCH] Temporary fix for StarForce directory scan --- BurnOutSharp/ProtectionType/StarForce.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BurnOutSharp/ProtectionType/StarForce.cs b/BurnOutSharp/ProtectionType/StarForce.cs index b8c68fef..97f9a34e 100644 --- a/BurnOutSharp/ProtectionType/StarForce.cs +++ b/BurnOutSharp/ProtectionType/StarForce.cs @@ -136,11 +136,14 @@ namespace BurnOutSharp.ProtectionType { var matchers = new List { - new PathMatchSet(new PathMatch("protect.dll", useEndsWith: true), "StarForce"), - new PathMatchSet(new PathMatch("protect.exe", useEndsWith: true), "StarForce"), + // TODO: Re-consolidate these once path matching is improved + new PathMatchSet(new PathMatch("/protect.dll", useEndsWith: true), "StarForce"), + new PathMatchSet(new PathMatch("/protect.exe", useEndsWith: true), "StarForce"), + new PathMatchSet(new PathMatch("\\protect.dll", useEndsWith: true), "StarForce"), + new PathMatchSet(new PathMatch("\\protect.exe", useEndsWith: true), "StarForce"), }; - return MatchUtil.GetFirstMatch(path, matchers, any: false); + return MatchUtil.GetFirstMatch(path, matchers, any: true); } public static string GetVersion(string file, byte[] fileContent, List positions)