mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-23 23:34:58 +00:00
Make file version finding safer
This commit is contained in:
@@ -123,11 +123,8 @@ namespace BurnOutSharp.ProtectionType
|
||||
|
||||
public static string GetFileVersion(string file, byte[] fileContent, List<int> positions)
|
||||
{
|
||||
string companyName = string.Empty;
|
||||
if (file != null)
|
||||
companyName = FileVersionInfo.GetVersionInfo(file).CompanyName.ToLower();
|
||||
|
||||
if (companyName.Contains("solidshield") || companyName.Contains("tages"))
|
||||
string companyName = Utilities.GetFileVersionInfo(file)?.CompanyName.ToLowerInvariant();
|
||||
if (!string.IsNullOrWhiteSpace(companyName) && (companyName.Contains("solidshield") || companyName.Contains("tages")))
|
||||
return Utilities.GetFileVersion(file);
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user