Files
BinaryObjectScanner/BurnOutSharp/ProtectionType/ByteShield.cs

35 lines
1.0 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace BurnOutSharp.ProtectionType
{
2021-02-26 00:32:09 -08:00
public class ByteShield : IPathCheck
{
2021-02-26 00:32:09 -08:00
/// <inheritdoc/>
2021-03-19 15:41:49 -07:00
public string CheckDirectoryPath(string path, IEnumerable<string> files)
{
2021-03-19 15:41:49 -07:00
if (files.Any(f => Path.GetFileName(f).Equals("Byteshield.dll", StringComparison.OrdinalIgnoreCase))
|| files.Any(f => Path.GetExtension(f).Trim('.').Equals("bbz", StringComparison.OrdinalIgnoreCase)))
{
2021-03-19 15:41:49 -07:00
return "ByteShield";
}
2021-03-19 15:41:49 -07:00
return null;
}
/// <inheritdoc/>
public string CheckFilePath(string path)
{
if (Path.GetFileName(path).Equals("Byteshield.dll", StringComparison.OrdinalIgnoreCase)
|| Path.GetExtension(path).Trim('.').Equals("bbz", StringComparison.OrdinalIgnoreCase))
{
2021-03-19 15:41:49 -07:00
return "ByteShield";
}
2021-03-19 15:41:49 -07:00
return null;
}
}
}