-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
051b7f1
commit 0674350
Showing
5 changed files
with
566 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.4.33205.214 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoloModels", "HoloModels\HoloModels.csproj", "{DEB4B5BA-95D1-4B56-973B-CF925C622C70}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{DEB4B5BA-95D1-4B56-973B-CF925C622C70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{DEB4B5BA-95D1-4B56-973B-CF925C622C70}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{DEB4B5BA-95D1-4B56-973B-CF925C622C70}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{DEB4B5BA-95D1-4B56-973B-CF925C622C70}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {AB2C6C54-EDE0-4D74-9010-F852EF65BC04} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System; | ||
using System.IO; | ||
using static Utils.Rijndael; | ||
|
||
class Program | ||
{ | ||
private static byte[]? iv; | ||
|
||
static void Main(string[] args) | ||
{ | ||
if (args.Length != 2) | ||
{ | ||
Console.WriteLine("Usage: HoloModels.exe <input_folder> <output_folder>"); | ||
return; | ||
} | ||
|
||
string inputFolder = args[0]; | ||
string outputFolder = args[1]; | ||
|
||
byte[] key = new byte[] { 145, 153, 81, 152, 6, 193, 94, 191, 35, 38, 33, 254, 47, 248, 64, 46, 119, 119, 58, 136, 217, 184, 28, 35, 62, 11, 204, 188, 149, 49, 129, 181 }; | ||
foreach (string encryptedFilePath in Directory.GetFiles(inputFolder)) | ||
{ | ||
string decryptedFilePath = Path.Combine(outputFolder, Path.GetFileNameWithoutExtension(encryptedFilePath)); | ||
Directory.CreateDirectory(outputFolder); | ||
byte[] encryptedData; | ||
using (FileStream encryptedFileStream = new FileStream(encryptedFilePath, FileMode.Open, FileAccess.Read)) | ||
{ | ||
iv = new byte[32]; | ||
encryptedFileStream.Read(iv, 0, iv.Length); | ||
encryptedFileStream.Seek(0, SeekOrigin.Begin); | ||
encryptedData = new byte[encryptedFileStream.Length]; | ||
encryptedFileStream.Read(encryptedData, 0, encryptedData.Length); | ||
} | ||
|
||
try | ||
{ | ||
byte[] decryptedData = DecryptData(encryptedData, key, iv, BlockSize.Block256, KeySize.Key256, EncryptionMode.ModeCBC); | ||
|
||
// Check if the decrypted data is not empty before writing it | ||
if (decryptedData.Length > 32) | ||
{ | ||
File.WriteAllBytes(decryptedFilePath, decryptedData[32..]); | ||
Console.WriteLine($"Decryption completed for {Path.GetFileName(encryptedFilePath)}. Decrypted data saved in: {decryptedFilePath}"); | ||
} | ||
else | ||
{ | ||
Console.WriteLine($"Decryption failed for {Path.GetFileName(encryptedFilePath)}. Decrypted data is empty."); | ||
} | ||
} | ||
catch (Exception ex) | ||
{ | ||
Console.WriteLine($"Error during decryption for {Path.GetFileName(encryptedFilePath)}: {ex.Message}"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"profiles": { | ||
"HoloModels": { | ||
"commandName": "Project", | ||
"commandLineArgs": "D:\\Users\\ASUS\\Downloads\\jp.Gugenka.Holomodels_1141_aab_apksos.com\\jp.Gugenka.Holomodels\\homod\\test\\TextAsset \"aaaaaaa\"" | ||
} | ||
} | ||
} |
Oops, something went wrong.