|
@@ -53,7 +53,7 @@ module.exports =
|
|
/******/ __webpack_require__.p = "";
|
|
/******/ __webpack_require__.p = "";
|
|
|
|
|
|
/******/ // Load entry module and return exports
|
|
/******/ // Load entry module and return exports
|
|
-/******/ return __webpack_require__(__webpack_require__.s = 14);
|
|
|
|
|
|
+/******/ return __webpack_require__(__webpack_require__.s = 15);
|
|
/******/ })
|
|
/******/ })
|
|
/************************************************************************/
|
|
/************************************************************************/
|
|
/******/ ([
|
|
/******/ ([
|
|
@@ -350,9 +350,7 @@ module.exports =
|
|
var NodeUtils_1 = __webpack_require__(0);
|
|
var NodeUtils_1 = __webpack_require__(0);
|
|
|
|
|
|
var Node = function () {
|
|
var Node = function () {
|
|
- function Node() {
|
|
|
|
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
|
|
|
-
|
|
|
|
|
|
+ function Node(options) {
|
|
_classCallCheck(this, Node);
|
|
_classCallCheck(this, Node);
|
|
|
|
|
|
this.appendState = AppendState_1.AppendState.BeforeObfuscation;
|
|
this.appendState = AppendState_1.AppendState.BeforeObfuscation;
|
|
@@ -447,9 +445,7 @@ module.exports =
|
|
var Utils_1 = __webpack_require__(1);
|
|
var Utils_1 = __webpack_require__(1);
|
|
|
|
|
|
var NodeObfuscator = function () {
|
|
var NodeObfuscator = function () {
|
|
- function NodeObfuscator(nodes) {
|
|
|
|
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
|
|
|
-
|
|
|
|
|
|
+ function NodeObfuscator(nodes, options) {
|
|
_classCallCheck(this, NodeObfuscator);
|
|
_classCallCheck(this, NodeObfuscator);
|
|
|
|
|
|
this.nodes = nodes;
|
|
this.nodes = nodes;
|
|
@@ -459,7 +455,7 @@ module.exports =
|
|
_createClass(NodeObfuscator, [{
|
|
_createClass(NodeObfuscator, [{
|
|
key: "isReservedName",
|
|
key: "isReservedName",
|
|
value: function isReservedName(name) {
|
|
value: function isReservedName(name) {
|
|
- return this.options['reservedNames'].some(function (reservedName) {
|
|
|
|
|
|
+ return this.options.getOption('reservedNames').some(function (reservedName) {
|
|
return new RegExp(reservedName, 'g').test(name);
|
|
return new RegExp(reservedName, 'g').test(name);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -493,12 +489,12 @@ module.exports =
|
|
key: "replaceLiteralValueByUnicodeValue",
|
|
key: "replaceLiteralValueByUnicodeValue",
|
|
value: function replaceLiteralValueByUnicodeValue(nodeValue) {
|
|
value: function replaceLiteralValueByUnicodeValue(nodeValue) {
|
|
var value = nodeValue,
|
|
var value = nodeValue,
|
|
- replaceByUnicodeArrayFlag = Math.random() <= this.options['unicodeArrayThreshold'];
|
|
|
|
- if (this.options['encodeUnicodeLiterals'] && replaceByUnicodeArrayFlag) {
|
|
|
|
|
|
+ replaceByUnicodeArrayFlag = Math.random() <= this.options.getOption('unicodeArrayThreshold');
|
|
|
|
+ if (this.options.getOption('encodeUnicodeLiterals') && replaceByUnicodeArrayFlag) {
|
|
value = Utils_1.Utils.btoa(value);
|
|
value = Utils_1.Utils.btoa(value);
|
|
}
|
|
}
|
|
value = Utils_1.Utils.stringToUnicode(value);
|
|
value = Utils_1.Utils.stringToUnicode(value);
|
|
- if (!this.options['unicodeArray'] || !replaceByUnicodeArrayFlag) {
|
|
|
|
|
|
+ if (!this.options.getOption('unicodeArray') || !replaceByUnicodeArrayFlag) {
|
|
return value;
|
|
return value;
|
|
}
|
|
}
|
|
return this.replaceLiteralValueByUnicodeArrayCall(value);
|
|
return this.replaceLiteralValueByUnicodeArrayCall(value);
|
|
@@ -518,7 +514,7 @@ module.exports =
|
|
unicodeArrayNode.updateNodeData(value);
|
|
unicodeArrayNode.updateNodeData(value);
|
|
}
|
|
}
|
|
hexadecimalIndex = this.replaceLiteralNumberByHexadecimalValue(index);
|
|
hexadecimalIndex = this.replaceLiteralNumberByHexadecimalValue(index);
|
|
- if (this.options['wrapUnicodeArrayCalls']) {
|
|
|
|
|
|
+ if (this.options.getOption('wrapUnicodeArrayCalls')) {
|
|
return this.nodes.get('unicodeArrayCallsWrapper').getNodeIdentifier() + "('" + hexadecimalIndex + "')";
|
|
return this.nodes.get('unicodeArrayCallsWrapper').getNodeIdentifier() + "('" + hexadecimalIndex + "')";
|
|
}
|
|
}
|
|
return unicodeArrayNode.getNodeIdentifier() + "[" + hexadecimalIndex + "]";
|
|
return unicodeArrayNode.getNodeIdentifier() + "[" + hexadecimalIndex + "]";
|
|
@@ -631,11 +627,9 @@ module.exports =
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
- var Kernel_1 = __webpack_require__(39);
|
|
|
|
|
|
+ var Kernel_1 = __webpack_require__(16);
|
|
var esprima = __webpack_require__(7);
|
|
var esprima = __webpack_require__(7);
|
|
var escodegen = __webpack_require__(9);
|
|
var escodegen = __webpack_require__(9);
|
|
- var DefaultPreset_1 = __webpack_require__(37);
|
|
|
|
- var OptionsNormalizer_1 = __webpack_require__(16);
|
|
|
|
|
|
|
|
var JavaScriptObfuscator = function () {
|
|
var JavaScriptObfuscator = function () {
|
|
function JavaScriptObfuscator() {
|
|
function JavaScriptObfuscator() {
|
|
@@ -646,8 +640,9 @@ module.exports =
|
|
key: "obfuscate",
|
|
key: "obfuscate",
|
|
value: function obfuscate(sourceCode, customOptions) {
|
|
value: function obfuscate(sourceCode, customOptions) {
|
|
var astTree = esprima.parse(sourceCode),
|
|
var astTree = esprima.parse(sourceCode),
|
|
- options = OptionsNormalizer_1.OptionsNormalizer.normalize(Object.assign({}, DefaultPreset_1.DEFAULT_PRESET, customOptions)),
|
|
|
|
|
|
+ options = Kernel_1.default.get('IOptions'),
|
|
obfuscator = Kernel_1.default.get('IObfuscator');
|
|
obfuscator = Kernel_1.default.get('IObfuscator');
|
|
|
|
+ options.assign(customOptions);
|
|
astTree = obfuscator.obfuscateNode(astTree);
|
|
astTree = obfuscator.obfuscateNode(astTree);
|
|
return JavaScriptObfuscator.generateCode(astTree, options);
|
|
return JavaScriptObfuscator.generateCode(astTree, options);
|
|
}
|
|
}
|
|
@@ -655,11 +650,9 @@ module.exports =
|
|
key: "generateCode",
|
|
key: "generateCode",
|
|
value: function generateCode(astTree, options) {
|
|
value: function generateCode(astTree, options) {
|
|
var escodegenParams = Object.assign({}, JavaScriptObfuscator.escodegenParams);
|
|
var escodegenParams = Object.assign({}, JavaScriptObfuscator.escodegenParams);
|
|
- if (options.hasOwnProperty('compact')) {
|
|
|
|
- escodegenParams.format = {
|
|
|
|
- compact: options.compact
|
|
|
|
- };
|
|
|
|
- }
|
|
|
|
|
|
+ escodegenParams.format = {
|
|
|
|
+ compact: options.getOption('compact')
|
|
|
|
+ };
|
|
return escodegen.generate(astTree, escodegenParams);
|
|
return escodegen.generate(astTree, escodegenParams);
|
|
}
|
|
}
|
|
}]);
|
|
}]);
|
|
@@ -684,9 +677,7 @@ module.exports =
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
var NodesGroup = function () {
|
|
var NodesGroup = function () {
|
|
- function NodesGroup() {
|
|
|
|
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
|
|
|
-
|
|
|
|
|
|
+ function NodesGroup(options) {
|
|
_classCallCheck(this, NodesGroup);
|
|
_classCallCheck(this, NodesGroup);
|
|
|
|
|
|
this.nodes = new Map();
|
|
this.nodes = new Map();
|
|
@@ -730,21 +721,43 @@ module.exports =
|
|
/* 13 */
|
|
/* 13 */
|
|
/***/ function(module, exports) {
|
|
/***/ function(module, exports) {
|
|
|
|
|
|
- module.exports = require("babel-polyfill");
|
|
|
|
|
|
+ module.exports = require("inversify");
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
/* 14 */
|
|
/* 14 */
|
|
|
|
+/***/ function(module, exports) {
|
|
|
|
+
|
|
|
|
+ module.exports = require("babel-polyfill");
|
|
|
|
+
|
|
|
|
+/***/ },
|
|
|
|
+/* 15 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
"use strict";
|
|
"use strict";
|
|
|
|
|
|
- __webpack_require__(13);
|
|
|
|
|
|
+ __webpack_require__(14);
|
|
var JavaScriptObfuscator_1 = __webpack_require__(10);
|
|
var JavaScriptObfuscator_1 = __webpack_require__(10);
|
|
module.exports = JavaScriptObfuscator_1.JavaScriptObfuscator;
|
|
module.exports = JavaScriptObfuscator_1.JavaScriptObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 15 */
|
|
|
|
|
|
+/* 16 */
|
|
|
|
+/***/ function(module, exports, __webpack_require__) {
|
|
|
|
+
|
|
|
|
+ "use strict";
|
|
|
|
+ "use strict";
|
|
|
|
+
|
|
|
|
+ var inversify_1 = __webpack_require__(13);
|
|
|
|
+ var Obfuscator_1 = __webpack_require__(17);
|
|
|
|
+ var Options_1 = __webpack_require__(18);
|
|
|
|
+ var kernel = new inversify_1.Kernel();
|
|
|
|
+ kernel.bind('IOptions').to(Options_1.Options);
|
|
|
|
+ kernel.bind('IObfuscator').to(Obfuscator_1.Obfuscator);
|
|
|
|
+ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
+ exports.default = kernel;
|
|
|
|
+
|
|
|
|
+/***/ },
|
|
|
|
+/* 17 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -767,27 +780,30 @@ module.exports =
|
|
var __metadata = undefined && undefined.__metadata || function (k, v) {
|
|
var __metadata = undefined && undefined.__metadata || function (k, v) {
|
|
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
};
|
|
};
|
|
- var inversify_1 = __webpack_require__(38);
|
|
|
|
|
|
+ var __param = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
|
|
+ return function (target, key) {
|
|
|
|
+ decorator(target, key, paramIndex);
|
|
|
|
+ };
|
|
|
|
+ };
|
|
|
|
+ var inversify_1 = __webpack_require__(13);
|
|
var estraverse = __webpack_require__(4);
|
|
var estraverse = __webpack_require__(4);
|
|
var AppendState_1 = __webpack_require__(6);
|
|
var AppendState_1 = __webpack_require__(6);
|
|
var NodeType_1 = __webpack_require__(3);
|
|
var NodeType_1 = __webpack_require__(3);
|
|
- var CatchClauseObfuscator_1 = __webpack_require__(29);
|
|
|
|
- var ConsoleOutputDisableExpressionNode_1 = __webpack_require__(17);
|
|
|
|
- var DebugProtectionNodesGroup_1 = __webpack_require__(26);
|
|
|
|
- var FunctionDeclarationObfuscator_1 = __webpack_require__(30);
|
|
|
|
- var FunctionObfuscator_1 = __webpack_require__(31);
|
|
|
|
- var LiteralObfuscator_1 = __webpack_require__(32);
|
|
|
|
- var MemberExpressionObfuscator_1 = __webpack_require__(33);
|
|
|
|
- var MethodDefinitionObfuscator_1 = __webpack_require__(34);
|
|
|
|
|
|
+ var CatchClauseObfuscator_1 = __webpack_require__(31);
|
|
|
|
+ var ConsoleOutputDisableExpressionNode_1 = __webpack_require__(19);
|
|
|
|
+ var DebugProtectionNodesGroup_1 = __webpack_require__(28);
|
|
|
|
+ var FunctionDeclarationObfuscator_1 = __webpack_require__(32);
|
|
|
|
+ var FunctionObfuscator_1 = __webpack_require__(33);
|
|
|
|
+ var LiteralObfuscator_1 = __webpack_require__(34);
|
|
|
|
+ var MemberExpressionObfuscator_1 = __webpack_require__(35);
|
|
|
|
+ var MethodDefinitionObfuscator_1 = __webpack_require__(36);
|
|
var NodeUtils_1 = __webpack_require__(0);
|
|
var NodeUtils_1 = __webpack_require__(0);
|
|
- var ObjectExpressionObfuscator_1 = __webpack_require__(35);
|
|
|
|
- var SelfDefendingNodesGroup_1 = __webpack_require__(27);
|
|
|
|
- var UnicodeArrayNodesGroup_1 = __webpack_require__(28);
|
|
|
|
- var VariableDeclarationObfuscator_1 = __webpack_require__(36);
|
|
|
|
|
|
+ var ObjectExpressionObfuscator_1 = __webpack_require__(37);
|
|
|
|
+ var SelfDefendingNodesGroup_1 = __webpack_require__(29);
|
|
|
|
+ var UnicodeArrayNodesGroup_1 = __webpack_require__(30);
|
|
|
|
+ var VariableDeclarationObfuscator_1 = __webpack_require__(38);
|
|
var Obfuscator = function () {
|
|
var Obfuscator = function () {
|
|
- function Obfuscator() {
|
|
|
|
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
|
|
|
-
|
|
|
|
|
|
+ function Obfuscator(options) {
|
|
_classCallCheck(this, Obfuscator);
|
|
_classCallCheck(this, Obfuscator);
|
|
|
|
|
|
this.nodes = new Map();
|
|
this.nodes = new Map();
|
|
@@ -864,16 +880,16 @@ module.exports =
|
|
}, {
|
|
}, {
|
|
key: "setNewNodes",
|
|
key: "setNewNodes",
|
|
value: function setNewNodes() {
|
|
value: function setNewNodes() {
|
|
- if (this.options['selfDefending']) {
|
|
|
|
|
|
+ if (this.options.getOption('selfDefending')) {
|
|
this.setNodesGroup(new SelfDefendingNodesGroup_1.SelfDefendingNodesGroup(this.options));
|
|
this.setNodesGroup(new SelfDefendingNodesGroup_1.SelfDefendingNodesGroup(this.options));
|
|
}
|
|
}
|
|
- if (this.options['disableConsoleOutput']) {
|
|
|
|
- this.setNode('consoleOutputDisableExpressionNode', new ConsoleOutputDisableExpressionNode_1.ConsoleOutputDisableExpressionNode());
|
|
|
|
|
|
+ if (this.options.getOption('disableConsoleOutput')) {
|
|
|
|
+ this.setNode('consoleOutputDisableExpressionNode', new ConsoleOutputDisableExpressionNode_1.ConsoleOutputDisableExpressionNode(this.options));
|
|
}
|
|
}
|
|
- if (this.options['debugProtection']) {
|
|
|
|
|
|
+ if (this.options.getOption('debugProtection')) {
|
|
this.setNodesGroup(new DebugProtectionNodesGroup_1.DebugProtectionNodesGroup(this.options));
|
|
this.setNodesGroup(new DebugProtectionNodesGroup_1.DebugProtectionNodesGroup(this.options));
|
|
}
|
|
}
|
|
- if (this.options['unicodeArray']) {
|
|
|
|
|
|
+ if (this.options.getOption('unicodeArray')) {
|
|
this.setNodesGroup(new UnicodeArrayNodesGroup_1.UnicodeArrayNodesGroup(this.options));
|
|
this.setNodesGroup(new UnicodeArrayNodesGroup_1.UnicodeArrayNodesGroup(this.options));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -881,52 +897,87 @@ module.exports =
|
|
|
|
|
|
return Obfuscator;
|
|
return Obfuscator;
|
|
}();
|
|
}();
|
|
- Obfuscator = __decorate([inversify_1.injectable(), __metadata('design:paramtypes', [Object])], Obfuscator);
|
|
|
|
|
|
+ Obfuscator = __decorate([inversify_1.injectable(), __param(0, inversify_1.inject('IOptions')), __metadata('design:paramtypes', [Object])], Obfuscator);
|
|
exports.Obfuscator = Obfuscator;
|
|
exports.Obfuscator = Obfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 16 */
|
|
|
|
-/***/ function(module, exports) {
|
|
|
|
|
|
+/* 18 */
|
|
|
|
+/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
"use strict";
|
|
"use strict";
|
|
|
|
|
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
|
|
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
|
|
|
|
+
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
- var OptionsNormalizer = function () {
|
|
|
|
- function OptionsNormalizer() {
|
|
|
|
- _classCallCheck(this, OptionsNormalizer);
|
|
|
|
|
|
+ var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
|
|
+ var c = arguments.length,
|
|
|
|
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
|
|
+ d;
|
|
|
|
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
|
|
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
|
|
+ }return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
|
|
+ };
|
|
|
|
+ var __metadata = undefined && undefined.__metadata || function (k, v) {
|
|
|
|
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
|
|
+ };
|
|
|
|
+ var inversify_1 = __webpack_require__(13);
|
|
|
|
+ var DefaultPreset_1 = __webpack_require__(39);
|
|
|
|
+ var Options_1 = void 0;
|
|
|
|
+ var Options = Options_1 = function () {
|
|
|
|
+ function Options() {
|
|
|
|
+ _classCallCheck(this, Options);
|
|
}
|
|
}
|
|
|
|
|
|
- _createClass(OptionsNormalizer, null, [{
|
|
|
|
- key: 'normalize',
|
|
|
|
- value: function normalize(options) {
|
|
|
|
- var normalizedOptions = Object.assign({}, options);
|
|
|
|
- normalizedOptions = OptionsNormalizer.unicodeArrayRule(normalizedOptions);
|
|
|
|
- normalizedOptions = OptionsNormalizer.unicodeArrayThresholdRule(normalizedOptions);
|
|
|
|
- normalizedOptions = OptionsNormalizer.selfDefendingRule(normalizedOptions);
|
|
|
|
- return normalizedOptions;
|
|
|
|
|
|
+ _createClass(Options, [{
|
|
|
|
+ key: "assign",
|
|
|
|
+ value: function assign(options) {
|
|
|
|
+ if (this.options) {
|
|
|
|
+ throw new Error('Options can\'t be reassigned!');
|
|
|
|
+ }
|
|
|
|
+ this.options = Object.assign({}, DefaultPreset_1.DEFAULT_PRESET, options);
|
|
|
|
+ this.normalizeOptions();
|
|
}
|
|
}
|
|
}, {
|
|
}, {
|
|
- key: 'selfDefendingRule',
|
|
|
|
|
|
+ key: "getOption",
|
|
|
|
+ value: function getOption(optionName) {
|
|
|
|
+ return this.options[optionName];
|
|
|
|
+ }
|
|
|
|
+ }, {
|
|
|
|
+ key: "getOptions",
|
|
|
|
+ value: function getOptions() {
|
|
|
|
+ return this.options;
|
|
|
|
+ }
|
|
|
|
+ }, {
|
|
|
|
+ key: "normalizeOptions",
|
|
|
|
+ value: function normalizeOptions() {
|
|
|
|
+ var normalizedOptions = Object.assign({}, this.options);
|
|
|
|
+ normalizedOptions = Options_1.unicodeArrayRule(normalizedOptions);
|
|
|
|
+ normalizedOptions = Options_1.unicodeArrayThresholdRule(normalizedOptions);
|
|
|
|
+ normalizedOptions = Options_1.selfDefendingRule(normalizedOptions);
|
|
|
|
+ this.options = Object.freeze(normalizedOptions);
|
|
|
|
+ }
|
|
|
|
+ }], [{
|
|
|
|
+ key: "selfDefendingRule",
|
|
value: function selfDefendingRule(options) {
|
|
value: function selfDefendingRule(options) {
|
|
if (options['selfDefending']) {
|
|
if (options['selfDefending']) {
|
|
- Object.assign(options, OptionsNormalizer.SELF_DEFENDING_OPTIONS);
|
|
|
|
|
|
+ Object.assign(options, Options_1.SELF_DEFENDING_OPTIONS);
|
|
}
|
|
}
|
|
return options;
|
|
return options;
|
|
}
|
|
}
|
|
}, {
|
|
}, {
|
|
- key: 'unicodeArrayRule',
|
|
|
|
|
|
+ key: "unicodeArrayRule",
|
|
value: function unicodeArrayRule(options) {
|
|
value: function unicodeArrayRule(options) {
|
|
if (!options['unicodeArray']) {
|
|
if (!options['unicodeArray']) {
|
|
- Object.assign(options, OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS);
|
|
|
|
|
|
+ Object.assign(options, Options_1.DISABLED_UNICODE_ARRAY_OPTIONS);
|
|
}
|
|
}
|
|
return options;
|
|
return options;
|
|
}
|
|
}
|
|
}, {
|
|
}, {
|
|
- key: 'unicodeArrayThresholdRule',
|
|
|
|
|
|
+ key: "unicodeArrayThresholdRule",
|
|
value: function unicodeArrayThresholdRule(options) {
|
|
value: function unicodeArrayThresholdRule(options) {
|
|
var minValue = 0,
|
|
var minValue = 0,
|
|
maxValue = 1;
|
|
maxValue = 1;
|
|
@@ -935,24 +986,24 @@ module.exports =
|
|
}
|
|
}
|
|
}]);
|
|
}]);
|
|
|
|
|
|
- return OptionsNormalizer;
|
|
|
|
|
|
+ return Options;
|
|
}();
|
|
}();
|
|
-
|
|
|
|
- OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS = {
|
|
|
|
|
|
+ Options.DISABLED_UNICODE_ARRAY_OPTIONS = {
|
|
encodeUnicodeLiterals: false,
|
|
encodeUnicodeLiterals: false,
|
|
rotateUnicodeArray: false,
|
|
rotateUnicodeArray: false,
|
|
unicodeArray: false,
|
|
unicodeArray: false,
|
|
unicodeArrayThreshold: 0,
|
|
unicodeArrayThreshold: 0,
|
|
wrapUnicodeArrayCalls: false
|
|
wrapUnicodeArrayCalls: false
|
|
};
|
|
};
|
|
- OptionsNormalizer.SELF_DEFENDING_OPTIONS = {
|
|
|
|
|
|
+ Options.SELF_DEFENDING_OPTIONS = {
|
|
compact: true,
|
|
compact: true,
|
|
selfDefending: true
|
|
selfDefending: true
|
|
};
|
|
};
|
|
- exports.OptionsNormalizer = OptionsNormalizer;
|
|
|
|
|
|
+ Options = Options_1 = __decorate([inversify_1.injectable(), __metadata('design:paramtypes', [])], Options);
|
|
|
|
+ exports.Options = Options;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 17 */
|
|
|
|
|
|
+/* 19 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -973,9 +1024,7 @@ module.exports =
|
|
var ConsoleOutputDisableExpressionNode = function (_Node_1$Node) {
|
|
var ConsoleOutputDisableExpressionNode = function (_Node_1$Node) {
|
|
_inherits(ConsoleOutputDisableExpressionNode, _Node_1$Node);
|
|
_inherits(ConsoleOutputDisableExpressionNode, _Node_1$Node);
|
|
|
|
|
|
- function ConsoleOutputDisableExpressionNode() {
|
|
|
|
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
|
|
|
-
|
|
|
|
|
|
+ function ConsoleOutputDisableExpressionNode(options) {
|
|
_classCallCheck(this, ConsoleOutputDisableExpressionNode);
|
|
_classCallCheck(this, ConsoleOutputDisableExpressionNode);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ConsoleOutputDisableExpressionNode).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ConsoleOutputDisableExpressionNode).call(this, options));
|
|
@@ -1002,7 +1051,7 @@ module.exports =
|
|
exports.ConsoleOutputDisableExpressionNode = ConsoleOutputDisableExpressionNode;
|
|
exports.ConsoleOutputDisableExpressionNode = ConsoleOutputDisableExpressionNode;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 18 */
|
|
|
|
|
|
+/* 20 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1023,9 +1072,7 @@ module.exports =
|
|
var DebugProtectionFunctionCallNode = function (_Node_1$Node) {
|
|
var DebugProtectionFunctionCallNode = function (_Node_1$Node) {
|
|
_inherits(DebugProtectionFunctionCallNode, _Node_1$Node);
|
|
_inherits(DebugProtectionFunctionCallNode, _Node_1$Node);
|
|
|
|
|
|
- function DebugProtectionFunctionCallNode(debugProtectionFunctionName) {
|
|
|
|
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
|
|
|
-
|
|
|
|
|
|
+ function DebugProtectionFunctionCallNode(debugProtectionFunctionName, options) {
|
|
_classCallCheck(this, DebugProtectionFunctionCallNode);
|
|
_classCallCheck(this, DebugProtectionFunctionCallNode);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionCallNode).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionCallNode).call(this, options));
|
|
@@ -1063,7 +1110,7 @@ module.exports =
|
|
exports.DebugProtectionFunctionCallNode = DebugProtectionFunctionCallNode;
|
|
exports.DebugProtectionFunctionCallNode = DebugProtectionFunctionCallNode;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 19 */
|
|
|
|
|
|
+/* 21 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1084,9 +1131,7 @@ module.exports =
|
|
var DebugProtectionFunctionIntervalNode = function (_Node_1$Node) {
|
|
var DebugProtectionFunctionIntervalNode = function (_Node_1$Node) {
|
|
_inherits(DebugProtectionFunctionIntervalNode, _Node_1$Node);
|
|
_inherits(DebugProtectionFunctionIntervalNode, _Node_1$Node);
|
|
|
|
|
|
- function DebugProtectionFunctionIntervalNode(debugProtectionFunctionName) {
|
|
|
|
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
|
|
|
-
|
|
|
|
|
|
+ function DebugProtectionFunctionIntervalNode(debugProtectionFunctionName, options) {
|
|
_classCallCheck(this, DebugProtectionFunctionIntervalNode);
|
|
_classCallCheck(this, DebugProtectionFunctionIntervalNode);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionIntervalNode).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionIntervalNode).call(this, options));
|
|
@@ -1149,7 +1194,7 @@ module.exports =
|
|
exports.DebugProtectionFunctionIntervalNode = DebugProtectionFunctionIntervalNode;
|
|
exports.DebugProtectionFunctionIntervalNode = DebugProtectionFunctionIntervalNode;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 20 */
|
|
|
|
|
|
+/* 22 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1171,9 +1216,7 @@ module.exports =
|
|
var DebugProtectionFunctionNode = function (_Node_1$Node) {
|
|
var DebugProtectionFunctionNode = function (_Node_1$Node) {
|
|
_inherits(DebugProtectionFunctionNode, _Node_1$Node);
|
|
_inherits(DebugProtectionFunctionNode, _Node_1$Node);
|
|
|
|
|
|
- function DebugProtectionFunctionNode(debugProtectionFunctionName) {
|
|
|
|
- var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
|
|
|
-
|
|
|
|
|
|
+ function DebugProtectionFunctionNode(debugProtectionFunctionName, options) {
|
|
_classCallCheck(this, DebugProtectionFunctionNode);
|
|
_classCallCheck(this, DebugProtectionFunctionNode);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionNode).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionNode).call(this, options));
|
|
@@ -1208,7 +1251,7 @@ module.exports =
|
|
exports.DebugProtectionFunctionNode = DebugProtectionFunctionNode;
|
|
exports.DebugProtectionFunctionNode = DebugProtectionFunctionNode;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 21 */
|
|
|
|
|
|
+/* 23 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1234,9 +1277,7 @@ module.exports =
|
|
var SelfDefendingUnicodeNode = function (_Node_1$Node) {
|
|
var SelfDefendingUnicodeNode = function (_Node_1$Node) {
|
|
_inherits(SelfDefendingUnicodeNode, _Node_1$Node);
|
|
_inherits(SelfDefendingUnicodeNode, _Node_1$Node);
|
|
|
|
|
|
- function SelfDefendingUnicodeNode() {
|
|
|
|
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
|
|
|
-
|
|
|
|
|
|
+ function SelfDefendingUnicodeNode(options) {
|
|
_classCallCheck(this, SelfDefendingUnicodeNode);
|
|
_classCallCheck(this, SelfDefendingUnicodeNode);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(SelfDefendingUnicodeNode).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(SelfDefendingUnicodeNode).call(this, options));
|
|
@@ -1271,7 +1312,7 @@ module.exports =
|
|
exports.SelfDefendingUnicodeNode = SelfDefendingUnicodeNode;
|
|
exports.SelfDefendingUnicodeNode = SelfDefendingUnicodeNode;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 22 */
|
|
|
|
|
|
+/* 24 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1296,9 +1337,7 @@ module.exports =
|
|
var UnicodeArrayCallsWrapper = function (_Node_1$Node) {
|
|
var UnicodeArrayCallsWrapper = function (_Node_1$Node) {
|
|
_inherits(UnicodeArrayCallsWrapper, _Node_1$Node);
|
|
_inherits(UnicodeArrayCallsWrapper, _Node_1$Node);
|
|
|
|
|
|
- function UnicodeArrayCallsWrapper(unicodeArrayCallsWrapperName, unicodeArrayName, unicodeArray) {
|
|
|
|
- var options = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
|
|
|
|
-
|
|
|
|
|
|
+ function UnicodeArrayCallsWrapper(unicodeArrayCallsWrapperName, unicodeArrayName, unicodeArray, options) {
|
|
_classCallCheck(this, UnicodeArrayCallsWrapper);
|
|
_classCallCheck(this, UnicodeArrayCallsWrapper);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayCallsWrapper).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayCallsWrapper).call(this, options));
|
|
@@ -1347,7 +1386,7 @@ module.exports =
|
|
exports.UnicodeArrayCallsWrapper = UnicodeArrayCallsWrapper;
|
|
exports.UnicodeArrayCallsWrapper = UnicodeArrayCallsWrapper;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 23 */
|
|
|
|
|
|
+/* 25 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1375,9 +1414,7 @@ module.exports =
|
|
var UnicodeArrayDecodeNode = function (_Node_1$Node) {
|
|
var UnicodeArrayDecodeNode = function (_Node_1$Node) {
|
|
_inherits(UnicodeArrayDecodeNode, _Node_1$Node);
|
|
_inherits(UnicodeArrayDecodeNode, _Node_1$Node);
|
|
|
|
|
|
- function UnicodeArrayDecodeNode(unicodeArrayName, unicodeArray) {
|
|
|
|
- var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
|
|
|
-
|
|
|
|
|
|
+ function UnicodeArrayDecodeNode(unicodeArrayName, unicodeArray, options) {
|
|
_classCallCheck(this, UnicodeArrayDecodeNode);
|
|
_classCallCheck(this, UnicodeArrayDecodeNode);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayDecodeNode).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayDecodeNode).call(this, options));
|
|
@@ -1412,7 +1449,7 @@ module.exports =
|
|
tempArrayName = Utils_1.Utils.getRandomVariableName();
|
|
tempArrayName = Utils_1.Utils.getRandomVariableName();
|
|
var code = '',
|
|
var code = '',
|
|
node = void 0;
|
|
node = void 0;
|
|
- if (this.options['selfDefending']) {
|
|
|
|
|
|
+ if (this.options.getOption('selfDefending')) {
|
|
code = '\n var ' + environmentName + ' = function(){return ' + Utils_1.Utils.stringToUnicode('dev') + ';};\n \n Function(' + Utils_1.Utils.stringToUnicode('return/\\w+ *\\(\\) *{\\w+ *[\'|"].+[\'|"];? *}/') + ')()[' + Utils_1.Utils.stringToUnicode('test') + '](' + environmentName + '[' + Utils_1.Utils.stringToUnicode('toString') + ']()) !== ' + JSFuck_1.JSFuck.True + ' && !' + this.unicodeArrayName + '++ ? [][\'filter\'][\'constructor\'](' + Utils_1.Utils.stringToJSFuck('while') + ' + \'(' + JSFuck_1.JSFuck.True + '){}\')() : Function(' + Utils_1.Utils.stringToUnicode('a') + ', atob(' + Utils_1.Utils.stringToUnicode(Utils_1.Utils.btoa('a.call()')) + '))(' + forLoopFunctionName + ') ? [][\'filter\'][\'constructor\'](' + Utils_1.Utils.stringToJSFuck('while') + ' + \'(' + JSFuck_1.JSFuck.False + '){}\')() : [][\'filter\'][\'constructor\'](' + Utils_1.Utils.stringToJSFuck('while') + ' + \'(' + JSFuck_1.JSFuck.False + '){}\')();\n ';
|
|
code = '\n var ' + environmentName + ' = function(){return ' + Utils_1.Utils.stringToUnicode('dev') + ';};\n \n Function(' + Utils_1.Utils.stringToUnicode('return/\\w+ *\\(\\) *{\\w+ *[\'|"].+[\'|"];? *}/') + ')()[' + Utils_1.Utils.stringToUnicode('test') + '](' + environmentName + '[' + Utils_1.Utils.stringToUnicode('toString') + ']()) !== ' + JSFuck_1.JSFuck.True + ' && !' + this.unicodeArrayName + '++ ? [][\'filter\'][\'constructor\'](' + Utils_1.Utils.stringToJSFuck('while') + ' + \'(' + JSFuck_1.JSFuck.True + '){}\')() : Function(' + Utils_1.Utils.stringToUnicode('a') + ', atob(' + Utils_1.Utils.stringToUnicode(Utils_1.Utils.btoa('a.call()')) + '))(' + forLoopFunctionName + ') ? [][\'filter\'][\'constructor\'](' + Utils_1.Utils.stringToJSFuck('while') + ' + \'(' + JSFuck_1.JSFuck.False + '){}\')() : [][\'filter\'][\'constructor\'](' + Utils_1.Utils.stringToJSFuck('while') + ' + \'(' + JSFuck_1.JSFuck.False + '){}\')();\n ';
|
|
} else {
|
|
} else {
|
|
code = forLoopFunctionName + '();';
|
|
code = forLoopFunctionName + '();';
|
|
@@ -1429,7 +1466,7 @@ module.exports =
|
|
exports.UnicodeArrayDecodeNode = UnicodeArrayDecodeNode;
|
|
exports.UnicodeArrayDecodeNode = UnicodeArrayDecodeNode;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 24 */
|
|
|
|
|
|
+/* 26 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1457,7 +1494,7 @@ module.exports =
|
|
|
|
|
|
function UnicodeArrayNode(unicodeArrayName) {
|
|
function UnicodeArrayNode(unicodeArrayName) {
|
|
var unicodeArrayRotateValue = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
|
|
var unicodeArrayRotateValue = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
|
|
- var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
|
|
|
|
|
+ var options = arguments[2];
|
|
|
|
|
|
_classCallCheck(this, UnicodeArrayNode);
|
|
_classCallCheck(this, UnicodeArrayNode);
|
|
|
|
|
|
@@ -1539,7 +1576,7 @@ module.exports =
|
|
exports.UnicodeArrayNode = UnicodeArrayNode;
|
|
exports.UnicodeArrayNode = UnicodeArrayNode;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 25 */
|
|
|
|
|
|
+/* 27 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1567,9 +1604,7 @@ module.exports =
|
|
var UnicodeArrayRotateFunctionNode = function (_Node_1$Node) {
|
|
var UnicodeArrayRotateFunctionNode = function (_Node_1$Node) {
|
|
_inherits(UnicodeArrayRotateFunctionNode, _Node_1$Node);
|
|
_inherits(UnicodeArrayRotateFunctionNode, _Node_1$Node);
|
|
|
|
|
|
- function UnicodeArrayRotateFunctionNode(unicodeArrayName, unicodeArray, unicodeArrayRotateValue) {
|
|
|
|
- var options = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
|
|
|
|
-
|
|
|
|
|
|
+ function UnicodeArrayRotateFunctionNode(unicodeArrayName, unicodeArray, unicodeArrayRotateValue, options) {
|
|
_classCallCheck(this, UnicodeArrayRotateFunctionNode);
|
|
_classCallCheck(this, UnicodeArrayRotateFunctionNode);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayRotateFunctionNode).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayRotateFunctionNode).call(this, options));
|
|
@@ -1604,7 +1639,7 @@ module.exports =
|
|
timesArgumentName = Utils_1.Utils.getRandomVariableName(),
|
|
timesArgumentName = Utils_1.Utils.getRandomVariableName(),
|
|
whileFunctionName = Utils_1.Utils.getRandomVariableName(),
|
|
whileFunctionName = Utils_1.Utils.getRandomVariableName(),
|
|
node = void 0;
|
|
node = void 0;
|
|
- if (this.options['selfDefending']) {
|
|
|
|
|
|
+ if (this.options.getOption('selfDefending')) {
|
|
code = JavaScriptObfuscator_1.JavaScriptObfuscator.obfuscate("\n (function () {\n var func = function(){return " + Utils_1.Utils.stringToUnicode('dev') + ";};\n \n !Function(" + Utils_1.Utils.stringToUnicode("return/\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}/") + ")().test(func.toString()) ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.True + "){}')() : Function(" + Utils_1.Utils.stringToUnicode('a') + ", " + Utils_1.Utils.stringToUnicode('b') + ", " + Utils_1.Utils.stringToUnicode('a(++b)') + ")(" + whileFunctionName + ", " + timesName + ") ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.False + "){}')() : []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.False + "){}')();\n })();\n ", NoCustomNodesPreset_1.NO_CUSTOM_NODES_PRESET);
|
|
code = JavaScriptObfuscator_1.JavaScriptObfuscator.obfuscate("\n (function () {\n var func = function(){return " + Utils_1.Utils.stringToUnicode('dev') + ";};\n \n !Function(" + Utils_1.Utils.stringToUnicode("return/\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}/") + ")().test(func.toString()) ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.True + "){}')() : Function(" + Utils_1.Utils.stringToUnicode('a') + ", " + Utils_1.Utils.stringToUnicode('b') + ", " + Utils_1.Utils.stringToUnicode('a(++b)') + ")(" + whileFunctionName + ", " + timesName + ") ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.False + "){}')() : []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.False + "){}')();\n })();\n ", NoCustomNodesPreset_1.NO_CUSTOM_NODES_PRESET);
|
|
} else {
|
|
} else {
|
|
code = whileFunctionName + "(++" + timesName + ")";
|
|
code = whileFunctionName + "(++" + timesName + ")";
|
|
@@ -1621,7 +1656,7 @@ module.exports =
|
|
exports.UnicodeArrayRotateFunctionNode = UnicodeArrayRotateFunctionNode;
|
|
exports.UnicodeArrayRotateFunctionNode = UnicodeArrayRotateFunctionNode;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 26 */
|
|
|
|
|
|
+/* 28 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1633,18 +1668,16 @@ module.exports =
|
|
|
|
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
|
- var DebugProtectionFunctionCallNode_1 = __webpack_require__(18);
|
|
|
|
- var DebugProtectionFunctionIntervalNode_1 = __webpack_require__(19);
|
|
|
|
- var DebugProtectionFunctionNode_1 = __webpack_require__(20);
|
|
|
|
|
|
+ var DebugProtectionFunctionCallNode_1 = __webpack_require__(20);
|
|
|
|
+ var DebugProtectionFunctionIntervalNode_1 = __webpack_require__(21);
|
|
|
|
+ var DebugProtectionFunctionNode_1 = __webpack_require__(22);
|
|
var NodesGroup_1 = __webpack_require__(11);
|
|
var NodesGroup_1 = __webpack_require__(11);
|
|
var Utils_1 = __webpack_require__(1);
|
|
var Utils_1 = __webpack_require__(1);
|
|
|
|
|
|
var DebugProtectionNodesGroup = function (_NodesGroup_1$NodesGr) {
|
|
var DebugProtectionNodesGroup = function (_NodesGroup_1$NodesGr) {
|
|
_inherits(DebugProtectionNodesGroup, _NodesGroup_1$NodesGr);
|
|
_inherits(DebugProtectionNodesGroup, _NodesGroup_1$NodesGr);
|
|
|
|
|
|
- function DebugProtectionNodesGroup() {
|
|
|
|
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
|
|
|
-
|
|
|
|
|
|
+ function DebugProtectionNodesGroup(options) {
|
|
_classCallCheck(this, DebugProtectionNodesGroup);
|
|
_classCallCheck(this, DebugProtectionNodesGroup);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionNodesGroup).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionNodesGroup).call(this, options));
|
|
@@ -1652,7 +1685,7 @@ module.exports =
|
|
_this.debugProtectionFunctionIdentifier = Utils_1.Utils.getRandomVariableName();
|
|
_this.debugProtectionFunctionIdentifier = Utils_1.Utils.getRandomVariableName();
|
|
_this.nodes.set('debugProtectionFunctionNode', new DebugProtectionFunctionNode_1.DebugProtectionFunctionNode(_this.debugProtectionFunctionIdentifier, _this.options));
|
|
_this.nodes.set('debugProtectionFunctionNode', new DebugProtectionFunctionNode_1.DebugProtectionFunctionNode(_this.debugProtectionFunctionIdentifier, _this.options));
|
|
_this.nodes.set('debugProtectionFunctionCallNode', new DebugProtectionFunctionCallNode_1.DebugProtectionFunctionCallNode(_this.debugProtectionFunctionIdentifier, _this.options));
|
|
_this.nodes.set('debugProtectionFunctionCallNode', new DebugProtectionFunctionCallNode_1.DebugProtectionFunctionCallNode(_this.debugProtectionFunctionIdentifier, _this.options));
|
|
- if (_this.options['debugProtectionInterval']) {
|
|
|
|
|
|
+ if (_this.options.getOption('debugProtectionInterval')) {
|
|
_this.nodes.set('debugProtectionFunctionIntervalNode', new DebugProtectionFunctionIntervalNode_1.DebugProtectionFunctionIntervalNode(_this.debugProtectionFunctionIdentifier, _this.options));
|
|
_this.nodes.set('debugProtectionFunctionIntervalNode', new DebugProtectionFunctionIntervalNode_1.DebugProtectionFunctionIntervalNode(_this.debugProtectionFunctionIdentifier, _this.options));
|
|
}
|
|
}
|
|
return _this;
|
|
return _this;
|
|
@@ -1664,7 +1697,7 @@ module.exports =
|
|
exports.DebugProtectionNodesGroup = DebugProtectionNodesGroup;
|
|
exports.DebugProtectionNodesGroup = DebugProtectionNodesGroup;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 27 */
|
|
|
|
|
|
+/* 29 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1677,14 +1710,12 @@ module.exports =
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
|
var NodesGroup_1 = __webpack_require__(11);
|
|
var NodesGroup_1 = __webpack_require__(11);
|
|
- var SelfDefendingUnicodeNode_1 = __webpack_require__(21);
|
|
|
|
|
|
+ var SelfDefendingUnicodeNode_1 = __webpack_require__(23);
|
|
|
|
|
|
var SelfDefendingNodesGroup = function (_NodesGroup_1$NodesGr) {
|
|
var SelfDefendingNodesGroup = function (_NodesGroup_1$NodesGr) {
|
|
_inherits(SelfDefendingNodesGroup, _NodesGroup_1$NodesGr);
|
|
_inherits(SelfDefendingNodesGroup, _NodesGroup_1$NodesGr);
|
|
|
|
|
|
- function SelfDefendingNodesGroup() {
|
|
|
|
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
|
|
|
-
|
|
|
|
|
|
+ function SelfDefendingNodesGroup(options) {
|
|
_classCallCheck(this, SelfDefendingNodesGroup);
|
|
_classCallCheck(this, SelfDefendingNodesGroup);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(SelfDefendingNodesGroup).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(SelfDefendingNodesGroup).call(this, options));
|
|
@@ -1699,7 +1730,7 @@ module.exports =
|
|
exports.SelfDefendingNodesGroup = SelfDefendingNodesGroup;
|
|
exports.SelfDefendingNodesGroup = SelfDefendingNodesGroup;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 28 */
|
|
|
|
|
|
+/* 30 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1712,35 +1743,33 @@ module.exports =
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
|
var NodesGroup_1 = __webpack_require__(11);
|
|
var NodesGroup_1 = __webpack_require__(11);
|
|
- var UnicodeArrayCallsWrapper_1 = __webpack_require__(22);
|
|
|
|
- var UnicodeArrayDecodeNode_1 = __webpack_require__(23);
|
|
|
|
- var UnicodeArrayNode_1 = __webpack_require__(24);
|
|
|
|
- var UnicodeArrayRotateFunctionNode_1 = __webpack_require__(25);
|
|
|
|
|
|
+ var UnicodeArrayCallsWrapper_1 = __webpack_require__(24);
|
|
|
|
+ var UnicodeArrayDecodeNode_1 = __webpack_require__(25);
|
|
|
|
+ var UnicodeArrayNode_1 = __webpack_require__(26);
|
|
|
|
+ var UnicodeArrayRotateFunctionNode_1 = __webpack_require__(27);
|
|
var Utils_1 = __webpack_require__(1);
|
|
var Utils_1 = __webpack_require__(1);
|
|
|
|
|
|
var UnicodeArrayNodesGroup = function (_NodesGroup_1$NodesGr) {
|
|
var UnicodeArrayNodesGroup = function (_NodesGroup_1$NodesGr) {
|
|
_inherits(UnicodeArrayNodesGroup, _NodesGroup_1$NodesGr);
|
|
_inherits(UnicodeArrayNodesGroup, _NodesGroup_1$NodesGr);
|
|
|
|
|
|
- function UnicodeArrayNodesGroup() {
|
|
|
|
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
|
|
|
-
|
|
|
|
|
|
+ function UnicodeArrayNodesGroup(options) {
|
|
_classCallCheck(this, UnicodeArrayNodesGroup);
|
|
_classCallCheck(this, UnicodeArrayNodesGroup);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayNodesGroup).call(this, options));
|
|
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayNodesGroup).call(this, options));
|
|
|
|
|
|
_this.unicodeArrayName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH);
|
|
_this.unicodeArrayName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH);
|
|
_this.unicodeArrayTranslatorName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH);
|
|
_this.unicodeArrayTranslatorName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH);
|
|
- _this.unicodeArrayRotateValue = _this.options['rotateUnicodeArray'] ? Utils_1.Utils.getRandomInteger(100, 500) : 0;
|
|
|
|
|
|
+ _this.unicodeArrayRotateValue = _this.options.getOption('rotateUnicodeArray') ? Utils_1.Utils.getRandomInteger(100, 500) : 0;
|
|
var unicodeArrayNode = new UnicodeArrayNode_1.UnicodeArrayNode(_this.unicodeArrayName, _this.unicodeArrayRotateValue, _this.options),
|
|
var unicodeArrayNode = new UnicodeArrayNode_1.UnicodeArrayNode(_this.unicodeArrayName, _this.unicodeArrayRotateValue, _this.options),
|
|
unicodeArray = unicodeArrayNode.getNodeData();
|
|
unicodeArray = unicodeArrayNode.getNodeData();
|
|
_this.nodes.set('unicodeArrayNode', unicodeArrayNode);
|
|
_this.nodes.set('unicodeArrayNode', unicodeArrayNode);
|
|
- if (_this.options['wrapUnicodeArrayCalls']) {
|
|
|
|
|
|
+ if (_this.options.getOption('wrapUnicodeArrayCalls')) {
|
|
_this.nodes.set('unicodeArrayCallsWrapper', new UnicodeArrayCallsWrapper_1.UnicodeArrayCallsWrapper(_this.unicodeArrayTranslatorName, _this.unicodeArrayName, unicodeArray, _this.options));
|
|
_this.nodes.set('unicodeArrayCallsWrapper', new UnicodeArrayCallsWrapper_1.UnicodeArrayCallsWrapper(_this.unicodeArrayTranslatorName, _this.unicodeArrayName, unicodeArray, _this.options));
|
|
}
|
|
}
|
|
- if (_this.options['encodeUnicodeLiterals']) {
|
|
|
|
|
|
+ if (_this.options.getOption('encodeUnicodeLiterals')) {
|
|
_this.nodes.set('unicodeArrayDecodeNode', new UnicodeArrayDecodeNode_1.UnicodeArrayDecodeNode(_this.unicodeArrayName, unicodeArray, _this.options));
|
|
_this.nodes.set('unicodeArrayDecodeNode', new UnicodeArrayDecodeNode_1.UnicodeArrayDecodeNode(_this.unicodeArrayName, unicodeArray, _this.options));
|
|
}
|
|
}
|
|
- if (_this.options['rotateUnicodeArray']) {
|
|
|
|
|
|
+ if (_this.options.getOption('rotateUnicodeArray')) {
|
|
_this.nodes.set('unicodeArrayRotateFunctionNode', new UnicodeArrayRotateFunctionNode_1.UnicodeArrayRotateFunctionNode(_this.unicodeArrayName, unicodeArray, _this.unicodeArrayRotateValue, _this.options));
|
|
_this.nodes.set('unicodeArrayRotateFunctionNode', new UnicodeArrayRotateFunctionNode_1.UnicodeArrayRotateFunctionNode(_this.unicodeArrayName, unicodeArray, _this.unicodeArrayRotateValue, _this.options));
|
|
}
|
|
}
|
|
return _this;
|
|
return _this;
|
|
@@ -1752,7 +1781,7 @@ module.exports =
|
|
exports.UnicodeArrayNodesGroup = UnicodeArrayNodesGroup;
|
|
exports.UnicodeArrayNodesGroup = UnicodeArrayNodesGroup;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 29 */
|
|
|
|
|
|
+/* 31 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1830,7 +1859,7 @@ module.exports =
|
|
exports.CatchClauseObfuscator = CatchClauseObfuscator;
|
|
exports.CatchClauseObfuscator = CatchClauseObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 30 */
|
|
|
|
|
|
+/* 32 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1913,7 +1942,7 @@ module.exports =
|
|
exports.FunctionDeclarationObfuscator = FunctionDeclarationObfuscator;
|
|
exports.FunctionDeclarationObfuscator = FunctionDeclarationObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 31 */
|
|
|
|
|
|
+/* 33 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -1993,7 +2022,7 @@ module.exports =
|
|
exports.FunctionObfuscator = FunctionObfuscator;
|
|
exports.FunctionObfuscator = FunctionObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 32 */
|
|
|
|
|
|
+/* 34 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -2058,7 +2087,7 @@ module.exports =
|
|
exports.LiteralObfuscator = LiteralObfuscator;
|
|
exports.LiteralObfuscator = LiteralObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 33 */
|
|
|
|
|
|
+/* 35 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -2151,7 +2180,7 @@ module.exports =
|
|
exports.MemberExpressionObfuscator = MemberExpressionObfuscator;
|
|
exports.MemberExpressionObfuscator = MemberExpressionObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 34 */
|
|
|
|
|
|
+/* 36 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -2217,7 +2246,7 @@ module.exports =
|
|
exports.MethodDefinitionObfuscator = MethodDefinitionObfuscator;
|
|
exports.MethodDefinitionObfuscator = MethodDefinitionObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 35 */
|
|
|
|
|
|
+/* 37 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -2309,7 +2338,7 @@ module.exports =
|
|
exports.ObjectExpressionObfuscator = ObjectExpressionObfuscator;
|
|
exports.ObjectExpressionObfuscator = ObjectExpressionObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 36 */
|
|
|
|
|
|
+/* 38 */
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -2408,7 +2437,7 @@ module.exports =
|
|
exports.VariableDeclarationObfuscator = VariableDeclarationObfuscator;
|
|
exports.VariableDeclarationObfuscator = VariableDeclarationObfuscator;
|
|
|
|
|
|
/***/ },
|
|
/***/ },
|
|
-/* 37 */
|
|
|
|
|
|
+/* 39 */
|
|
/***/ function(module, exports) {
|
|
/***/ function(module, exports) {
|
|
|
|
|
|
"use strict";
|
|
"use strict";
|
|
@@ -2428,25 +2457,5 @@ module.exports =
|
|
wrapUnicodeArrayCalls: true
|
|
wrapUnicodeArrayCalls: true
|
|
});
|
|
});
|
|
|
|
|
|
-/***/ },
|
|
|
|
-/* 38 */
|
|
|
|
-/***/ function(module, exports) {
|
|
|
|
-
|
|
|
|
- module.exports = require("inversify");
|
|
|
|
-
|
|
|
|
-/***/ },
|
|
|
|
-/* 39 */
|
|
|
|
-/***/ function(module, exports, __webpack_require__) {
|
|
|
|
-
|
|
|
|
- "use strict";
|
|
|
|
- "use strict";
|
|
|
|
-
|
|
|
|
- var inversify_1 = __webpack_require__(38);
|
|
|
|
- var Obfuscator_1 = __webpack_require__(15);
|
|
|
|
- var kernel = new inversify_1.Kernel();
|
|
|
|
- kernel.bind('IObfuscator').to(Obfuscator_1.Obfuscator);
|
|
|
|
- Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
- exports.default = kernel;
|
|
|
|
-
|
|
|
|
/***/ }
|
|
/***/ }
|
|
/******/ ]);
|
|
/******/ ]);
|