Skip to content

Commit 6a5afd8

Browse files
committed
Another round of cleanup and normalization
1 parent 0afd189 commit 6a5afd8

13 files changed

+38
-19
lines changed

BinaryObjectScanner/Packer/AutoPlayMediaStudio.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ public class AutoPlayMediaStudio : IExecutableCheck<PortableExecutable>
1212
/// <inheritdoc/>
1313
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1414
{
15-
// Known to detect versions 5.0.0.3 - 8.1.0.0
1615
string? name = exe.ProductName;
16+
17+
// Known to detect versions 5.0.0.3 - 8.1.0.0
1718
if (name.OptionalStartsWith("AutoPlay Media Studio", StringComparison.OrdinalIgnoreCase))
1819
return $"AutoPlay Media Studio {GetVersion(exe)}";
1920

BinaryObjectScanner/Packer/GPInstall.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ public class GPInstall : IExecutableCheck<PortableExecutable>
1111
/// <inheritdoc/>
1212
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1313
{
14-
// <see href="https://www.virustotal.com/gui/file/0e0a93cba8163cef9c979cbb49a6f15604956b9441aba6fb9e9f0c6897cc73ed/details"/>
1514
string? name = exe.FileDescription;
15+
16+
// <see href="https://www.virustotal.com/gui/file/0e0a93cba8163cef9c979cbb49a6f15604956b9441aba6fb9e9f0c6897cc73ed/details"/>
1617
if (name.OptionalContains("GP-Install"))
1718
return "GP-Install";
1819

BinaryObjectScanner/Packer/GenteeInstaller.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ public class GenteeInstaller : IExecutableCheck<PortableExecutable>
1010
/// <inheritdoc/>
1111
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1212
{
13+
string? name = exe.AssemblyName;
14+
15+
// <see href="https://www.virustotal.com/gui/file/40e222d35fe8bdd94360462e2f2b870ec7e2c184873e2a481109408db790bfe8/details"/>
16+
// This was found in a "Create Install 2003"-made installer
17+
if (name.OptionalEquals("Gentee.Installer.Install"))
18+
return "Gentee Installer";
19+
1320
// Get the .data/DATA section strings, if they exist
1421
var strs = exe.GetFirstSectionStrings(".data") ?? exe.GetFirstSectionStrings("DATA");
1522
if (strs != null)
@@ -21,12 +28,6 @@ public class GenteeInstaller : IExecutableCheck<PortableExecutable>
2128
return "Gentee Installer";
2229
}
2330

24-
// <see href="https://www.virustotal.com/gui/file/40e222d35fe8bdd94360462e2f2b870ec7e2c184873e2a481109408db790bfe8/details"/>
25-
// This was found in a "Create Install 2003"-made installer
26-
string? name = exe.AssemblyName;
27-
if (name.OptionalEquals("Gentee.Installer.Install"))
28-
return "Gentee Installer";
29-
3031
return null;
3132
}
3233
}

