Files
BinaryObjectScanner/BurnOutSharp/ProtectionType/OnlineRegistration.cs

27 lines
897 B
C#
Raw Normal View History

using System;
using BurnOutSharp.ExecutableType.Microsoft.PE;
2022-05-01 17:41:50 -07:00
using BurnOutSharp.Interfaces;
2021-08-25 15:09:42 -07:00
using BurnOutSharp.Tools;
2021-03-21 22:19:38 -07:00
namespace BurnOutSharp.ProtectionType
2021-03-20 13:29:46 -07:00
{
2022-05-01 17:17:15 -07:00
public class OnlineRegistration : IPortableExecutableCheck
2021-03-20 13:29:46 -07:00
{
/// <inheritdoc/>
2022-05-01 17:17:15 -07:00
public string CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
{
// Get the sections from the executable, if possible
var sections = pex?.SectionTable;
if (sections == null)
return null;
// TODO: Is this too broad in general?
2022-04-02 16:12:23 -07:00
string name = pex.InternalName;
if (!string.IsNullOrWhiteSpace(name) && name.StartsWith("EReg", StringComparison.OrdinalIgnoreCase))
2022-04-01 10:16:31 -07:00
return $"Executable-Based Online Registration {Utilities.GetInternalVersion(pex)}";
return null;
}
2021-03-20 13:29:46 -07:00
}
}