Obfuscator.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002     This file is part of PHP-AST Project by Romain Gaucher (http://rgaucher.info).
00003 
00004     PHP-AST is free software: you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation, either version 3 of the License, or
00007     (at your option) any later version.
00008 
00009     PHP-AST/ORACLE is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.
00013 
00014     You should have received a copy of the GNU General Public License
00015     along with PHP-AST.  If not, see <http://www.gnu.org/licenses/>.
00016 ------------------------------------------------------------------------------*/
00017 
00018 #ifndef __OBFUSCATOR_H
00019 #define __OBFUSCATOR_H
00020 
00021 #include <string>
00022 
00023 /**
00024     Obfuscator algorithms abstract class
00025 */
00026 class Obfuscator {
00027   public:
00028     Obfuscator() {}
00029     virtual ~Obfuscator() {}
00030   public:
00031     virtual void operator()(tree<AstNode>&, MapClasses* classes = 0, MapVariables* vars = 0, MapFunctions *func = 0) = 0;
00032 };
00033 
00034 
00035 class RenameClass : public Obfuscator
00036 {
00037   public:
00038     virtual ~RenameClass() {}
00039     virtual void operator()(tree<AstNode>&, MapClasses* classes = 0, MapVariables* vars = 0, MapFunctions *func = 0);
00040 };
00041 
00042 class RenameFunction : public Obfuscator
00043 {
00044   public:
00045     virtual ~RenameFunction() {}
00046     virtual void operator()(tree<AstNode>&, MapClasses* classes = 0, MapVariables* vars = 0, MapFunctions *func = 0);
00047 };
00048 
00049 
00050 class RenameVariable : public Obfuscator
00051 {
00052   public:
00053     virtual ~RenameVariable() {}
00054     virtual void operator()(tree<AstNode>&, MapClasses* classes = 0, MapVariables* vars = 0, MapFunctions *func = 0);
00055 };
00056 
00057 class ControlFlow : public Obfuscator
00058 {
00059   public:
00060     Ast flowAST;
00061   public:
00062     ControlFlow(){}
00063     ControlFlow(const std::string& flowXML) { 
00064         flowAST = Ast(flowXML);
00065     }
00066     virtual ~ControlFlow() {}
00067     virtual void operator()(tree<AstNode>&, MapClasses* classes = 0, MapVariables* vars = 0, MapFunctions *func = 0);
00068 };
00069 
00070 
00071 #endif

Generated on Wed Feb 27 20:31:06 2008 for php.ast.svn.src. by  doxygen 1.5.3