mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
dev
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user