لخبراء dotnet - نسخة قابلة للطباعة +- الفريق العربي للهندسة العكسية (https://www.at4re.net/f) +-- قسم : منتديات الهندسة العكسية - Reverse Engineering Forums (https://www.at4re.net/f/forum-4.html) +--- قسم : الأسئلة والإستفسارات، حلول المشاكل و تبادل الخبرات - Expert Exchange Newbie Questions Answers (https://www.at4re.net/f/forum-36.html) +--- الموضوع : لخبراء dotnet (/thread-3696.html) |
لخبراء dotnet - motaghred - 24-11-2023 محتاج فهم الكود جزاكم الله خير
=========================================================
}
using System; using System.IO; using System.Security.Cryptography; using System.Text; using System.Windows.Forms; using LockingSystem; // Token: 0x0200000C RID: 12 internal class Class6 { // Token: 0x06000076 RID: 118 RVA: 0x00008EEC File Offset: 0x000070EC internal static byte[] smethod_0(byte[] byte_0, byte[] byte_1) { byte[] array = null; byte[] array2 = new byte[] { 5, 6, 4, 8, 99, 55, 77, 99 }; using (MemoryStream memoryStream = new MemoryStream()) { using (RijndaelManaged rijndaelManaged = new RijndaelManaged()) { rijndaelManaged.KeySize = 256; rijndaelManaged.BlockSize = 128; Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(byte_1, array2, 1000); rijndaelManaged.Key = rfc2898DeriveBytes.GetBytes(rijndaelManaged.KeySize / 8); rijndaelManaged.IV = rfc2898DeriveBytes.GetBytes(rijndaelManaged.BlockSize / 8); rijndaelManaged.Mode = CipherMode.CBC; using (CryptoStream cryptoStream = new CryptoStream(memoryStream, rijndaelManaged.CreateDecryptor(), CryptoStreamMode.Write)) { cryptoStream.Write(byte_0, 0, byte_0.Length); cryptoStream.Close(); } array = memoryStream.ToArray(); } } return array; } // Token: 0x06000077 RID: 119 RVA: 0x00009000 File Offset: 0x00007200 internal bool method_0(string string_3) { byte[] bytes = Encoding.ASCII.GetBytes(string_3); byte[] array = Convert.FromBase64String(this.string_0); byte[] array2 = null; try { array2 = Class6.smethod_0(array, bytes); } catch (CryptographicException) { return false; } if (array2 != null) { byte[] array3 = SHA1.Create().ComputeHash(array2); if (Convert.ToBase64String(array3) == this.string_1) { Class6.string_2 = Encoding.ASCII.GetString(array2); return true; } } return false; } // Token: 0x06000078 RID: 120 RVA: 0x00009094 File Offset: 0x00007294 internal bool method_1() { for (; { EnterPassword enterPassword = new EnterPassword(); enterPassword.ShowDialog(); if (enterPassword.string_0 == null) { goto IL_47; } if (this.method_0(enterPassword.string_0)) { break; } MessageBox.Show("Wrong password entered!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Hand); } return true; IL_47: return false; } // Token: 0x04000013 RID: 19 0000000000000000000000 internal string string_0 = "Id4lAZ35="; // Token: 0x04000014 RID: 20 00000000000000000000000 internal string string_1 = "bHodyO65UFMX="; // Token: 0x04000015 RID: 21 internal static string string_2; RE: لخبراء dotnet - samoray - 24-11-2023 Lets use the power of ChatGPT |