Created
May 7, 2025 16:50
-
-
Save Pldare/b05e83d65ca1276b80af7d6886a95be9 to your computer and use it in GitHub Desktop.
lovepluseveryDec
This file contains hidden or 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
| 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)); | |
| } | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
decrypt ラブプラス EVERY 2.0.0 encryptfile
encrypt Magic 0x675E5842