/// <summary> /// Renamer.Execute(module); || We are executing the obfuscation method 'Renamer'. /// RandomOutlinedMethods.Execute(module); || We are executing the obfuscation method 'RandomOutlinedMethods'. /// MetaStrip.Execute(module); || We are executing the obfuscation method 'MetaStrip'. /// OBAdder.Execute(module); || We are executing the obfuscation method 'OBAdder'. /// ProxyAdder.Execute(module); || We are executing the obfuscation method 'ProxyAdder'. /// </summary> private static void Execute(ModuleDefMD module) { Console.WriteLine(Reference.Prefix + "Applying 'Renamer' obfuscation..."); Renamer.Execute(module: module); Console.WriteLine(Reference.Prefix + "Applying 'RandomOutlinedMethods' obfuscation..."); RandomOutlinedMethods.Execute(module: module); Console.WriteLine(Reference.Prefix + "Applying 'MetaStrip' obfuscation..."); MetaStrip.Execute(module: module); Console.WriteLine(Reference.Prefix + "Applying 'OBAdder' obfuscation..."); OBAdder.Execute(module: module); Console.WriteLine(Reference.Prefix + "Applying 'ProxyAdder' obfuscation..."); ProxyAdder.Execute(module: module); }
static void Main(string[] args) { Console.WriteLine("Drag & drop your file : "); string path = Console.ReadLine(); Console.WriteLine("Preparing obfuscation..."); if (!File.Exists("config.txt")) { Console.WriteLine("Config file not found, continuing without it."); goto obfuscation; } Parser p = new Parser() { ConfigFile = "config.txt" }; ForceWinForms = bool.Parse(p.Read("ForceWinFormsCompatibility").ReadResponse().ReplaceSpaces()); DontRename = bool.Parse(p.Read("DontRename").ReadResponse().ReplaceSpaces()); obfuscation: Module = ModuleDefMD.Load(path); FileExtension = Path.GetExtension(path); Console.WriteLine("Renaming..."); Renamer.Execute(); Console.WriteLine("Adding junk methods..."); JunkMethods.Execute(); Console.WriteLine("Adding proxy calls..."); ProxyAdder.Execute(); Console.WriteLine("Encoding ints..."); IntEncoding.Execute(); Console.WriteLine("Encrypting strings..."); StringEncryption.Execute(); Console.WriteLine("Injecting Anti-Tamper..."); AntiTamper.Execute(); Console.WriteLine("Watermarking..."); Watermark.AddAttribute(); Console.WriteLine("Saving file..."); FilePath = @"C:\Users\" + Environment.UserName + @"\Desktop\" + Path.GetFileNameWithoutExtension(path) + "_protected" + FileExtension; ModuleWriterOptions opts = new ModuleWriterOptions(Module) { Logger = DummyLogger.NoThrowInstance }; Module.Write(FilePath, opts); if (AntiTamper.HasBeenTampered) { AntiTamper.InjectMd5(FilePath); } Console.WriteLine("Done! Press any key to exit..."); Console.ReadKey(); }