mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-09 18:36:43 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
521797b7b1 | ||
|
|
f4987e1862 | ||
|
|
34a0fb1f87 | ||
|
|
8ca25c6370 |
@@ -17,7 +17,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.0]" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.1]" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Version>3.7.0</Version>
|
||||
<Version>3.7.1</Version>
|
||||
<WarningsNotAsErrors>NU5104</WarningsNotAsErrors>
|
||||
|
||||
<!-- Package Properties -->
|
||||
@@ -45,12 +45,16 @@
|
||||
<InternalsVisibleTo Include="BinaryObjectScanner.Test" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="../README.md" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GrindCore.SharpCompress" Version="0.48.0" Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`)) AND !$(TargetFramework.StartsWith(`net40`)) AND !$(TargetFramework.StartsWith(`net452`))" />
|
||||
<PackageReference Include="MinThreadingBridge" Version="0.11.4" Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`)) OR $(TargetFramework.StartsWith(`net40`))" />
|
||||
<PackageReference Include="SabreTools.Hashing" Version="[2.0.0]" />
|
||||
<PackageReference Include="SabreTools.IO" Version="[2.1.0]" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.0]" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.1]" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="10.0.9" Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`)) AND !$(TargetFramework.StartsWith(`net40`)) AND !$(TargetFramework.StartsWith(`net452`))" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace BinaryObjectScanner.FileType
|
||||
@@ -16,19 +17,19 @@ namespace BinaryObjectScanner.FileType
|
||||
// Filename is worth reporting, since it's descriptive and has to match the Steam2 CDN in order to work.
|
||||
string fileName = Path.GetFileName(file);
|
||||
uint depotId = _wrapper.Model.Header.CacheID;
|
||||
uint manifestVersion = _wrapper.Model.Header.LastVersionPlayed;
|
||||
uint depotVersion = _wrapper.Model.Header.LastVersionPlayed;
|
||||
|
||||
// At the moment, all samples of GCF files on redump are unencrypted. Combined with being uncertain about
|
||||
// whether this is the best way to check whether the GCF is encrypted, this block will be left commented
|
||||
// out until further research is done.
|
||||
// bool encrypted = false;
|
||||
// if (_wrapper.Files != null && _wrapper.Files.Length > 0)
|
||||
// encrypted = _wrapper.Files[0].Encrypted;
|
||||
// While there is a depot-level encrypted flag on the GCF, it's unfortunately completely unreliable.
|
||||
// Technically speaking, there are some known GCFs that only have some files encrypted. HL2 discs from
|
||||
// 2004 have several GCFs like this, one being base_source_engine.gcf (depot 200). Thus, it's necessary
|
||||
// to iterate all file info to check if any files are encrypted
|
||||
bool encrypted = false;
|
||||
if (_wrapper.Files != null && _wrapper.Files.Length > 0)
|
||||
encrypted = Array.Exists(_wrapper.Files, fileInfo => fileInfo.Encrypted);
|
||||
|
||||
// string encryptedString = encrypted ? "encrypted" : "unencrypted";
|
||||
// string returnString = $"{fileName} - {depotId} (v{manifestVersion}, {encryptedString})";
|
||||
|
||||
string returnString = $"{fileName} - {depotId} (v{manifestVersion})";
|
||||
// Only note encryption status if the GCF is encrypted
|
||||
string encryptedString = encrypted ? ", encrypted" : "";
|
||||
string returnString = $"{fileName} - {depotId} (v{depotVersion}{encryptedString})";
|
||||
return returnString;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Version>3.7.0</Version>
|
||||
<Version>3.7.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Support All Frameworks -->
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SabreTools.CommandLine" Version="[1.4.0]" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.0]" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.1]" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user