sanex3339 há 9 anos atrás
pai
commit
e62091b474

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

@@ -49,7 +49,7 @@ class UnicodeArrayDecodeNode extends Node_1.Node {
                 var ${tempArrayName} = [];
                 
                 for (var ${indexVariableName} in ${this.unicodeArrayName}) {
-                    ${tempArrayName}[${Utils_1.Utils.stringToUnicode('push')}](atob(${this.unicodeArrayName}[${indexVariableName}]));
+                    ${tempArrayName}[${Utils_1.Utils.stringToUnicode('push')}](decodeURI(atob(${this.unicodeArrayName}[${indexVariableName}])));
                 }
                 
                 ${this.unicodeArrayName} = ${tempArrayName};

+ 1 - 1
dist/src/node-obfuscators/NodeObfuscator.js

@@ -32,7 +32,7 @@ class NodeObfuscator {
     replaceLiteralStringByUnicodeArrayCall(nodeValue) {
         let value = nodeValue;
         if (this.options['encodeUnicodeArray']) {
-            value = new Buffer(value).toString('base64');
+            value = new Buffer(encodeURI(value)).toString('base64');
         }
         value = Utils_1.Utils.stringToUnicode(value);
         let unicodeArray = this.nodes.get('unicodeArrayNode').getNodeData(), sameIndex = unicodeArray.indexOf(value), index, hexadecimalIndex;

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

@@ -95,7 +95,7 @@ export class UnicodeArrayDecodeNode extends Node {
                 var ${tempArrayName} = [];
                 
                 for (var ${indexVariableName} in ${this.unicodeArrayName}) {
-                    ${tempArrayName}[${Utils.stringToUnicode('push')}](atob(${this.unicodeArrayName}[${indexVariableName}]));
+                    ${tempArrayName}[${Utils.stringToUnicode('push')}](decodeURI(atob(${this.unicodeArrayName}[${indexVariableName}])));
                 }
                 
                 ${this.unicodeArrayName} = ${tempArrayName};

+ 1 - 1
src/node-obfuscators/NodeObfuscator.ts

@@ -89,7 +89,7 @@ export abstract class NodeObfuscator implements INodeObfuscator {
         let value: string = nodeValue;
 
         if (this.options['encodeUnicodeArray']) {
-            value = new Buffer(value).toString('base64');
+            value = new Buffer(encodeURI(value)).toString('base64');
         }
 
         value = Utils.stringToUnicode(value);