Giter Site home page Giter Site logo

decode-js's Introduction

decode-js

使用AST方式(依赖Babel插件)实现的JS代码净化工具,包括常见的几种类型:

  • 字面量还原(全局、代码块)
  • 死代码清理、扁平化还原
  • 条件、循环语句规范化
  • 特殊函数清理

处理全局加密内容时使用VM2提供的环境。

使用

需要node.js环境,并安装依赖:npm i

调用方法:

# pre-defined command
npm run xxx
# or full command
npm run decode -- -t type [-i input.js] [-o output.js]

xxx为预定义的指令,见package.json中的scripts字段。

type列表:

  • common (高频局部混淆)
  • jjencode (sojson.com 版本)
  • sojson
  • sojsonv7
  • obfuscator

默认输入文件为input.js,文件中不能包含除混淆代码以外的内容(例如非混淆代码,注释除外),且只能包含一段混淆代码(一次处理只能识别一个主加密函数)。

默认输出文件为output.js

程序入口文件为:src/main.js,插件目录为src/plugin

启发

参考了下面的项目:

decode-js's People

Contributors

echo094 avatar cesaryuan avatar

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.