BinaryObjectScanner/Packer/GkWareSFX.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ public class GkWareSFX : IExecutableCheck<PortableExecutable>
1111
/// <inheritdoc/>
1212
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1313
{
14-
// <see href="https://www.virustotal.com/gui/file/867726b7afc1b2343651497bbbe35618f781bb82491a2a768922117c44a897d3/details"/>
1514
string? name = exe.FileDescription;
15+
16+
// <see href="https://www.virustotal.com/gui/file/867726b7afc1b2343651497bbbe35618f781bb82491a2a768922117c44a897d3/details"/>
1617
if (name.OptionalContains("GkWare Self extractor"))
1718
return "GkWare SFX";
1819

19-
// <see href="https://www.virustotal.com/gui/file/867726b7afc1b2343651497bbbe35618f781bb82491a2a768922117c44a897d3/details"/>
2020
name = exe.ProductName;
21+
22+
// <see href="https://www.virustotal.com/gui/file/867726b7afc1b2343651497bbbe35618f781bb82491a2a768922117c44a897d3/details"/>
2123
if (name.OptionalContains("GkWare Self extractor"))
2224
return "GkWare SFX";
2325

BinaryObjectScanner/Packer/InstallAnywhere.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ public class InstallAnywhere : IExecutableCheck<PortableExecutable>
1212
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1313
{
1414
string? name = exe.FileDescription;
15+
1516
if (name.OptionalStartsWith("InstallAnywhere Self Extractor", StringComparison.OrdinalIgnoreCase))
1617
return $"InstallAnywhere {GetVersion(exe)}";
1718

1819
name = exe.ProductName;
20+
1921
if (name.OptionalStartsWith("InstallAnywhere", StringComparison.OrdinalIgnoreCase))
2022
return $"InstallAnywhere {GetVersion(exe)}";
2123

BinaryObjectScanner/Packer/IntelInstallationFramework.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ public class IntelInstallationFramework : IExecutableCheck<PortableExecutable>
1111
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1212
{
1313
string? name = exe.FileDescription;
14+
1415
if (name.OptionalEquals("Intel(R) Installation Framework", StringComparison.OrdinalIgnoreCase)
1516
|| name.OptionalEquals("Intel Installation Framework", StringComparison.OrdinalIgnoreCase))
1617
{
1718
return $"Intel Installation Framework {exe.GetInternalVersion()}";
1819
}
1920

2021
name = exe.ProductName;
22+
2123
if (name.OptionalEquals("Intel(R) Installation Framework", StringComparison.OrdinalIgnoreCase)
2224
|| name.OptionalEquals("Intel Installation Framework", StringComparison.OrdinalIgnoreCase))
2325
{

BinaryObjectScanner/Packer/MicrosoftCABSFX.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ public class MicrosoftCABSFX : IExecutableCheck<PortableExecutable>
1111
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1212
{
1313
string? name = exe.InternalName;
14+
1415
if (name.OptionalEquals("Wextract", StringComparison.OrdinalIgnoreCase))
1516
return $"Microsoft CAB SFX {GetVersion(exe)}";
1617

1718
name = exe.OriginalFilename;
19+
1820
if (name.OptionalEquals("WEXTRACT.EXE", StringComparison.OrdinalIgnoreCase))
1921
return $"Microsoft CAB SFX {GetVersion(exe)}";
2022

BinaryObjectScanner/Packer/NSIS.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class NSIS : IExecutableCheck<PortableExecutable>
1010
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1111
{
1212
string? name = exe.AssemblyDescription;
13+
1314
if (name.OptionalStartsWith("Nullsoft Install System"))
1415
return $"NSIS {name!.Substring("Nullsoft Install System".Length).Trim()}";
1516

BinaryObjectScanner/Packer/SetupFactory.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ public class SetupFactory : IExecutableCheck<PortableExecutable>
1212
/// <inheritdoc/>
1313
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1414
{
15-
// Known to detect versions 7.0.5.1 - 9.1.0.0
1615
string? name = exe.LegalCopyright;
16+
17+
// Known to detect versions 7.0.5.1 - 9.1.0.0
1718
if (name.OptionalStartsWith("Setup Engine", StringComparison.OrdinalIgnoreCase))
1819
return $"Setup Factory {GetVersion(exe)}";
1920

2021
name = exe.ProductName;
22+
2123
if (name.OptionalStartsWith("Setup Factory", StringComparison.OrdinalIgnoreCase))
2224
return $"Setup Factory {GetVersion(exe)}";
2325

24-
// Known to detect version 5.0.1 - 6.0.1.3
2526
name = exe.FileDescription;
27+
28+
// Known to detect version 5.0.1 - 6.0.1.3
2629
if (name.OptionalStartsWith("Setup Factory", StringComparison.OrdinalIgnoreCase))
2730
return $"Setup Factory {GetVersion(exe)}";
2831

BinaryObjectScanner/Packer/SevenZipSFX.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ public class SevenZipSFX : IExecutableCheck<PortableExecutable>
88
/// <inheritdoc/>
99
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
1010
{
11-
// Get the assembly description, if possible
1211
string? name = exe.AssemblyDescription;
12+
1313
if (name.OptionalStartsWith("7-Zip Self-extracting Archive"))
1414
return $"7-Zip SFX {exe.AssemblyDescription!.Substring("7-Zip Self-extracting Archive ".Length)}";
1515

16-
// Get the file description, if it exists
1716
name = exe.FileDescription;
17+
1818
if (name.OptionalEquals("7z SFX"))
1919
return "7-Zip SFX";
2020
if (name.OptionalEquals("7z Self-Extract Setup"))
2121
return "7-Zip SFX";
2222

23-
// Get the original filename, if it exists
2423
name = exe.OriginalFilename;
24+
2525
if (name.OptionalEquals("7z.sfx.exe"))
2626
return "7-Zip SFX";
2727
else if (name.OptionalEquals("7zS.sfx"))
2828
return "7-Zip SFX";
2929

30-
// Get the internal name, if it exists
3130
name = exe.InternalName;
31+
3232
if (name.OptionalEquals("7z.sfx"))
3333
return "7-Zip SFX";
3434
else if (name.OptionalEquals("7zS.sfx"))

0 commit comments

Comments
 (0)