mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-11 03:17:00 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d03ea57aa | ||
|
|
0672f0c6e1 | ||
|
|
080f4327bf | ||
|
|
521797b7b1 | ||
|
|
f4987e1862 | ||
|
|
34a0fb1f87 | ||
|
|
8ca25c6370 |
@@ -16,8 +16,8 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
|
||||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.0]" />
|
<PackageReference Include="SabreTools.Serialization" Version="3.1.0" />
|
||||||
<PackageReference Include="xunit" Version="2.9.3" />
|
<PackageReference Include="xunit" Version="2.9.3" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<Version>3.7.0</Version>
|
<Version>3.8.0</Version>
|
||||||
<WarningsNotAsErrors>NU5104</WarningsNotAsErrors>
|
<WarningsNotAsErrors>NU5104</WarningsNotAsErrors>
|
||||||
|
|
||||||
<!-- Package Properties -->
|
<!-- Package Properties -->
|
||||||
<Authors>Matt Nadareski</Authors>
|
<Authors>Matt Nadareski</Authors>
|
||||||
<Description>Protection scanning library</Description>
|
<Description>Protection scanning library</Description>
|
||||||
<Copyright>Copyright (c)2018-2025 Matt Nadareski</Copyright>
|
<Copyright>Copyright (c)2018-2026 Matt Nadareski</Copyright>
|
||||||
<PackageProjectUrl>https://github.com/SabreTools/</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/SabreTools/</PackageProjectUrl>
|
||||||
<RepositoryUrl>https://github.com/SabreTools/BinaryObjectScanner</RepositoryUrl>
|
<RepositoryUrl>https://github.com/SabreTools/BinaryObjectScanner</RepositoryUrl>
|
||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
@@ -45,12 +45,16 @@
|
|||||||
<InternalsVisibleTo Include="BinaryObjectScanner.Test" />
|
<InternalsVisibleTo Include="BinaryObjectScanner.Test" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="../README.md" Pack="true" PackagePath="" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<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="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="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.Hashing" Version="2.0.0" />
|
||||||
<PackageReference Include="SabreTools.IO" Version="[2.1.0]" />
|
<PackageReference Include="SabreTools.IO" Version="2.2.0" />
|
||||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.0]" />
|
<PackageReference Include="SabreTools.Serialization" Version="3.1.0" />
|
||||||
<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`))" />
|
<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>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace BinaryObjectScanner.FileType
|
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.
|
// Filename is worth reporting, since it's descriptive and has to match the Steam2 CDN in order to work.
|
||||||
string fileName = Path.GetFileName(file);
|
string fileName = Path.GetFileName(file);
|
||||||
uint depotId = _wrapper.Model.Header.CacheID;
|
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
|
// While there is a depot-level encrypted flag on the GCF, it's unfortunately completely unreliable.
|
||||||
// whether this is the best way to check whether the GCF is encrypted, this block will be left commented
|
// Technically speaking, there are some known GCFs that only have some files encrypted. HL2 discs from
|
||||||
// out until further research is done.
|
// 2004 have several GCFs like this, one being base_source_engine.gcf (depot 200). Thus, it's necessary
|
||||||
// bool encrypted = false;
|
// to iterate all file info to check if any files are encrypted
|
||||||
// if (_wrapper.Files != null && _wrapper.Files.Length > 0)
|
bool encrypted = false;
|
||||||
// encrypted = _wrapper.Files[0].Encrypted;
|
if (_wrapper.Files != null && _wrapper.Files.Length > 0)
|
||||||
|
encrypted = Array.Exists(_wrapper.Files, fileInfo => fileInfo.Encrypted);
|
||||||
|
|
||||||
// string encryptedString = encrypted ? "encrypted" : "unencrypted";
|
// Only note encryption status if the GCF is encrypted
|
||||||
// string returnString = $"{fileName} - {depotId} (v{manifestVersion}, {encryptedString})";
|
string encryptedString = encrypted ? ", encrypted" : "";
|
||||||
|
string returnString = $"{fileName} - {depotId} (v{depotVersion}{encryptedString})";
|
||||||
string returnString = $"{fileName} - {depotId} (v{manifestVersion})";
|
|
||||||
return returnString;
|
return returnString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2018-2025 Matt Nadareski
|
Copyright (c) 2018-2026 Matt Nadareski
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<Version>3.7.0</Version>
|
<Version>3.8.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Support All Frameworks -->
|
<!-- Support All Frameworks -->
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="SabreTools.CommandLine" Version="[1.4.0]" />
|
<PackageReference Include="SabreTools.CommandLine" Version="1.5.0" />
|
||||||
<PackageReference Include="SabreTools.Serialization" Version="[3.0.0]" />
|
<PackageReference Include="SabreTools.Serialization" Version="3.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user