From 451cb04714f1681fa310df75b67b4e20819b0b80 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 27 Aug 2021 21:12:09 -0700 Subject: [PATCH] Reduce StarForce over-matching check --- BurnOutSharp/ProtectionType/StarForce.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/BurnOutSharp/ProtectionType/StarForce.cs b/BurnOutSharp/ProtectionType/StarForce.cs index ee26e2f9..39f5014d 100644 --- a/BurnOutSharp/ProtectionType/StarForce.cs +++ b/BurnOutSharp/ProtectionType/StarForce.cs @@ -134,14 +134,16 @@ namespace BurnOutSharp.ProtectionType /// public string CheckFilePath(string path) { - var matchers = new List - { - // 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"), - }; + // These have too high of a chance of over-matching by themselves + // var matchers = new List + // { + // // 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"), + // }; - return MatchUtil.GetFirstMatch(path, matchers, any: true); + // return MatchUtil.GetFirstMatch(path, matchers, any: true); + return null; } public static string GetVersion(string file, byte[] fileContent, List positions)