Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
smallfawn committed Sep 29, 2024
1 parent e5eef40 commit 19f765f
Show file tree
Hide file tree
Showing 15 changed files with 580 additions and 1,962 deletions.
4 changes: 1 addition & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const PluginSojson = require('./plugin/sojson.js')
const PluginSojsonV7 = require('./plugin/sojsonv7.js')
const PluginObfuscator = require('./plugin/obfuscator.js')
const PluginAwsc = require('./plugin/awsc.js')
const PluginObfuscator2 = require('./plugin/obfuscator2.js')

// 读取参数
let encodeFile = 'input.js'
Expand All @@ -29,8 +28,7 @@ let pluginUsed = '';

// 循环尝试不同的插件,直到源代码与处理后的代码不一致
const plugins = [
{ name: 'obfuscator', plugin: PluginObfuscator2 },
{ name: "ob2", plugin: PluginObfuscator },
{ name: 'obfuscator', plugin: PluginObfuscator },
{ name: 'sojsonv7', plugin: PluginSojsonV7 },
{ name: 'sojson', plugin: PluginSojson },
{ name: 'common', plugin: PluginCommon },// 最后一次使用通用插件
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = function (code) {
}
const deleteExtra = require('../visitor/delete-extra')
traverse(ast, deleteExtra)
const calculateBinary = require('../visitor/calculate-binary')
traverse(ast, calculateBinary)
const calculateConstantExp = require('../visitor/calculate-constant-exp')
traverse(ast, calculateConstantExp)
const calculateRString = require('../visitor/calculate-rstring')
traverse(ast, calculateRString)
code = generator(ast).code
Expand Down
Loading

0 comments on commit 19f765f

Please sign in to comment.