private void metroButton2_Click(object sender, EventArgs e) { AssemblyDef assembly = AssemblyDef.Load(metroTextBox1.Text); ModuleContext modCtx = ModuleDefMD.CreateModuleContext(); ModuleDefMD module = ModuleDefMD.Load(metroTextBox1.Text, modCtx); if (antide4dot == true) { antiDe4Dot(module); module.Write(metroTextBox3.Text + ".exe"); } if (protectname == true) { ProtectName(assembly, module); module.Write(metroTextBox3.Text + ".exe"); } if (fakeobf == true) { fakeobfuscation(module); module.Write(metroTextBox3.Text + ".exe"); } if (junkatrb == true) { junkattrib(module); module.Write(metroTextBox3.Text + ".exe"); } if (encryptstring == true) { encryptString(module); module.Write(metroTextBox3.Text + ".exe"); } MessageBox.Show("Thank you for using the obfuscator :)", "Thank you for using the obfuscator :)", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void button2_Click(object sender, EventArgs e) { AssemblyDef assembly = AssemblyDef.Load(textBox1.Text); ModuleContext modCtx = ModuleDefMD.CreateModuleContext(); ModuleDefMD module = ModuleDefMD.Load(textBox1.Text, modCtx); if (antide4dot == true) { antiDe4Dot(module); module.Write(textBox3.Text + ".exe"); } if (nameprotection == true) { ProtectName(assembly, module); module.Write(textBox3.Text + ".exe"); } if (fakeobfu == true) { fakeobfuscation(module); module.Write(textBox3.Text + ".exe"); } if (junkattribute == true) { junkattrib(module); module.Write(textBox3.Text + ".exe"); } if (encryptstring == true) { encryptString(module); module.Write(textBox3.Text + ".exe"); } MessageBox.Show("🍓 🎀 𝕌𝕎𝕌 𝕋𝕙𝕒𝕟𝕜𝕤 𝕗𝕠𝕣 𝕦𝕤𝕚𝕟𝕘 𝕍𝕒𝕡𝕠𝕣𝕆𝕓𝕗𝕦𝕤𝕔𝕒𝕥𝕠𝕣 𝕌𝕎𝕌 🎀 🍓", "🍓 🎀 𝕌𝕎𝕌 𝕋𝕙𝕒𝕟𝕜𝕤 𝕗𝕠𝕣 𝕦𝕤𝕚𝕟𝕘 𝕍𝕒𝕡𝕠𝕣𝕆𝕓𝕗𝕦𝕤𝕔𝕒𝕥𝕠𝕣 𝕌𝕎𝕌 🎀 🍓", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public static AssemblyDef OpenAssembly(string filename) { var ctx = ModuleDefMD.CreateModuleContext(); var asm = ModuleDefMD.Load(File.ReadAllBytes(filename), ctx).Assembly; ctx.AssemblyResolver.AddToCache(asm); return(asm); }
public static ModuleDefMD OpenModule(string filename) { var ctx = ModuleDefMD.CreateModuleContext(); var peImage = new PEImage(File.ReadAllBytes(filename), filename); var mod = ModuleDefMD.Load(peImage, ctx); ctx.AssemblyResolver.AddToCache(mod); return(mod); }
static async Task Main(string[] args) { var moduleContext = ModuleDefMD.CreateModuleContext(); var resolver = (AssemblyResolver)moduleContext.AssemblyResolver; resolver.EnableTypeDefCache = true; //var extensions = new string[] { ".exe", ".dll" }; var extensions = new string[] { ".exe" }; Stopwatch sw = new Stopwatch(); sw.Start(); int count = 0; foreach (var file in TraverseDirectory(@"C:\", f => extensions.Contains(f.Extension), OnProgress)) { try { await ProcessFile(moduleContext, file.FullName); count++; } catch (Exception e) { Console.WriteLine("ERROR processing " + file.FullName); Console.WriteLine(e); } } sw.Stop(); Console.WriteLine($"Elapsed Time: {sw.Elapsed}"); Console.WriteLine($"Count: {count}"); }