2019-09-27 23:52:24 -07:00
|
|
|
|
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
|
2019-09-27 23:52:24 -07:00
|
|
|
|
{
|
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)
|
2019-09-27 23:52:24 -07:00
|
|
|
|
{
|
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)))
|
2019-09-27 23:52:24 -07:00
|
|
|
|
{
|
2021-03-19 15:41:49 -07:00
|
|
|
|
return "ByteShield";
|
2019-09-27 23:52:24 -07:00
|
|
|
|
}
|
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))
|
2019-09-27 23:52:24 -07:00
|
|
|
|
{
|
2021-03-19 15:41:49 -07:00
|
|
|
|
return "ByteShield";
|
2019-09-27 23:52:24 -07:00
|
|
|
|
}
|
2021-03-19 15:41:49 -07:00
|
|
|
|
|
2019-09-27 23:52:24 -07:00
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|