mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-14 05:36:07 +00:00
35 lines
922 B
C#
35 lines
922 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
{
|
|
public class CopyKiller
|
|
{
|
|
public static string CheckContents(string fileContent)
|
|
{
|
|
if (fileContent.Contains("Tom Commander"))
|
|
return "CopyKiller";
|
|
|
|
return null;
|
|
}
|
|
|
|
public static string CheckPath(string path, IEnumerable<string> files, bool isDirectory)
|
|
{
|
|
if (isDirectory)
|
|
{
|
|
if (files.Count(f => Path.GetFileName(f).Equals("Autorun.dat", StringComparison.OrdinalIgnoreCase)) > 0)
|
|
return "CopyKiller";
|
|
}
|
|
else
|
|
{
|
|
if (Path.GetFileName(path).Equals("Autorun.dat", StringComparison.OrdinalIgnoreCase))
|
|
return "CopyKiller";
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|