Reduce StarForce over-matching check

This commit is contained in:
Matt Nadareski
2021-08-27 21:12:09 -07:00
parent 15e5feafef
commit 451cb04714

View File

@@ -134,14 +134,16 @@ namespace BurnOutSharp.ProtectionType
/// <inheritdoc/>
public string CheckFilePath(string path)
{
var matchers = new List<PathMatchSet>
{
// 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<PathMatchSet>
// {
// // 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<int> positions)