baseline: OpenMU upstream b5a0961 (fresh source)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<WarningsAsErrors>nullable;CS4014;VSTHRD110;VSTHRD100</WarningsAsErrors>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>bin\Debug\MUnique.OpenMU.ClientErrorLogDecryptor.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>bin\Release\MUnique.OpenMU.ClientErrorLogDecryptor.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
41
src/ClientErrorLogDecryptor/Program.cs
Normal file
41
src/ClientErrorLogDecryptor/Program.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
// <copyright file="Program.cs" company="MUnique">
|
||||
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
||||
// </copyright>
|
||||
|
||||
using System.IO;
|
||||
|
||||
var logPath = args.FirstOrDefault();
|
||||
if (string.IsNullOrWhiteSpace(logPath))
|
||||
{
|
||||
Console.WriteLine("No path to the error log specified as first parameter. Press any key to exit...");
|
||||
Console.ReadKey();
|
||||
return;
|
||||
}
|
||||
|
||||
var decryptionKey = new byte[] { 0x7C, 0xBD, 0x81, 0x9F, 0x3D, 0x93, 0xE2, 0x56, 0x2A, 0x73, 0xD2, 0x3E, 0xF2, 0x83, 0x95, 0xBF };
|
||||
try
|
||||
{
|
||||
var fileBytes = await File.ReadAllBytesAsync(logPath).ConfigureAwait(false);
|
||||
|
||||
var resultBuilder = new StringBuilder();
|
||||
var i = 0;
|
||||
foreach (var character in fileBytes)
|
||||
{
|
||||
var result = (char)(character ^ decryptionKey[i % decryptionKey.Length]);
|
||||
resultBuilder.Append(result);
|
||||
i++;
|
||||
}
|
||||
|
||||
var resultPath = logPath + ".decrypted.txt";
|
||||
File.WriteAllText(resultPath, resultBuilder.ToString());
|
||||
Console.WriteLine($"Decrypted file has been written to {resultPath}. Press any key to exit...");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Unexpected error during decrypting the file '{logPath}':");
|
||||
Console.WriteLine(ex);
|
||||
|
||||
Console.WriteLine($"Press any key to exit...");
|
||||
}
|
||||
|
||||
Console.ReadKey();
|
||||
17
src/ClientErrorLogDecryptor/Readme.md
Normal file
17
src/ClientErrorLogDecryptor/Readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Client Error Log Decryptor
|
||||
|
||||
This tool can be used to decrypt the MuError.log files which are created by the
|
||||
game client on every start.
|
||||
|
||||
It might help to find/analyse errors which occured on the client side.
|
||||
|
||||
## Usage
|
||||
|
||||
This is a command line tool. The file name is given as first parameter. If it
|
||||
contains spaces, wrap it by quotes.
|
||||
Example: ```MUnique.OpenMU.ClientErrorLogDecryptor.exe "C:\MU-Season 6E3\MuError.log"```
|
||||
|
||||
On windows you can also just simply drag & drop your MuError.log file on the exe.
|
||||
|
||||
The resulting file is written out into a new file, where the file name is extended
|
||||
by ".decrypted.txt".
|
||||
Reference in New Issue
Block a user