mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-10 02:46:55 +00:00
Reduce content check boilerplate
This commit is contained in:
@@ -15,10 +15,6 @@ namespace BinaryObjectScanner.Packer
|
||||
/// <inheritdoc/>
|
||||
public string? CheckContents(string file, byte[] fileContent, bool includeDebug)
|
||||
{
|
||||
// Only allow during debug
|
||||
if (!includeDebug)
|
||||
return null;
|
||||
|
||||
// TODO: Obtain a sample to find where this string is in a typical executable
|
||||
var contentMatchSets = new List<ContentMatchSet>
|
||||
{
|
||||
|
||||
@@ -13,10 +13,6 @@ namespace BinaryObjectScanner.Protection
|
||||
/// <inheritdoc/>
|
||||
public string? CheckContents(string file, byte[] fileContent, bool includeDebug)
|
||||
{
|
||||
// Only allow during debug
|
||||
if (!includeDebug)
|
||||
return null;
|
||||
|
||||
// TODO: Obtain a sample to find where this string is in a typical executable
|
||||
var contentMatchSets = new List<ContentMatchSet>
|
||||
{
|
||||
|
||||
@@ -71,10 +71,6 @@ namespace BinaryObjectScanner.Protection
|
||||
/// <inheritdoc/>
|
||||
public string? CheckContents(string file, byte[] fileContent, bool includeDebug)
|
||||
{
|
||||
// Only allow during debug
|
||||
if (!includeDebug)
|
||||
return null;
|
||||
|
||||
// TODO: Obtain a sample to find where this string is in a typical executable
|
||||
var contentMatchSets = new List<ContentMatchSet>
|
||||
{
|
||||
|
||||
@@ -10,10 +10,6 @@ namespace BinaryObjectScanner.Protection
|
||||
/// <inheritdoc/>
|
||||
public string? CheckContents(string file, byte[] fileContent, bool includeDebug)
|
||||
{
|
||||
// Only allow during debug
|
||||
if (!includeDebug)
|
||||
return null;
|
||||
|
||||
// TODO: Limit these checks to Mac binaries
|
||||
// TODO: Obtain a sample to find where this string is in a typical executable
|
||||
var contentMatchSets = new List<ContentMatchSet>
|
||||
|
||||
@@ -10,10 +10,6 @@ namespace BinaryObjectScanner.Protection
|
||||
/// <inheritdoc/>
|
||||
public string? CheckContents(string file, byte[] fileContent, bool includeDebug)
|
||||
{
|
||||
// Only allow during debug
|
||||
if (!includeDebug)
|
||||
return null;
|
||||
|
||||
// TODO: Obtain a sample to find where this string is in a typical executable
|
||||
var contentMatchSets = new List<ContentMatchSet>
|
||||
{
|
||||
|
||||
@@ -13,10 +13,6 @@ namespace BinaryObjectScanner.Protection
|
||||
/// <inheritdoc/>
|
||||
public string? CheckContents(string file, byte[] fileContent, bool includeDebug)
|
||||
{
|
||||
// Only allow during debug
|
||||
if (!includeDebug)
|
||||
return null;
|
||||
|
||||
// TODO: Obtain a sample to find where this string is in a typical executable
|
||||
var contentMatchSets = new List<ContentMatchSet>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user