mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-11 19:36:48 +00:00
Add support for Intel Installation Framework detection (#57)
* Add support for Intel Installation Framework detection * Address reviews
This commit is contained in:
32
BurnOutSharp/PackerType/IntelInstallationFramework.cs
Normal file
32
BurnOutSharp/PackerType/IntelInstallationFramework.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
|
||||
namespace BurnOutSharp.PackerType
|
||||
{
|
||||
// TODO: Add extraction, seems to primarily use MSZip compression.
|
||||
public class IntelInstallationFramework : IContentCheck
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
var fvinfo = Utilities.GetFileVersionInfo(file);
|
||||
|
||||
string name = fvinfo?.FileDescription.Trim();
|
||||
if (!string.IsNullOrWhiteSpace(name)
|
||||
&& (name.Equals("Intel(R) Installation Framework", StringComparison.OrdinalIgnoreCase)
|
||||
|| name.Equals("Intel Installation Framework", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
return $"Intel Installation Framework {Utilities.GetFileVersion(file)}";
|
||||
}
|
||||
|
||||
name = fvinfo?.ProductName.Trim();
|
||||
if (!string.IsNullOrWhiteSpace(name)
|
||||
&& (name.Equals("Intel(R) Installation Framework", StringComparison.OrdinalIgnoreCase)
|
||||
|| name.Equals("Intel Installation Framework", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
return $"Intel Installation Framework {Utilities.GetFileVersion(file)}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user