From f4307d29f4c1e8285abd283c3e6e037453668b7c Mon Sep 17 00:00:00 2001 From: woachk <24752637+woachk@users.noreply.github.com> Date: Sat, 25 Jan 2020 10:08:37 +0100 Subject: [PATCH] Add a Disabling Anti-Class Dumping option too --- src/PassScheduler.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PassScheduler.cpp b/src/PassScheduler.cpp index 8b89618..cd6e98a 100644 --- a/src/PassScheduler.cpp +++ b/src/PassScheduler.cpp @@ -55,6 +55,9 @@ static cl::opt static cl::opt DisableIndirectBranching("disable-indibran", cl::init(false), cl::NotHidden, cl::desc("Disable Indirect Branching.")); +static cl::opt DisableAntiClassDump("disable-acdobf", cl::init(false), +cl::NotHidden, +cl::desc("Disable AntiClassDump.")); // End Obfuscator Options @@ -77,6 +80,9 @@ static void LoadEnv() { if (getenv("INDIBRAN")) { EnableIndirectBranching = true; } + if (getenv("NOINDIBRAN")) { + DisableIndirectBranching = true; + } if (getenv("FUNCWRA")) { EnableFunctionWrapper = true;//Broken } @@ -86,6 +92,9 @@ static void LoadEnv() { if (getenv("ACDOBF")) { EnableAntiClassDump = true; } + if (getenv("NOACDOBF")) { + DisableAntiClassDump = true; + } if (getenv("CFFOBF")) { EnableFlattening = true; } @@ -99,7 +108,7 @@ struct Obfuscation : public ModulePass { } bool runOnModule(Module &M) override { // Initial ACD Pass - if (EnableAllObfuscation || EnableAntiClassDump) { + if ((EnableAllObfuscation || EnableAntiClassDump) && !DisableAntiClassDump) { ModulePass *P = createAntiClassDumpPass(); P->doInitialization(M); P->runOnModule(M);