aboutsummaryrefslogtreecommitdiffstats
path: root/obfuscator/obfuscator.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-02-11 20:29:49 +0000
committerbloodstalker <thabogre@gmail.com>2018-02-11 20:29:49 +0000
commit26859306a2affd060fb4ebebed7525a5d88e967c (patch)
tree7f0e83bbcf8e9ccff43814fc53649a61de00cc23 /obfuscator/obfuscator.cpp
parentmakefile update or they kinda do what they were supposed to do (diff)
downloadmutator-26859306a2affd060fb4ebebed7525a5d88e967c.tar.gz
mutator-26859306a2affd060fb4ebebed7525a5d88e967c.zip
2 major bug fixed for bruiser, a lot of little improvements and bug fixed here and there
Diffstat (limited to 'obfuscator/obfuscator.cpp')
-rw-r--r--obfuscator/obfuscator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/obfuscator/obfuscator.cpp b/obfuscator/obfuscator.cpp
index 2cbbd73..f6df690 100644
--- a/obfuscator/obfuscator.cpp
+++ b/obfuscator/obfuscator.cpp
@@ -445,10 +445,12 @@ class BlankDiagConsumer : public clang::DiagnosticConsumer
class MyASTConsumer : public ASTConsumer {
public:
MyASTConsumer(Rewriter &R) : funcDeclHandler(R), HandlerForVar(R), HandlerForClass(R), HandlerForCalledFunc(R), HandlerForCalledVar(R) {
+#if 1
Matcher.addMatcher(functionDecl().bind("funcdecl"), &funcDeclHandler);
Matcher.addMatcher(varDecl(anyOf(unless(hasDescendant(expr(anything()))), hasDescendant(expr(anything()).bind("expr")))).bind("vardecl"), &HandlerForVar);
Matcher.addMatcher(recordDecl(isClass()).bind("classdecl"), &HandlerForClass);
Matcher.addMatcher(declRefExpr().bind("calledvar"), &HandlerForCalledVar);
+#endif
}
void HandleTranslationUnit(ASTContext &Context) override {
@@ -471,6 +473,7 @@ public:
delete BDCProto;
delete tee;
}
+
void EndSourceFileAction() override {
std::error_code EC;
std::string OutputFilename = TEMP_FILE;
@@ -608,6 +611,7 @@ class WhitespaceWarper {
/**********************************************************************************************************************/
/*Main*/
int main(int argc, const char **argv) {
+#if 1
CommonOptionsParser op(argc, argv, ObfuscatorCat);
const std::vector<std::string> &SourcePathList = op.getSourcePathList();
ClangTool Tool(op.getCompilations(), op.getSourcePathList());
@@ -616,6 +620,7 @@ int main(int argc, const char **argv) {
CW.run();
dumpHashFilenames(hashFilenames(SourcePathList));
dumpDirList(listDirs("./test"));
+#endif
#if 0
for (auto &iter : SourcePathList) {
std::cout << "name: " << std::get<0>(getNameFromPath(iter)) << "\t" << "extension: " << std::get<1>(getNameFromPath(iter)) << "\tpath: " << std::get<2>(getNameFromPath(iter)) << "\n";