-
Notifications
You must be signed in to change notification settings - Fork 11
/
Program.cs
51 lines (49 loc) · 2.08 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime;
using System.Reflection.Emit;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using ConfuserDeobfuscator.StringDeobfuscating;
using OpCodes = dnlib.DotNet.Emit.OpCodes;
using TypeAttributes = dnlib.DotNet.TypeAttributes;
using MethodAttributes = dnlib.DotNet.MethodAttributes;
using MethodImplAttributes = dnlib.DotNet.MethodImplAttributes;
using dnlib.DotNet.Writer;
using dnlib;
using OperandType = System.Reflection.Emit.OperandType;
namespace ConfuserDeobfuscator
{
class Program
{
static void Main(string[] args)
{
Console.Title = "Test .NET Reactor 6.3.0.0 deobfuscator by Dark_Bull";
if (args.Length == 0)
{
Console.WriteLine("Drag and drop file");
Thread.Sleep(2000);
Environment.Exit(1);
}
string pathFile = args[0];
//string pathFile = "H:\\GitHub\\Madness.NET\\Madness.NET\\Madness.NET\\bin\\x86\\Debug\\MadnessNET_Secure\\MadnessNET.exe";
ModuleDef moduleDef = ModuleDefMD.Load(pathFile);
Assembly assemblyDef = Assembly.LoadFile(pathFile);
MethodInfo methodInfo = (MethodInfo)assemblyDef.EntryPoint;
StringDecrypt stringDecrypt = new StringDecrypt(ref moduleDef, ref methodInfo);
//var writerOptions = new dnlib.DotNet.Writer.ModuleWriterOptions(moduleDef);
//writerOptions.Logger = DummyLogger.NoThrowInstance;
moduleDef.Write(Path.GetDirectoryName(args[0]) + "\\" + Path.GetFileNameWithoutExtension(args[0]) + "_strCleaned" + Path.GetExtension(args[0]));
//moduleDef.Write(Path.GetDirectoryName(pathFile) + "\\" + Path.GetFileNameWithoutExtension(pathFile) + "_cleaned" + Path.GetExtension(pathFile));
Console.Write("OK!\n");
}
}
}