Giter Site home page Giter Site logo

cppobfuscator's People

Contributors

wolf5x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cppobfuscator's Issues

POD struct 初始化

struct option {
    char a[32];
    int b;
    unsigned c;
    char d;
};

int main() {
    option haha = {"aa", 1, 2, '3'}; // error
    return 0;
}

C99标准的初始化,应该支持。

local static var support

create a bool var to record whether the static var has been initialized.
create a if stmt with the bool var as cond var, to decide whether to execute the new assign code.

变量定义重复

可能是LocalVarMover中对IfStmt预处理的问题。
见_badcase.cpp

clang3.2 CFG 条件语句的结节分配改变

if(a || (b && c)) {
    //...
}

在3.1中的流图与3.2中不同。
3.2中统一将bool条件分支中的条件跳转放进CFGTerminator,如3.2中关于&&表达示的CFGBlock形如:

[B1]
1. b
T [B1.1] && ...

而3.1中是将1和T拆分成2个CFGBlock的:

[B1]
1. b
[B2]
T [B1.1] && ...

因此3.2中的缩点处理应当修改。

函数调用语句重复

x = func();
会转化成
func();
x = func();

可能是CFGBElement类型判断有误。在构建CaseStmt的语句移植时判断条件不完善。

赋值语句用placement new代替

为了保证语义不变,变量定义应拆分成声明和placement new,确保是调用构造函数而不是拷贝函数。
要根据变量是否为POD(?)类型决定。如:

int a = 1;
ClassTy b(initlist);

转换为

int a;
a = 1;
ClassTy b;
b.~ClassTy();
new (&b) ClassTy(initlist);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.