تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[كود] كود فك تشفير ستريتغ base64 لأي برنامح
#6
أخي أحمد بارك الله فيك أتمنى منك أن لا تبخل معي في إيجاد حل

لكن أنا ما أحاول فعله الناتج يكون مفكوك التشفير لا جميع السترينغ



أريد فقط رقم 1 و 2 ينفك التشفير تاعهم و ينتج لي البرنامج نفسه لكن مكان 1 و 2 تكون مفكوكة

هذا مشروع أخر لو تلقي نظرة فيه ستفهم قصدي أخي

كود :
using System;
using System.Collections.Generic;
using System.Text;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
namespace ConsoleApplication2
{
   class Program
   {
       static List<int> ints = new List<int>();
       static Dictionary<double, string> MyDictionary = new Dictionary<double, string>();
       static void Main(string[] args)
       {

           var DeobMe = @"C:\1.exe";
           var module = ModuleDefMD.Load(DeobMe);
           var types = module.GetTypes();


           foreach (var type in types)
           {
               if (!type.HasFields)
                   continue;
                // Get value field
                #region
                var ctor = type.FindDefaultConstructor();
               foreach (var ils_ctor in ctor.Body.Instructions)
               {
                   if (!ils_ctor.IsLdcI4())
                       continue;
                   ints.Add(ils_ctor.GetLdcI4Value());
               }
                #endregion
                foreach (var method in type.Methods)
               {
                   if (!method.HasBody)
                       continue;
                    // Get value for Dictionary 
                    #region
                    if (method.IsPublic && !method.HasReturnType)
                   {
                       if (method.IsSpecialName || method.IsRuntimeSpecialName)
                           continue;

                       double num = default(double);
                       string str = string.Empty;
                       foreach (var ils in method.Body.Instructions)
                       {
                           if (ils.OpCode == OpCodes.Ldc_R8)
                               num = (double)ils.Operand;
                           if (ils.OpCode != OpCodes.Ldstr)
                               continue;
                           str = ils.Operand as string;
                           MyDictionary.Add(num, str);
                       }

                   }
                   #endregion

               }
               // String Decrypter
               foreach (var method in type.Methods)
               {
                   var _ils = method.Body.Instructions;

                   for (int i = 0; i < _ils.Count; i++)
                   {
                       if (_ils[i].OpCode == OpCodes.Callvirt && _ils[i + 1].OpCode == OpCodes.Call)
                       {
                           var MD = _ils[i + 1].Operand as MethodDef;
                           if (!MD.IsStatic && !MD.IsPublic)
                               continue;
                           if (!MD.HasParamDefs && !MD.HasReturnType)
                               continue;
                           if (MD.ParamDefs.Count != 1 && MD.ParamDefs[1].ElementType != ElementType.String)
                               continue;
                           int val = (int)_ils[i - 15].GetLdcI4Value();
                           string strop = BTS(MyDictionary[value(val)]);
                           _ils[i + 1].OpCode = OpCodes.Ldstr;
                           _ils[i + 1].Operand = strop;
                           for (int numero = i; numero > i - 18; numero--)
                               _ils[numero].OpCode = OpCodes.Nop;
                       }
                   }
               }

           }
           module.Write(@"C:\2.exe");

       }

       static double value(int param)
       {
           return (Math.Pow((double)Math.Abs(param), (double)ints[0]) + (double)ints[1]) * (double)ints[2];
       }
       public static string BTS(string s)
       {
           return Encoding.UTF8.GetString(Convert.FromBase64String(s));
       }
   }
}
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RE: كود فك تشفير ستريتغ base64 لأي برنامح - بواسطة Cracker Egy - 19-10-17, 03:26 AM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  [سؤال] تشفير ملف قاعدة بيانات اكسس ! منه 2 1,841 16-05-20, 09:56 PM
آخر رد: khodor1985
  [C#.NET] تشفير اتصال HTTP على C# mokkaa 7 3,216 03-02-20, 10:57 PM
آخر رد: mokkaa
  فكره عمل برنامج تشفير بسيط maxruined 6 4,078 24-09-19, 01:31 PM
آخر رد: maxruined
  [سؤال] من يعرف برنامج تشفير قوي مدفوع عبد الله 6 3,722 02-11-18, 11:17 PM
آخر رد: Eng27
  طلب تشفير ملف exe الخاص ببرنامج ما Darel 2 2,959 21-02-17, 01:33 AM
آخر رد: Darel

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم