Skip to content

Commit

Permalink
Add secondary check for WinZipSFX NE
Browse files Browse the repository at this point in the history
  • Loading branch information
mnadareski committed May 15, 2024
1 parent 3e75d9f commit dd45384
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion BinaryObjectScanner/Packer/WinZipSFX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ public class WinZipSFX : IExtractableNewExecutable, IExtractablePortableExecutab
if (nex.Model.ResidentNameTable == null)
return null;

// Check for the WinZip name string
// Check for the WinZip name strings
bool winZipNameFound = nex.Model.ResidentNameTable
.Select(rnte => rnte?.NameString == null ? string.Empty : Encoding.ASCII.GetString(rnte.NameString))
.Any(s => s.Contains("WZ-SE-01"));
winZipNameFound |= nex.Model.NonResidentNameTable?
.Select(nrnte => nrnte?.NameString == null ? string.Empty : Encoding.ASCII.GetString(nrnte.NameString))
.Any(s => s.Contains("WinZip(R) Self-Extractor")) ?? false;

// If we didn't find it
if (!winZipNameFound)
Expand Down

0 comments on commit dd45384

Please sign in to comment.