mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-05-06 20:43:44 +00:00
Separate protections into their own classes
This commit is contained in:
33
BurnOutSharp/ProtectionType/Key2AudioXS.cs
Normal file
33
BurnOutSharp/ProtectionType/Key2AudioXS.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class Key2AudioXS
|
||||
{
|
||||
public static string CheckPath(string path, IEnumerable<string> files, bool isDirectory)
|
||||
{
|
||||
if (isDirectory)
|
||||
{
|
||||
// TODO: Verify if these are OR or AND
|
||||
if (files.Count(f => Path.GetFileName(f).Equals("SDKHM.EXE", StringComparison.OrdinalIgnoreCase)) > 0
|
||||
|| files.Count(f => Path.GetFileName(f).Equals("SDKHM.DLL", StringComparison.OrdinalIgnoreCase)) > 0)
|
||||
{
|
||||
return "Key2Audio XS";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Path.GetFileName(path).Equals("SDKHM.EXE", StringComparison.OrdinalIgnoreCase)
|
||||
|| Path.GetFileName(path).Equals("SDKHM.DLL", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "Key2Audio XS";
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user