Add source code

This commit is contained in:
Reversing 2021-03-02 09:36:33 +01:00
parent 33eed88063
commit 1f1e3cc283
21 changed files with 383 additions and 0 deletions

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelStore">
<e p="C:\Users\01tie001\AppData\Local\JetBrains\Rider2020.2\extResources" t="IncludeRecursive" />
<e p="C:\Users\01tie001\AppData\Local\JetBrains\Rider2020.2\resharper-host\Local\Transient\Rider\v202\SolutionCaches\_Discord Cache Viewer.-211453657.00" t="ExcludeRecursive" />
<e p="C:\Users\01tie001\RiderProjects\Discord Cache Viewer" t="IncludeFlat">
<e p="Discord Cache Viewer" t="IncludeRecursive">
<e p="bin" t="ExcludeRecursive" />
<e p="Discord Cache Viewer.csproj" t="IncludeRecursive" />
<e p="obj" t="ExcludeRecursive" />
<e p="Program.cs" t="Include" />
<e p="Properties" t="Include">
<e p="AssemblyInfo.cs" t="Include" />
</e>
</e>
<e p="Discord Cache Viewer.sln" t="IncludeFlat" />
<e p="packages" t="ExcludeRecursive" />
</e>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
</component>
</project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelUserStore">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.Discord Cache Viewer/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.Discord Cache Viewer/riderModule.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="vcsConfiguration" value="2" />
</component>
</project>

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoGeneratedRunConfigurationManager">
<projectFile>Discord Cache Viewer/Discord Cache Viewer.csproj</projectFile>
</component>
<component name="ChangeListManager">
<list default="true" id="acece2a0-e976-416b-8a53-7d5bf0e2c604" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/62FFEEB7-EC02-4BEA-B61E-5FBF8D44AC5B/bc/e3b387d8/UInt16.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/62FFEEB7-EC02-4BEA-B61E-5FBF8D44AC5B/af/0b366ba6/Int16.cs" root0="SKIP_HIGHLIGHTING" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/Discord Cache Viewer/Program.cs" />
</list>
</option>
</component>
<component name="ProjectId" id="1pC2glLa8ilcAaMFQxogaL25dWX" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="DebuggerViewTab_PTCS_FirstProportionKey" value="0.3498452" />
<property name="DebuggerViewTab_PTCS_LastProportionKey" value="0.3003096" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RunManager">
<configuration name="Discord Cache Viewer" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Discord Cache Viewer/Discord Cache Viewer.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="Console" />
<option name="PROJECT_TFM" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="acece2a0-e976-416b-8a53-7d5bf0e2c604" name="Default Changelist" comment="" />
<created>1614672870803</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1614672870803</updated>
<workItem from="1614672890066" duration="1124000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="UnityProjectConfiguration" hasMinimizedUI="null" />
<component name="UnityUnitTestConfiguration" currentTestLauncher="NUnit" />
<component name="VcsManagerConfiguration">
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
</component>
<component name="WindowStateProjectService">
<state width="1323" height="251" key="GridCell.Tab.0.bottom" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.0.bottom/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.0.center" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.0.center/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.0.left" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.0.left/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.0.right" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.0.right/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.1.bottom" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.1.bottom/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.1.center" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.1.center/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.1.left" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.1.left/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.1.right" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.1.right/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.2.bottom" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.2.bottom/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.2.center" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.2.center/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.2.left" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.2.left/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.2.right" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.2.right/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.3.bottom" timestamp="1614674021845">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.3.bottom/0.0.1366.738@0.0.1366.738" timestamp="1614674021845" />
<state width="1323" height="251" key="GridCell.Tab.3.center" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.3.center/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.3.left" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.3.left/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.3.right" timestamp="1614674021844">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.3.right/0.0.1366.738@0.0.1366.738" timestamp="1614674021844" />
<state width="1323" height="251" key="GridCell.Tab.4.bottom" timestamp="1614674021845">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.4.bottom/0.0.1366.738@0.0.1366.738" timestamp="1614674021845" />
<state width="1323" height="251" key="GridCell.Tab.4.center" timestamp="1614674021845">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.4.center/0.0.1366.738@0.0.1366.738" timestamp="1614674021845" />
<state width="1323" height="251" key="GridCell.Tab.4.left" timestamp="1614674021845">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.4.left/0.0.1366.738@0.0.1366.738" timestamp="1614674021845" />
<state width="1323" height="251" key="GridCell.Tab.4.right" timestamp="1614674021845">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state width="1323" height="251" key="GridCell.Tab.4.right/0.0.1366.738@0.0.1366.738" timestamp="1614674021845" />
<state x="346" y="59" width="672" height="678" key="search.everywhere.popup" timestamp="1614673272929">
<screen x="0" y="0" width="1366" height="738" />
</state>
<state x="346" y="59" width="672" height="678" key="search.everywhere.popup/0.0.1366.738@0.0.1366.738" timestamp="1614673272929" />
</component>
</project>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

