Executable is not inherently extractable

This commit is contained in:
Matt Nadareski
2023-03-15 15:53:24 -04:00
parent a85c6f4028
commit e920bfc69c
3 changed files with 4 additions and 35 deletions

View File

@@ -38,7 +38,6 @@ namespace BurnOutSharp
case SupportedFileType.BZip2: return new BinaryObjectScanner.FileType.BZip2();
case SupportedFileType.CFB: return new BinaryObjectScanner.FileType.CFB();
//case SupportedFileType.CIA: return new BinaryObjectScanner.FileType.CIA();
case SupportedFileType.Executable: return new BinaryObjectScanner.FileType.Executable();
case SupportedFileType.GCF: return new BinaryObjectScanner.FileType.GCF();
case SupportedFileType.GZIP: return new BinaryObjectScanner.FileType.GZIP();
case SupportedFileType.InstallShieldArchiveV3: return new BinaryObjectScanner.FileType.InstallShieldArchiveV3();

View File

@@ -298,16 +298,9 @@ namespace BurnOutSharp
if (detectable != null && ScanContents)
{
// If we have an executable, it needs to bypass normal handling
// TODO: Write custom executable handling
if (detectable is Executable executable)
{
executable.IncludePackers = ScanPackers;
// TODO: Enable this after IExtractable is properly implemented for Executable
//var subProtections = Handler.HandleDetectable(executable, fileName, stream, IncludeDebug);
//if (subProtections != null)
// AppendToDictionary(protections, fileName, subProtections);
var subProtections = ProcessExecutable(executable, fileName, stream);
if (subProtections != null)
AppendToDictionary(protections, subProtections);
@@ -347,13 +340,9 @@ namespace BurnOutSharp
// If we're scanning archives
if (extractable != null && ScanArchives)
{
// We only want to process non-executables
if (!(extractable is Executable))
{
var subProtections = Handler.HandleExtractable(extractable, fileName, stream, this);
if (subProtections != null)
AppendToDictionary(protections, subProtections);
}
var subProtections = Handler.HandleExtractable(extractable, fileName, stream, this);
if (subProtections != null)
AppendToDictionary(protections, subProtections);
}
#endregion