mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Add option for including packers in scan
This commit is contained in:
@@ -248,38 +248,42 @@ namespace BurnOutSharp.FileType
|
||||
|
||||
#endregion
|
||||
|
||||
// These are detected as protections until we can unpack them
|
||||
#region Packers
|
||||
|
||||
// Armadillo
|
||||
protection = Armadillo.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
// If we're looking for packers too, run scans
|
||||
if (scanner.IncludePackers)
|
||||
{
|
||||
|
||||
// dotFuscator
|
||||
protection = dotFuscator.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
// Armadillo
|
||||
protection = Armadillo.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
|
||||
// EXE Stealth
|
||||
protection = EXEStealth.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
// dotFuscator
|
||||
protection = dotFuscator.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
|
||||
// NSIS
|
||||
protection = NSIS.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
// EXE Stealth
|
||||
protection = EXEStealth.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
|
||||
// PE Compact
|
||||
protection = PECompact.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
// NSIS
|
||||
protection = NSIS.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
|
||||
// UPX
|
||||
protection = UPX.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
// PE Compact
|
||||
protection = PECompact.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
|
||||
// UPX
|
||||
protection = UPX.CheckContents(fileContent, scanner.IncludePosition);
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
Utilities.AppendToDictionary(protections, file, protection);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -31,6 +31,11 @@ namespace BurnOutSharp
|
||||
/// </summary>
|
||||
public bool ScanArchives { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Determines if packers are counted as detected protections or not
|
||||
/// </summary>
|
||||
public bool IncludePackers { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace Test
|
||||
IncludePosition = true,
|
||||
ScanAllFiles = false,
|
||||
ScanArchives = true,
|
||||
IncludePackers = true,
|
||||
};
|
||||
|
||||
foreach (string arg in args)
|
||||
|
||||
Reference in New Issue
Block a user