Clean up holdover logic

This commit is contained in:
Matt Nadareski
2025-11-06 13:43:49 -05:00
parent 5b0bf2e7e4
commit 466689dcbc
5 changed files with 6 additions and 8 deletions

View File

@@ -74,12 +74,10 @@ namespace BinaryObjectScanner.FileType
/// Handle a single file based on all executable check implementations
/// </summary>
/// <param name="file">Name of the source file of the executable, for tracking</param>
/// <param name="exe">Executable to scan</param>
/// <param name="checks">Set of checks to use</param>
/// <param name="scanner">Scanner for handling recursive protections</param>
/// <param name="includeDebug">True to include debug data, false otherwise</param>
/// <returns>Set of protections in file, empty on error</returns>
protected IDictionary<U, string> RunExecutableChecks<U>(string file, T exe, U[] checks, bool includeDebug)
protected IDictionary<U, string> RunExecutableChecks<U>(string file, U[] checks, bool includeDebug)
where U : IExecutableCheck<T>
{
// Create the output dictionary
@@ -89,7 +87,7 @@ namespace BinaryObjectScanner.FileType
checks.IterateWithAction(checkClass =>
{
// Get the protection for the class, if possible
var protection = checkClass.CheckExecutable(file, exe, includeDebug);
var protection = checkClass.CheckExecutable(file, _wrapper, includeDebug);
if (string.IsNullOrEmpty(protection))
return;

View File

@@ -27,7 +27,7 @@ namespace BinaryObjectScanner.FileType
// Standard checks
var subProtections
= RunExecutableChecks(file, _wrapper, StaticChecks.LinearExecutableCheckClasses, includeDebug);
= RunExecutableChecks(file, StaticChecks.LinearExecutableCheckClasses, includeDebug);
protections.Append(file, subProtections.Values);
// If there are no protections

View File

@@ -27,7 +27,7 @@ namespace BinaryObjectScanner.FileType
// Standard checks
var subProtections
= RunExecutableChecks(file, _wrapper, StaticChecks.MSDOSExecutableCheckClasses, includeDebug);
= RunExecutableChecks(file, StaticChecks.MSDOSExecutableCheckClasses, includeDebug);
protections.Append(file, subProtections.Values);
// If there are no protections

View File

@@ -27,7 +27,7 @@ namespace BinaryObjectScanner.FileType
// Standard checks
var subProtections
= RunExecutableChecks(file, _wrapper, StaticChecks.NewExecutableCheckClasses, includeDebug);
= RunExecutableChecks(file, StaticChecks.NewExecutableCheckClasses, includeDebug);
protections.Append(file, subProtections.Values);
// If there are no protections

View File

@@ -27,7 +27,7 @@ namespace BinaryObjectScanner.FileType
// Standard checks
var subProtections
= RunExecutableChecks(file, _wrapper, StaticChecks.PortableExecutableCheckClasses, includeDebug);
= RunExecutableChecks(file, StaticChecks.PortableExecutableCheckClasses, includeDebug);
protections.Append(file, subProtections.Values);
// If there are no protections