mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-13 21:31:04 +00:00
39 lines
1.5 KiB
C#
39 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
{
|
|
public class HexalockAutoLock : IPathCheck
|
|
{
|
|
/// <inheritdoc/>
|
|
public string CheckPath(string path, bool isDirectory, IEnumerable<string> files)
|
|
{
|
|
if (isDirectory)
|
|
{
|
|
// TODO: Verify if these are OR or AND
|
|
if (files.Any(f => Path.GetFileName(f).Equals("Start_Here.exe", StringComparison.OrdinalIgnoreCase))
|
|
|| files.Any(f => Path.GetFileName(f).Equals("HCPSMng.exe", StringComparison.OrdinalIgnoreCase))
|
|
|| files.Any(f => Path.GetFileName(f).Equals("MFINT.DLL", StringComparison.OrdinalIgnoreCase))
|
|
|| files.Any(f => Path.GetFileName(f).Equals("MFIMP.DLL", StringComparison.OrdinalIgnoreCase)))
|
|
{
|
|
return "Hexalock AutoLock";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (Path.GetFileName(path).Equals("Start_Here.exe", StringComparison.OrdinalIgnoreCase)
|
|
|| Path.GetFileName(path).Equals("HCPSMng.exe", StringComparison.OrdinalIgnoreCase)
|
|
|| Path.GetFileName(path).Equals("MFINT.DLL", StringComparison.OrdinalIgnoreCase)
|
|
|| Path.GetFileName(path).Equals("MFIMP.DLL", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
return "Hexalock AutoLock";
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|