16
Discord Cache Viewer.sln Normal file
View File

@ -0,0 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Discord Cache Viewer", "Discord Cache Viewer\Discord Cache Viewer.csproj", "{24E24498-B464-47B2-988A-04E85A8DC39B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{24E24498-B464-47B2-988A-04E85A8DC39B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24E24498-B464-47B2-988A-04E85A8DC39B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24E24498-B464-47B2-988A-04E85A8DC39B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24E24498-B464-47B2-988A-04E85A8DC39B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{24E24498-B464-47B2-988A-04E85A8DC39B}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Discord_Cache_Viewer</RootNamespace>
<AssemblyName>Discord_Cache_Viewer</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="System.Data"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs"/>
<Compile Include="Properties\AssemblyInfo.cs"/>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,41 @@
using System;
using System.IO;
using System.Threading.Tasks;
namespace Discord_Cache_Viewer
{
internal struct Program
{
/// <summary>
/// Startup function.
/// </summary>
public static async Task Main()
{
Console.WriteLine("Please enter the Discord cache path");
begin_processing(Console.ReadLine());
Console.WriteLine("Processed all files, closing in 10 seconds");
await Task.Delay(10000);
GC.Collect();
Environment.Exit(0);
}
/// <summary>
/// Begin checking and processing files.
/// </summary>
/// <param name="path">The cache folder path.</param>
private static void begin_processing(string path)
{
var files = Directory.GetFiles(path);
const string header = "PNG", extension = ".png";
const ushort index = 0;
for (short i = 0; i < files.Length; i++) // UShort has a greater max length than a signed Short.
{
var filePath = files[i];
// We only have to read the first line and check if it has the PNG header.
if (File.ReadAllLines(filePath)[index].Contains(header))
Console.WriteLine($"{filePath} - Added .png extension");
File.Move(filePath, filePath + extension);
}
}
}
}

View File

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Discord_Cache_Viewer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Discord_Cache_Viewer")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("24E24498-B464-47B2-988A-04E85A8DC39B")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]

View File

@ -0,0 +1 @@
7925e88818bc084f3579599de11480a21869339f

View File

@ -0,0 +1,6 @@
C:\Users\01tie001\RiderProjects\Discord Cache Viewer\Discord Cache Viewer\bin\Debug\Discord_Cache_Viewer.exe
C:\Users\01tie001\RiderProjects\Discord Cache Viewer\Discord Cache Viewer\bin\Debug\Discord_Cache_Viewer.pdb
C:\Users\01tie001\RiderProjects\Discord Cache Viewer\Discord Cache Viewer\obj\Debug\Discord Cache Viewer.csprojAssemblyReference.cache
C:\Users\01tie001\RiderProjects\Discord Cache Viewer\Discord Cache Viewer\obj\Debug\Discord Cache Viewer.csproj.CoreCompileInputs.cache
C:\Users\01tie001\RiderProjects\Discord Cache Viewer\Discord Cache Viewer\obj\Debug\Discord_Cache_Viewer.exe
C:\Users\01tie001\RiderProjects\Discord Cache Viewer\Discord Cache Viewer\obj\Debug\Discord_Cache_Viewer.pdb