Skip to content

Commit

Permalink
Add a Disabling Anti-Class Dumping option too
Browse files Browse the repository at this point in the history
  • Loading branch information
woachk committed Jan 25, 2020
1 parent 892bb3f commit f4307d2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/PassScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ static cl::opt<bool>
static cl::opt<bool>
DisableIndirectBranching("disable-indibran", cl::init(false), cl::NotHidden,
cl::desc("Disable Indirect Branching."));
static cl::opt<bool> DisableAntiClassDump("disable-acdobf", cl::init(false),
cl::NotHidden,
cl::desc("Disable AntiClassDump."));

// End Obfuscator Options

Expand All @@ -77,6 +80,9 @@ static void LoadEnv() {
if (getenv("INDIBRAN")) {
EnableIndirectBranching = true;
}
if (getenv("NOINDIBRAN")) {
DisableIndirectBranching = true;
}
if (getenv("FUNCWRA")) {
EnableFunctionWrapper = true;//Broken
}
Expand All @@ -86,6 +92,9 @@ static void LoadEnv() {
if (getenv("ACDOBF")) {
EnableAntiClassDump = true;
}
if (getenv("NOACDOBF")) {
DisableAntiClassDump = true;
}
if (getenv("CFFOBF")) {
EnableFlattening = true;
}
Expand All @@ -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);
Expand Down

0 comments on commit f4307d2

Please sign in to comment.