中育混淆方式

中育混淆方式

2023 年 8 月 26 日

看着玩玩罢,不要介意。


中育用过的一些混淆与加密方法。
个人学习使用,不代表原始代码,只确保效果一致。

用户中心网站白名单

// 解密
string str = Console.ReadLine();
str=string.Concat(str.Substring(0,str.Length-32).Reverse());
byte[] b = Convert.FromBase64String(str);
Console.WriteLine(Encoding.UTF8.GetString(b));

中育云笔记(已过时)

已经确认在 2023 年 7 月更新中,AES 密钥发生了更换,此方法已不再可用。

using System.Diagnostics;
using System.Security.Cryptography;
using System.Text;

namespace FridaySharp
{
    public class AesUtil
    {

        private string key;
        public AesUtil(string AesKey)
        {
            key = string.IsNullOrEmpty(AesKey) ? AesKey : "teEb3gnyru3QCnxv";
        }
        public AesUtil()
        {
            key = "teEb3gnyru3QCnxv";
        }

        public string AesDecrypt(string encryptedStr)
        {
            Aes aes = Aes.Create();
            byte[] bkey = Encoding.UTF8.GetBytes(key);
            byte[] content = Convert.FromBase64String(encryptedStr);
            aes.Mode = CipherMode.ECB;
            aes.Key = bkey;
            aes.Padding = PaddingMode.PKCS7;
            var decryptor = aes.CreateDecryptor();
            byte[] resultArray = decryptor.TransformFinalBlock(content, 0, content.Length);
            decryptor.Dispose();
            return Encoding.UTF8.GetString(resultArray);
        }

        public string AesEncrypt(string decryptedStr)
        {
            Aes aes = Aes.Create();
            byte[] bkey = Encoding.UTF8.GetBytes(key);
            byte[] content = Encoding.UTF8.GetBytes(decryptedStr);
            aes.Mode = CipherMode.ECB;
            aes.Key = bkey;
            aes.Padding = PaddingMode.PKCS7;
            var encryptor = aes.CreateEncryptor();
            byte[] resultArray = encryptor.TransformFinalBlock(content, 0, content.Length);
            encryptor.Dispose();
            return Convert.ToBase64String(resultArray);
        }
    }
}

文件历史

feat: backport tags support cb2b6c5
2025 年 6 月 24 日 02:37djdjz7
chore: continue migration 30e3bf6
2025 年 2 月 23 日 07:52djdjz7
chore: remove lcpu related code b5e18ec
2025 年 2 月 22 日 08:59djdjz7
theme: layout update 9984f92
2023 年 11 月 11 日 13:20djdjz7
update 3e02699
2023 年 10 月 2 日 09:32djdjz7
refractoring cd66e4f
2023 年 10 月 2 日 05:51djdjz7
add post b31c9fc
2023 年 8 月 26 日 01:53djdjz7
add post ee87d46
2023 年 8 月 26 日 01:50djdjz7
© 2023 - 2025
Unless otherwise stated, text contents are licensed under CC BY-NC 4.0, and codes are licensed under MIT.
Images may be subject to separate licenses, see the image captions for details if applicable.