Skip to content

Instantly share code, notes, and snippets.

@Pldare
Created May 7, 2025 16:50
Show Gist options
  • Select an option

  • Save Pldare/b05e83d65ca1276b80af7d6886a95be9 to your computer and use it in GitHub Desktop.

Select an option

Save Pldare/b05e83d65ca1276b80af7d6886a95be9 to your computer and use it in GitHub Desktop.
lovepluseveryDec
using System;
using System.IO;
class Program
{
static void Main(string[] args)
{
if (args.Length == 0)
{
return;
}
string inputPath = args[0];
if (Directory.Exists(inputPath))
{
string[] files = Directory.GetFiles(inputPath, "*.unity3d", SearchOption.AllDirectories);
foreach (string file in files)
{
DecryptFile(file);
}
}
else if (File.Exists(inputPath))
{
DecryptFile(inputPath);
}
else
{
Console.WriteLine(String.Format("Path {0} Not Found", inputPath));
}
}
static void DecryptFile(string inputFilePath)
{
string key = "20160915xx";
string outputFilePath = Path.ChangeExtension(inputFilePath, "dec.unity3d");
try
{
byte[] inputBytes = File.ReadAllBytes(inputFilePath);
byte[] outputBytes = new byte[inputBytes.Length];
for (int i = 0; i < inputBytes.Length; i++)
{
outputBytes[i] = (byte)(inputBytes[i] ^ key[i % key.Length]);
}
string header = System.Text.Encoding.UTF8.GetString(outputBytes, 0, Math.Min(7, outputBytes.Length));
if (header == "UnityFS")
{
File.WriteAllBytes(outputFilePath, outputBytes);
}
}
catch (Exception ex)
{
Console.WriteLine(String.Format("File {0} Error: {1}", inputFilePath, ex.Message));
}
}
}
@Pldare
Copy link
Author

Pldare commented May 7, 2025

decrypt ラブプラス EVERY 2.0.0 encryptfile
encrypt Magic 0x675E5842

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment