mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-17 06:14:59 +00:00
Split out generic online registration
This commit is contained in:
@@ -38,13 +38,7 @@
|
||||
check = new byte[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x43, 0x00, 0x44, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00 };
|
||||
if (fileContent.Contains(check, out position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// TODO: Figure out a better variant of this that doesn't over-match
|
||||
// I + (char)0x00 + n + (char)0x00 + t + (char)0x00 + e + (char)0x00 + r + (char)0x00 + n + (char)0x00 + a + (char)0x00 + l + (char)0x00 + N + (char)0x00 + a + (char)0x00 + m + (char)0x00 + e + (char)0x00 + + (char)0x00 + + (char)0x00 + E + (char)0x00 + R + (char)0x00 + e + (char)0x00 + g + (char)0x00
|
||||
// check = new byte[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x45, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00 };
|
||||
// if (fileContent.Contains(check, out position))
|
||||
// return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
// EReg Config Form
|
||||
check = new byte[] { 0x45, 0x52, 0x65, 0x67, 0x20, 0x43, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x20, 0x46, 0x6F, 0x72, 0x6D };
|
||||
if (fileContent.Contains(check, out position))
|
||||
|
||||
16
BurnOutSharp/ProtectionType/OnlineRegistration.cs
Normal file
16
BurnOutSharp/ProtectionType/OnlineRegistration.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class OnlineRegistration : IContentCheck
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// I + (char)0x00 + n + (char)0x00 + t + (char)0x00 + e + (char)0x00 + r + (char)0x00 + n + (char)0x00 + a + (char)0x00 + l + (char)0x00 + N + (char)0x00 + a + (char)0x00 + m + (char)0x00 + e + (char)0x00 + + (char)0x00 + + (char)0x00 + E + (char)0x00 + R + (char)0x00 + e + (char)0x00 + g + (char)0x00
|
||||
byte[] check = new byte[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x45, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00 };
|
||||
if (fileContent.Contains(check, out int position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,8 @@ Below is a list of the protections that can be detected using this code:
|
||||
- EA Protections (Including ~~Cucko~~, EA CDKey, and EA DRM)
|
||||
- Freelock
|
||||
- Games for Windows - Live (partial)
|
||||
- Generic CD Check
|
||||
- Generic Online Registration
|
||||
- Hexalock Autolock
|
||||
- Impulse Reactor
|
||||
- IndyVCD
|
||||
|
||||
Reference in New Issue
Block a user