Skip to content

Commit 5f9f21a

Browse files
committed
Replace things that are marked for replacement
1 parent 4c4c72f commit 5f9f21a

File tree

2 files changed

+10
-37
lines changed

2 files changed

+10
-37
lines changed

BinaryObjectScanner/Packer/GenteeInstaller.cs

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
21
using BinaryObjectScanner.Interfaces;
3-
using SabreTools.Models.PortableExecutable.ResourceEntries;
42
using SabreTools.Serialization.Wrappers;
53

64
namespace BinaryObjectScanner.Packer
@@ -23,23 +21,11 @@ public class GenteeInstaller : IExecutableCheck<PortableExecutable>
2321
return "Gentee Installer";
2422
}
2523

26-
// Get the resource data
27-
// TODO: This should be replaced by a helper method on the wrapper
28-
var resourceData = exe.ResourceData;
29-
if (resourceData != null)
30-
{
31-
var resourceValue = Array.Find([.. resourceData.Values], rd => rd is AssemblyManifest);
32-
if (resourceValue != null && resourceValue is AssemblyManifest manifest)
33-
{
34-
var identities = manifest?.AssemblyIdentities ?? [];
35-
var nameIdentity = Array.Find(identities, ai => !string.IsNullOrEmpty(ai?.Name));
36-
37-
// <see href="https://www.virustotal.com/gui/file/40e222d35fe8bdd94360462e2f2b870ec7e2c184873e2a481109408db790bfe8/details"/>
38-
// This was found in a "Create Install 2003"-made installer
39-
if (nameIdentity?.Name == "Gentee.Installer.Install")
40-
return "Gentee Installer";
41-
}
42-
}
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 == "Gentee.Installer.Install")
28+
return "Gentee Installer";
4329

4430
return null;
4531
}

BinaryObjectScanner/Packer/SpoonInstaller.cs

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
21
using BinaryObjectScanner.Interfaces;
3-
using SabreTools.Models.PortableExecutable.ResourceEntries;
42
using SabreTools.Serialization.Wrappers;
53

64
namespace BinaryObjectScanner.Packer
@@ -18,22 +16,11 @@ public class SpoonInstaller : IExecutableCheck<PortableExecutable>
1816
if (name.OptionalEquals("Spoon Installer"))
1917
return "Spoon Installer";
2018

21-
// Get the resource data
22-
// TODO: This should be replaced by a helper method on the wrapper
23-
var resourceData = exe.ResourceData;
24-
if (resourceData != null)
25-
{
26-
var resourceValue = Array.Find([.. resourceData.Values], rd => rd is AssemblyManifest);
27-
if (resourceValue != null && resourceValue is AssemblyManifest manifest)
28-
{
29-
var identities = manifest?.AssemblyIdentities ?? [];
30-
var nameIdentity = Array.Find(identities, ai => !string.IsNullOrEmpty(ai?.Name));
31-
32-
// <see href="https://www.virustotal.com/gui/file/ad876d9aa59a2c51af776ce7c095af69f41f2947c6a46cfe87a724ecf8745084/details"/>
33-
if (nameIdentity?.Name == "Illustrate.Spoon.Installer")
34-
return "Spoon Installer";
35-
}
36-
}
19+
// <see href="https://www.virustotal.com/gui/file/40e222d35fe8bdd94360462e2f2b870ec7e2c184873e2a481109408db790bfe8/details"/>
20+
// This was found in a "Create Install 2003"-made installer
21+
name = exe.AssemblyName;
22+
if (name == "Illustrate.Spoon.Installer")
23+
return "Spoon Installer";
3724

3825
return null;
3926
}

0 commit comments

Comments
 (0)