소스 검색

version 0.5.1

sanex3339 9 년 전
부모
커밋
dda6b03edf

+ 1 - 1
dist/src/custom-nodes/unicode-array-nodes/UnicodeArrayCallsWrapper.js

@@ -29,7 +29,7 @@ class UnicodeArrayCallsWrapper extends Node_1.Node {
     getNodeStructure() {
         let keyName = Utils_1.Utils.getRandomVariableName(), node = esprima.parse(`
                 var ${this.unicodeArrayCallsWrapperName} = function (${keyName}) {
-                    return ${this.unicodeArrayName}[[][${Utils_1.Utils.stringToUnicode('filter')}][${Utils_1.Utils.stringToUnicode('constructor')}](${Utils_1.Utils.stringToUnicode('return this')})()[${Utils_1.Utils.stringToUnicode('parseInt')}](${keyName})]
+                    return ${this.unicodeArrayName}[parseInt(${keyName}, 16)]
                 };
             `);
         NodeUtils_1.NodeUtils.addXVerbatimPropertyToLiterals(node);

+ 1 - 1
index.ts

@@ -17,7 +17,7 @@ class JavaScriptObfuscator {
         debugProtectionInterval: false,
         disableConsoleOutput: true,
         rotateUnicodeArray: true,
-        wrapUnicodeArrayCalls: false
+        wrapUnicodeArrayCalls: true
     };
 
     /**

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "javascript-obfuscator",
-  "version": "0.5.0",
+  "version": "0.5.1",
   "description": "JavaScript obfuscator",
   "keywords": [
     "obfuscator",

+ 1 - 3
readme.md

@@ -103,9 +103,7 @@ This option affected only on visual code organisation, because we can easily get
 Not recommended for small source code, because helper function will attract attention.
 
 ####wrapUnicodeArrayCalls
-Type: `boolean` Default: `false`
-
-#####This option have huge affect on performance! Use this option only on small pieces of code (< 5000 LOC)
+Type: `boolean` Default: `true`
 
 Instead using direct calls to `unicodeArray` items `var t = _0x43a123[0x0]`, 
 when index `0x0` can be easy reverted to `0` with few js beautifiers, this option wrap all calls to special function instead.

+ 1 - 1
src/custom-nodes/unicode-array-nodes/UnicodeArrayCallsWrapper.ts

@@ -82,7 +82,7 @@ export class UnicodeArrayCallsWrapper extends Node {
         let keyName: string = Utils.getRandomVariableName(),
             node: INode = esprima.parse(`
                 var ${this.unicodeArrayCallsWrapperName} = function (${keyName}) {
-                    return ${this.unicodeArrayName}[[][${Utils.stringToUnicode('filter')}][${Utils.stringToUnicode('constructor')}](${Utils.stringToUnicode('return this')})()[${Utils.stringToUnicode('parseInt')}](${keyName})]
+                    return ${this.unicodeArrayName}[parseInt(${keyName}, 16)]
                 };
             `);