Else-If causes some issues

This commit is contained in:
Matt Nadareski
2019-09-28 01:51:06 -07:00
parent c109aceb24
commit ca0d695470
12 changed files with 71 additions and 78 deletions

View File

@@ -7,6 +7,31 @@ namespace BurnOutSharp.ProtectionType
{
public class SafeDisc
{
public static string CheckContents(string file, string fileContent)
{
int position;
if ((position = fileContent.IndexOf("BoG_ *90.0&!! Yy>")) > -1)
{
if (fileContent.IndexOf("product activation library") > 0)
return "SafeCast " + GetVersion(file, position);
else
return "SafeDisc " + GetVersion(file, position);
}
if (fileContent.Contains((char)0x00 + (char)0x00 + "BoG_")
|| fileContent.Contains("stxt774")
|| fileContent.Contains("stxt371"))
{
string version = EVORE.SearchSafeDiscVersion(file);
if (version.Length > 0)
return "SafeDisc " + version;
return "SafeDisc 3.20-4.xx (version removed)";
}
return null;
}
public static string CheckPath(string path, IEnumerable<string> files, bool isDirectory)
{
if (isDirectory)
@@ -70,31 +95,6 @@ namespace BurnOutSharp.ProtectionType
return null;
}
public static string CheckContents(string file, string fileContent)
{
int position;
if ((position = fileContent.IndexOf("BoG_ *90.0&!! Yy>")) > -1)
{
if (fileContent.IndexOf("product activation library") > 0)
return "SafeCast " + GetVersion(file, position);
else
return "SafeDisc " + GetVersion(file, position);
}
if (fileContent.Contains((char)0x00 + (char)0x00 + "BoG_")
|| fileContent.Contains("stxt774")
|| fileContent.Contains("stxt371"))
{
string version = EVORE.SearchSafeDiscVersion(file);
if (version.Length > 0)
return "SafeDisc " + version;
return "SafeDisc 3.20-4.xx (version removed)";
}
return null;
}
private static string GetDPlayerXVersion(string file)
{
FileInfo fi = new FileInfo(file);