2021-08-29 21:40:25 -07:00
|
|
|
|
using System;
|
2022-03-14 10:40:44 -07:00
|
|
|
|
using BurnOutSharp.ExecutableType.Microsoft.NE;
|
|
|
|
|
|
using BurnOutSharp.ExecutableType.Microsoft.PE;
|
2021-08-25 15:09:42 -07:00
|
|
|
|
using BurnOutSharp.Tools;
|
2021-03-31 19:07:00 -07:00
|
|
|
|
|
|
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
|
|
|
|
{
|
|
|
|
|
|
public class CDKey : IContentCheck
|
|
|
|
|
|
{
|
2021-08-25 19:37:32 -07:00
|
|
|
|
/// <inheritdoc/>
|
2021-09-10 16:10:15 -07:00
|
|
|
|
public string CheckContents(string file, byte[] fileContent, bool includeDebug, PortableExecutable pex, NewExecutable nex)
|
2021-08-29 21:40:25 -07:00
|
|
|
|
{
|
2021-08-30 14:24:16 -07:00
|
|
|
|
// Get the sections from the executable, if possible
|
|
|
|
|
|
var sections = pex?.SectionTable;
|
|
|
|
|
|
if (sections == null)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
2021-09-10 13:51:32 -07:00
|
|
|
|
string name = Utilities.GetInternalName(pex);
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(name) && name.Equals("CDKey", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
return "CD-Key / Serial";
|
2021-08-30 14:24:16 -07:00
|
|
|
|
|
2021-08-29 21:40:25 -07:00
|
|
|
|
return null;
|
|
|
|
|
|
}
|
2021-03-31 19:07:00 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|