index.js 120 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/ // Check if module is in cache
  8. /******/ if(installedModules[moduleId])
  9. /******/ return installedModules[moduleId].exports;
  10. /******/ // Create a new module (and put it into the cache)
  11. /******/ var module = installedModules[moduleId] = {
  12. /******/ i: moduleId,
  13. /******/ l: false,
  14. /******/ exports: {}
  15. /******/ };
  16. /******/ // Execute the module function
  17. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  18. /******/ // Flag the module as loaded
  19. /******/ module.l = true;
  20. /******/ // Return the exports of the module
  21. /******/ return module.exports;
  22. /******/ }
  23. /******/ // expose the modules object (__webpack_modules__)
  24. /******/ __webpack_require__.m = modules;
  25. /******/ // expose the module cache
  26. /******/ __webpack_require__.c = installedModules;
  27. /******/ // identity function for calling harmory imports with the correct context
  28. /******/ __webpack_require__.i = function(value) { return value; };
  29. /******/ // define getter function for harmory exports
  30. /******/ __webpack_require__.d = function(exports, name, getter) {
  31. /******/ Object.defineProperty(exports, name, {
  32. /******/ configurable: false,
  33. /******/ enumerable: true,
  34. /******/ get: getter
  35. /******/ });
  36. /******/ };
  37. /******/ // Object.prototype.hasOwnProperty.call
  38. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  39. /******/ // __webpack_public_path__
  40. /******/ __webpack_require__.p = "";
  41. /******/ // Load entry module and return exports
  42. /******/ return __webpack_require__(__webpack_require__.s = 14);
  43. /******/ })
  44. /************************************************************************/
  45. /******/ ([
  46. /* 0 */
  47. /***/ function(module, exports, __webpack_require__) {
  48. "use strict";
  49. "use strict";
  50. 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; }; }();
  51. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  52. var estraverse = __webpack_require__(4);
  53. var NodeType_1 = __webpack_require__(3);
  54. var Utils_1 = __webpack_require__(1);
  55. var NodeUtils = function () {
  56. function NodeUtils() {
  57. _classCallCheck(this, NodeUtils);
  58. }
  59. _createClass(NodeUtils, null, [{
  60. key: "addXVerbatimPropertyToLiterals",
  61. value: function addXVerbatimPropertyToLiterals(node) {
  62. estraverse.replace(node, {
  63. enter: function enter(node, parentNode) {
  64. if (NodeUtils.isLiteralNode(node)) {
  65. node['x-verbatim-property'] = node.raw;
  66. }
  67. }
  68. });
  69. }
  70. }, {
  71. key: "appendNode",
  72. value: function appendNode(blockScopeBody, node) {
  73. if (!NodeUtils.validateNode(node)) {
  74. return;
  75. }
  76. blockScopeBody.push(node);
  77. }
  78. }, {
  79. key: "getBlockScopeNodeByIndex",
  80. value: function getBlockScopeNodeByIndex(node) {
  81. var index = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
  82. if (NodeUtils.isNodeHasBlockScope(node) && node.body[index]) {
  83. return node.body[index];
  84. }
  85. return node;
  86. }
  87. }, {
  88. key: "getBlockScopeOfNode",
  89. value: function getBlockScopeOfNode(node) {
  90. var depth = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
  91. if (!node.parentNode) {
  92. throw new ReferenceError('`parentNode` property of given node is `undefined`');
  93. }
  94. if (node.parentNode.type === NodeType_1.NodeType.Program) {
  95. return node.parentNode;
  96. }
  97. if (!Utils_1.Utils.arrayContains(NodeUtils.scopeNodes, node.parentNode.type)) {
  98. return NodeUtils.getBlockScopeOfNode(node.parentNode, depth);
  99. }
  100. if (depth > 0) {
  101. return NodeUtils.getBlockScopeOfNode(node.parentNode, --depth);
  102. }
  103. if (node.type !== NodeType_1.NodeType.BlockStatement) {
  104. return NodeUtils.getBlockScopeOfNode(node.parentNode);
  105. }
  106. return node;
  107. }
  108. }, {
  109. key: "getProgramNode",
  110. value: function getProgramNode(bodyNode) {
  111. return {
  112. 'type': NodeType_1.NodeType.Program,
  113. 'body': bodyNode
  114. };
  115. }
  116. }, {
  117. key: "insertNodeAtIndex",
  118. value: function insertNodeAtIndex(blockScopeBody, node, index) {
  119. if (!NodeUtils.validateNode(node)) {
  120. return;
  121. }
  122. blockScopeBody.splice(index, 0, node);
  123. }
  124. }, {
  125. key: "isBlockStatementNode",
  126. value: function isBlockStatementNode(node) {
  127. return node.type === NodeType_1.NodeType.BlockStatement;
  128. }
  129. }, {
  130. key: "isIdentifierNode",
  131. value: function isIdentifierNode(node) {
  132. return node.type === NodeType_1.NodeType.Identifier;
  133. }
  134. }, {
  135. key: "isLiteralNode",
  136. value: function isLiteralNode(node) {
  137. return node.type === NodeType_1.NodeType.Literal;
  138. }
  139. }, {
  140. key: "isMemberExpressionNode",
  141. value: function isMemberExpressionNode(node) {
  142. return node.type === NodeType_1.NodeType.MemberExpression;
  143. }
  144. }, {
  145. key: "isNodeHasBlockScope",
  146. value: function isNodeHasBlockScope(node) {
  147. return node.hasOwnProperty('body');
  148. }
  149. }, {
  150. key: "isProgramNode",
  151. value: function isProgramNode(node) {
  152. return node.type === NodeType_1.NodeType.Program;
  153. }
  154. }, {
  155. key: "isPropertyNode",
  156. value: function isPropertyNode(node) {
  157. return node.type === NodeType_1.NodeType.Property;
  158. }
  159. }, {
  160. key: "isVariableDeclaratorNode",
  161. value: function isVariableDeclaratorNode(node) {
  162. return node.type === NodeType_1.NodeType.VariableDeclarator;
  163. }
  164. }, {
  165. key: "parentize",
  166. value: function parentize(node) {
  167. var isRootNode = true;
  168. estraverse.replace(node, {
  169. enter: function enter(node, parentNode) {
  170. Object.defineProperty(node, 'parentNode', {
  171. configurable: true,
  172. enumerable: true,
  173. value: isRootNode ? NodeUtils.getProgramNode([node]) : parentNode || node,
  174. writable: true
  175. });
  176. isRootNode = false;
  177. }
  178. });
  179. }
  180. }, {
  181. key: "prependNode",
  182. value: function prependNode(blockScopeBody, node) {
  183. if (!NodeUtils.validateNode(node)) {
  184. return;
  185. }
  186. blockScopeBody.unshift(node);
  187. }
  188. }, {
  189. key: "validateNode",
  190. value: function validateNode(node) {
  191. return !!node;
  192. }
  193. }]);
  194. return NodeUtils;
  195. }();
  196. NodeUtils.scopeNodes = [NodeType_1.NodeType.ArrowFunctionExpression, NodeType_1.NodeType.FunctionDeclaration, NodeType_1.NodeType.FunctionExpression, NodeType_1.NodeType.MethodDefinition];
  197. exports.NodeUtils = NodeUtils;
  198. /***/ },
  199. /* 1 */
  200. /***/ function(module, exports, __webpack_require__) {
  201. "use strict";
  202. "use strict";
  203. 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; }; }();
  204. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  205. var JSFuck_1 = __webpack_require__(8);
  206. var Utils = function () {
  207. function Utils() {
  208. _classCallCheck(this, Utils);
  209. }
  210. _createClass(Utils, null, [{
  211. key: 'arrayContains',
  212. value: function arrayContains(array, searchElement) {
  213. return array.indexOf(searchElement) >= 0;
  214. }
  215. }, {
  216. key: 'arrayRotate',
  217. value: function arrayRotate(array, times) {
  218. var reverse = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
  219. if (times < 0) {
  220. return;
  221. }
  222. var newArray = array,
  223. temp = void 0;
  224. while (times--) {
  225. if (!reverse) {
  226. temp = newArray.pop();
  227. newArray.unshift(temp);
  228. } else {
  229. temp = newArray.shift();
  230. newArray.push(temp);
  231. }
  232. }
  233. return newArray;
  234. }
  235. }, {
  236. key: 'btoa',
  237. value: function btoa(string) {
  238. return new Buffer(encodeURI(string)).toString('base64');
  239. }
  240. }, {
  241. key: 'decToHex',
  242. value: function decToHex(dec) {
  243. var decToHexSliceValue = -6,
  244. exponent = 6,
  245. radix = 16;
  246. return (dec + Math.pow(radix, exponent)).toString(radix).substr(decToHexSliceValue).replace(Utils.hexRepetitiveZerosRegExp, '');
  247. }
  248. }, {
  249. key: 'getRandomInteger',
  250. value: function getRandomInteger(min, max) {
  251. return Math.round(Math.floor(Math.random() * (max - min + 1)) + min);
  252. }
  253. }, {
  254. key: 'getRandomVariableName',
  255. value: function getRandomVariableName() {
  256. var length = arguments.length <= 0 || arguments[0] === undefined ? 6 : arguments[0];
  257. var rangeMinInteger = 10000,
  258. rangeMaxInteger = 99999999,
  259. prefix = '_0x';
  260. return '' + prefix + Utils.decToHex(Utils.getRandomInteger(rangeMinInteger, rangeMaxInteger)).substr(0, length);
  261. }
  262. }, {
  263. key: 'isInteger',
  264. value: function isInteger(number) {
  265. return number % 1 === 0;
  266. }
  267. }, {
  268. key: 'strEnumify',
  269. value: function strEnumify(obj) {
  270. return obj;
  271. }
  272. }, {
  273. key: 'stringToJSFuck',
  274. value: function stringToJSFuck(string) {
  275. return Array.from(string).map(function (character) {
  276. return JSFuck_1.JSFuck[character] || character;
  277. }).join(' + ');
  278. }
  279. }, {
  280. key: 'stringToUnicode',
  281. value: function stringToUnicode(string) {
  282. var radix = 16;
  283. var prefix = void 0,
  284. regexp = new RegExp('[\x00-\x7F]'),
  285. template = void 0;
  286. return '\'' + string.replace(/[\s\S]/g, function (escape) {
  287. if (regexp.test(escape)) {
  288. prefix = '\\x';
  289. template = '0'.repeat(2);
  290. } else {
  291. prefix = '\\u';
  292. template = '0'.repeat(4);
  293. }
  294. return '' + prefix + (template + escape.charCodeAt(0).toString(radix)).slice(-template.length);
  295. }) + '\'';
  296. }
  297. }]);
  298. return Utils;
  299. }();
  300. Utils.hexRepetitiveZerosRegExp = new RegExp('^(0{2,})+(?!$)', '');
  301. exports.Utils = Utils;
  302. /***/ },
  303. /* 2 */
  304. /***/ function(module, exports, __webpack_require__) {
  305. "use strict";
  306. "use strict";
  307. 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; }; }();
  308. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  309. var AppendState_1 = __webpack_require__(6);
  310. var NodeUtils_1 = __webpack_require__(0);
  311. var Node = function () {
  312. function Node() {
  313. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  314. _classCallCheck(this, Node);
  315. this.appendState = AppendState_1.AppendState.BeforeObfuscation;
  316. this.options = options;
  317. }
  318. _createClass(Node, [{
  319. key: "getAppendState",
  320. value: function getAppendState() {
  321. return this.appendState;
  322. }
  323. }, {
  324. key: "getNode",
  325. value: function getNode() {
  326. NodeUtils_1.NodeUtils.parentize(this.node);
  327. return this.node;
  328. }
  329. }, {
  330. key: "setNode",
  331. value: function setNode(node) {
  332. this.node = node;
  333. }
  334. }, {
  335. key: "updateNode",
  336. value: function updateNode() {
  337. this.node = this.getNodeStructure();
  338. }
  339. }]);
  340. return Node;
  341. }();
  342. exports.Node = Node;
  343. /***/ },
  344. /* 3 */
  345. /***/ function(module, exports, __webpack_require__) {
  346. "use strict";
  347. "use strict";
  348. var Utils_1 = __webpack_require__(1);
  349. exports.NodeType = Utils_1.Utils.strEnumify({
  350. ArrayExpression: 'ArrayExpression',
  351. ArrowFunctionExpression: 'ArrowFunctionExpression',
  352. AssignmentExpression: 'AssignmentExpression',
  353. BinaryExpression: 'BinaryExpression',
  354. BlockStatement: 'BlockStatement',
  355. CallExpression: 'CallExpression',
  356. CatchClause: 'CatchClause',
  357. ClassDeclaration: 'ClassDeclaration',
  358. ExpressionStatement: 'ExpressionStatement',
  359. FunctionDeclaration: 'FunctionDeclaration',
  360. FunctionExpression: 'FunctionExpression',
  361. Identifier: 'Identifier',
  362. IfStatement: 'IfStatement',
  363. Literal: 'Literal',
  364. LogicalExpression: 'LogicalExpression',
  365. MemberExpression: 'MemberExpression',
  366. MethodDefinition: 'MethodDefinition',
  367. ObjectExpression: 'ObjectExpression',
  368. Program: 'Program',
  369. Property: 'Property',
  370. ReturnStatement: 'ReturnStatement',
  371. TryStatement: 'TryStatement',
  372. UnaryExpression: 'UnaryExpression',
  373. UpdateExpression: 'UpdateExpression',
  374. VariableDeclaration: 'VariableDeclaration',
  375. VariableDeclarator: 'VariableDeclarator',
  376. WhileStatement: 'WhileStatement'
  377. });
  378. /***/ },
  379. /* 4 */
  380. /***/ function(module, exports) {
  381. module.exports = require("estraverse");
  382. /***/ },
  383. /* 5 */
  384. /***/ function(module, exports, __webpack_require__) {
  385. "use strict";
  386. "use strict";
  387. 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; }; }();
  388. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  389. var JSFuck_1 = __webpack_require__(8);
  390. var NodeUtils_1 = __webpack_require__(0);
  391. var Utils_1 = __webpack_require__(1);
  392. var NodeObfuscator = function () {
  393. function NodeObfuscator(nodes) {
  394. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  395. _classCallCheck(this, NodeObfuscator);
  396. this.nodes = nodes;
  397. this.options = options;
  398. }
  399. _createClass(NodeObfuscator, [{
  400. key: "isReservedName",
  401. value: function isReservedName(name) {
  402. return this.options['reservedNames'].some(function (reservedName) {
  403. return new RegExp(reservedName, 'g').test(name);
  404. });
  405. }
  406. }, {
  407. key: "replaceNodeIdentifierByNewValue",
  408. value: function replaceNodeIdentifierByNewValue(node, parentNode, namesMap) {
  409. if (NodeUtils_1.NodeUtils.isIdentifierNode(node) && namesMap.has(node.name)) {
  410. var parentNodeIsPropertyNode = NodeUtils_1.NodeUtils.isPropertyNode(parentNode) && parentNode.key === node,
  411. parentNodeIsMemberExpressionNode = NodeUtils_1.NodeUtils.isMemberExpressionNode(parentNode) && parentNode.computed === false && parentNode.property === node;
  412. if (parentNodeIsPropertyNode || parentNodeIsMemberExpressionNode) {
  413. return;
  414. }
  415. node.name = namesMap.get(node.name);
  416. }
  417. }
  418. }, {
  419. key: "replaceLiteralBooleanByJSFuck",
  420. value: function replaceLiteralBooleanByJSFuck(nodeValue) {
  421. return nodeValue ? JSFuck_1.JSFuck.True : JSFuck_1.JSFuck.False;
  422. }
  423. }, {
  424. key: "replaceLiteralNumberByHexadecimalValue",
  425. value: function replaceLiteralNumberByHexadecimalValue(nodeValue) {
  426. var prefix = '0x';
  427. if (!Utils_1.Utils.isInteger(nodeValue)) {
  428. return String(nodeValue);
  429. }
  430. return "" + prefix + Utils_1.Utils.decToHex(nodeValue);
  431. }
  432. }, {
  433. key: "replaceLiteralValueByUnicodeValue",
  434. value: function replaceLiteralValueByUnicodeValue(nodeValue) {
  435. var value = nodeValue,
  436. replaceByUnicodeArrayFlag = Math.random() <= this.options['unicodeArrayThreshold'];
  437. if (this.options['encodeUnicodeLiterals'] && replaceByUnicodeArrayFlag) {
  438. value = Utils_1.Utils.btoa(value);
  439. }
  440. value = Utils_1.Utils.stringToUnicode(value);
  441. if (!this.options['unicodeArray'] || !replaceByUnicodeArrayFlag) {
  442. return value;
  443. }
  444. return this.replaceLiteralValueByUnicodeArrayCall(value);
  445. }
  446. }, {
  447. key: "replaceLiteralValueByUnicodeArrayCall",
  448. value: function replaceLiteralValueByUnicodeArrayCall(value) {
  449. var unicodeArrayNode = this.nodes.get('unicodeArrayNode'),
  450. unicodeArray = unicodeArrayNode.getNodeData(),
  451. sameIndex = unicodeArray.indexOf(value),
  452. index = void 0,
  453. hexadecimalIndex = void 0;
  454. if (sameIndex >= 0) {
  455. index = sameIndex;
  456. } else {
  457. index = unicodeArray.length;
  458. unicodeArrayNode.updateNodeData(value);
  459. }
  460. hexadecimalIndex = this.replaceLiteralNumberByHexadecimalValue(index);
  461. if (this.options['wrapUnicodeArrayCalls']) {
  462. return this.nodes.get('unicodeArrayCallsWrapper').getNodeIdentifier() + "('" + hexadecimalIndex + "')";
  463. }
  464. return unicodeArrayNode.getNodeIdentifier() + "[" + hexadecimalIndex + "]";
  465. }
  466. }]);
  467. return NodeObfuscator;
  468. }();
  469. exports.NodeObfuscator = NodeObfuscator;
  470. /***/ },
  471. /* 6 */
  472. /***/ function(module, exports) {
  473. "use strict";
  474. "use strict";
  475. (function (AppendState) {
  476. AppendState[AppendState["AfterObfuscation"] = 0] = "AfterObfuscation";
  477. AppendState[AppendState["BeforeObfuscation"] = 1] = "BeforeObfuscation";
  478. })(exports.AppendState || (exports.AppendState = {}));
  479. var AppendState = exports.AppendState;
  480. /***/ },
  481. /* 7 */
  482. /***/ function(module, exports) {
  483. module.exports = require("esprima");
  484. /***/ },
  485. /* 8 */
  486. /***/ function(module, exports) {
  487. "use strict";
  488. "use strict";
  489. exports.JSFuck = {
  490. Window: '[]["filter"]["constructor"]("return this")()',
  491. False: '![]',
  492. True: '!![]',
  493. a: '(false+"")[1]',
  494. b: '([]["entries"]()+"")[2]',
  495. c: '([]["fill"]+"")[3]',
  496. d: '(undefined+"")[2]',
  497. e: '(true+"")[3]',
  498. f: '(false+"")[0]',
  499. g: '(false+[0]+String)[20]',
  500. h: '(+(101))["to"+String["name"]](21)[1]',
  501. i: '([false]+undefined)[10]',
  502. j: '([]["entries"]()+"")[3]',
  503. k: '(+(20))["to"+String["name"]](21)',
  504. l: '(false+"")[2]',
  505. m: '(Number+"")[11]',
  506. n: '(undefined+"")[1]',
  507. o: '(true+[]["fill"])[10]',
  508. p: '(+(211))["to"+String["name"]](31)[1]',
  509. q: '(+(212))["to"+String["name"]](31)[1]',
  510. r: '(true+"")[1]',
  511. s: '(false+"")[3]',
  512. t: '(true+"")[0]',
  513. u: '(undefined+"")[0]',
  514. v: '(+(31))["to"+String["name"]](32)',
  515. w: '(+(32))["to"+String["name"]](33)',
  516. x: '(+(101))["to"+String["name"]](34)[1]',
  517. y: '(NaN+[Infinity])[10]',
  518. z: '(+(35))["to"+String["name"]](36)',
  519. A: '(+[]+Array)[10]',
  520. B: '(+[]+Boolean)[10]',
  521. C: 'Function("return escape")()(("")["italics"]())[2]',
  522. D: 'Function("return escape")()([]["fill"])["slice"]("-1")',
  523. E: '(RegExp+"")[12]',
  524. F: '(+[]+Function)[10]',
  525. G: '(false+Function("return Date")()())[30]',
  526. H: '\'H\'',
  527. I: '(Infinity+"")[0]',
  528. J: '\'J\'',
  529. K: '\'K\'',
  530. L: '\'L\'',
  531. M: '(true+Function("return Date")()())[30]',
  532. N: '(NaN+"")[0]',
  533. O: '(NaN+Function("return{}")())[11]',
  534. P: '\'P\'',
  535. Q: '\'Q\'',
  536. R: '(+[]+RegExp)[10]',
  537. S: '(+[]+String)[10]',
  538. T: '(NaN+Function("return Date")()())[30]',
  539. U: '(NaN+Function("return{}")()["to"+String["name"]]["call"]())[11]',
  540. V: '\'V\'',
  541. W: '\'W\'',
  542. X: '\'X\'',
  543. Y: '\'Y\'',
  544. Z: '\'Z\''
  545. };
  546. /***/ },
  547. /* 9 */
  548. /***/ function(module, exports) {
  549. module.exports = require("escodegen");
  550. /***/ },
  551. /* 10 */
  552. /***/ function(module, exports, __webpack_require__) {
  553. "use strict";
  554. "use strict";
  555. 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; }; }();
  556. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  557. var esprima = __webpack_require__(7);
  558. var escodegen = __webpack_require__(9);
  559. var DefaultPreset_1 = __webpack_require__(37);
  560. var Obfuscator_1 = __webpack_require__(15);
  561. var OptionsNormalizer_1 = __webpack_require__(16);
  562. var JavaScriptObfuscator = function () {
  563. function JavaScriptObfuscator() {
  564. _classCallCheck(this, JavaScriptObfuscator);
  565. }
  566. _createClass(JavaScriptObfuscator, null, [{
  567. key: 'obfuscate',
  568. value: function obfuscate(sourceCode, customOptions) {
  569. var astTree = esprima.parse(sourceCode),
  570. options = OptionsNormalizer_1.OptionsNormalizer.normalize(Object.assign({}, DefaultPreset_1.DEFAULT_PRESET, customOptions)),
  571. obfuscator = new Obfuscator_1.Obfuscator(options);
  572. astTree = obfuscator.obfuscateNode(astTree);
  573. return JavaScriptObfuscator.generateCode(astTree, options);
  574. }
  575. }, {
  576. key: 'generateCode',
  577. value: function generateCode(astTree, options) {
  578. var escodegenParams = Object.assign({}, JavaScriptObfuscator.escodegenParams);
  579. if (options.hasOwnProperty('compact')) {
  580. escodegenParams.format = {
  581. compact: options.compact
  582. };
  583. }
  584. return escodegen.generate(astTree, escodegenParams);
  585. }
  586. }]);
  587. return JavaScriptObfuscator;
  588. }();
  589. JavaScriptObfuscator.escodegenParams = {
  590. verbatim: 'x-verbatim-property'
  591. };
  592. exports.JavaScriptObfuscator = JavaScriptObfuscator;
  593. /***/ },
  594. /* 11 */
  595. /***/ function(module, exports) {
  596. "use strict";
  597. "use strict";
  598. 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; }; }();
  599. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  600. var NodesGroup = function () {
  601. function NodesGroup() {
  602. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  603. _classCallCheck(this, NodesGroup);
  604. this.nodes = new Map();
  605. this.options = options;
  606. }
  607. _createClass(NodesGroup, [{
  608. key: "getNodes",
  609. value: function getNodes() {
  610. return this.nodes;
  611. }
  612. }]);
  613. return NodesGroup;
  614. }();
  615. exports.NodesGroup = NodesGroup;
  616. /***/ },
  617. /* 12 */
  618. /***/ function(module, exports) {
  619. "use strict";
  620. "use strict";
  621. exports.NO_CUSTOM_NODES_PRESET = Object.freeze({
  622. compact: true,
  623. debugProtection: false,
  624. debugProtectionInterval: false,
  625. disableConsoleOutput: false,
  626. encodeUnicodeLiterals: false,
  627. reservedNames: [],
  628. rotateUnicodeArray: false,
  629. selfDefending: false,
  630. unicodeArray: false,
  631. unicodeArrayThreshold: 0,
  632. wrapUnicodeArrayCalls: false
  633. });
  634. /***/ },
  635. /* 13 */
  636. /***/ function(module, exports) {
  637. module.exports = require("babel-polyfill");
  638. /***/ },
  639. /* 14 */
  640. /***/ function(module, exports, __webpack_require__) {
  641. "use strict";
  642. "use strict";
  643. __webpack_require__(13);
  644. var JavaScriptObfuscator_1 = __webpack_require__(10);
  645. module.exports = JavaScriptObfuscator_1.JavaScriptObfuscator;
  646. /***/ },
  647. /* 15 */
  648. /***/ function(module, exports, __webpack_require__) {
  649. "use strict";
  650. "use strict";
  651. 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; }; }();
  652. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  653. var estraverse = __webpack_require__(4);
  654. var AppendState_1 = __webpack_require__(6);
  655. var NodeType_1 = __webpack_require__(3);
  656. var CatchClauseObfuscator_1 = __webpack_require__(29);
  657. var ConsoleOutputDisableExpressionNode_1 = __webpack_require__(17);
  658. var DebugProtectionNodesGroup_1 = __webpack_require__(26);
  659. var FunctionDeclarationObfuscator_1 = __webpack_require__(30);
  660. var FunctionObfuscator_1 = __webpack_require__(31);
  661. var LiteralObfuscator_1 = __webpack_require__(32);
  662. var MemberExpressionObfuscator_1 = __webpack_require__(33);
  663. var MethodDefinitionObfuscator_1 = __webpack_require__(34);
  664. var NodeUtils_1 = __webpack_require__(0);
  665. var ObjectExpressionObfuscator_1 = __webpack_require__(35);
  666. var SelfDefendingNodesGroup_1 = __webpack_require__(27);
  667. var UnicodeArrayNodesGroup_1 = __webpack_require__(28);
  668. var VariableDeclarationObfuscator_1 = __webpack_require__(36);
  669. var Obfuscator = function () {
  670. function Obfuscator() {
  671. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  672. _classCallCheck(this, Obfuscator);
  673. this.nodes = new Map();
  674. this.nodeObfuscators = new Map([[NodeType_1.NodeType.ArrowFunctionExpression, [FunctionObfuscator_1.FunctionObfuscator]], [NodeType_1.NodeType.ClassDeclaration, [FunctionDeclarationObfuscator_1.FunctionDeclarationObfuscator]], [NodeType_1.NodeType.CatchClause, [CatchClauseObfuscator_1.CatchClauseObfuscator]], [NodeType_1.NodeType.FunctionDeclaration, [FunctionDeclarationObfuscator_1.FunctionDeclarationObfuscator, FunctionObfuscator_1.FunctionObfuscator]], [NodeType_1.NodeType.FunctionExpression, [FunctionObfuscator_1.FunctionObfuscator]], [NodeType_1.NodeType.MemberExpression, [MemberExpressionObfuscator_1.MemberExpressionObfuscator]], [NodeType_1.NodeType.MethodDefinition, [MethodDefinitionObfuscator_1.MethodDefinitionObfuscator]], [NodeType_1.NodeType.ObjectExpression, [ObjectExpressionObfuscator_1.ObjectExpressionObfuscator]], [NodeType_1.NodeType.VariableDeclaration, [VariableDeclarationObfuscator_1.VariableDeclarationObfuscator]], [NodeType_1.NodeType.Literal, [LiteralObfuscator_1.LiteralObfuscator]]]);
  675. this.options = options;
  676. }
  677. _createClass(Obfuscator, [{
  678. key: 'obfuscateNode',
  679. value: function obfuscateNode(node) {
  680. this.setNewNodes();
  681. NodeUtils_1.NodeUtils.parentize(node);
  682. this.beforeObfuscation(node);
  683. this.obfuscate(node);
  684. this.afterObfuscation(node);
  685. return node;
  686. }
  687. }, {
  688. key: 'setNode',
  689. value: function setNode(nodeName, node) {
  690. this.nodes.set(nodeName, node);
  691. }
  692. }, {
  693. key: 'setNodesGroup',
  694. value: function setNodesGroup(nodesGroup) {
  695. var _this = this;
  696. var nodes = nodesGroup.getNodes();
  697. nodes.forEach(function (node, key) {
  698. _this.nodes.set(key, node);
  699. });
  700. }
  701. }, {
  702. key: 'afterObfuscation',
  703. value: function afterObfuscation(astTree) {
  704. this.nodes.forEach(function (node) {
  705. if (node.getAppendState() === AppendState_1.AppendState.AfterObfuscation) {
  706. node.appendNode(astTree);
  707. }
  708. });
  709. }
  710. }, {
  711. key: 'beforeObfuscation',
  712. value: function beforeObfuscation(astTree) {
  713. this.nodes.forEach(function (node) {
  714. if (node.getAppendState() === AppendState_1.AppendState.BeforeObfuscation) {
  715. node.appendNode(astTree);
  716. }
  717. });
  718. }
  719. }, {
  720. key: 'initializeNodeObfuscators',
  721. value: function initializeNodeObfuscators(node, parentNode) {
  722. var _this2 = this;
  723. if (!this.nodeObfuscators.has(node.type)) {
  724. return;
  725. }
  726. this.nodeObfuscators.get(node.type).forEach(function (obfuscator) {
  727. new obfuscator(_this2.nodes, _this2.options).obfuscateNode(node, parentNode);
  728. });
  729. }
  730. }, {
  731. key: 'obfuscate',
  732. value: function obfuscate(node) {
  733. var _this3 = this;
  734. estraverse.replace(node, {
  735. leave: function leave(node, parentNode) {
  736. _this3.initializeNodeObfuscators(node, parentNode);
  737. }
  738. });
  739. }
  740. }, {
  741. key: 'setNewNodes',
  742. value: function setNewNodes() {
  743. if (this.options['selfDefending']) {
  744. this.setNodesGroup(new SelfDefendingNodesGroup_1.SelfDefendingNodesGroup(this.options));
  745. }
  746. if (this.options['disableConsoleOutput']) {
  747. this.setNode('consoleOutputDisableExpressionNode', new ConsoleOutputDisableExpressionNode_1.ConsoleOutputDisableExpressionNode());
  748. }
  749. if (this.options['debugProtection']) {
  750. this.setNodesGroup(new DebugProtectionNodesGroup_1.DebugProtectionNodesGroup(this.options));
  751. }
  752. if (this.options['unicodeArray']) {
  753. this.setNodesGroup(new UnicodeArrayNodesGroup_1.UnicodeArrayNodesGroup(this.options));
  754. }
  755. }
  756. }]);
  757. return Obfuscator;
  758. }();
  759. exports.Obfuscator = Obfuscator;
  760. /***/ },
  761. /* 16 */
  762. /***/ function(module, exports) {
  763. "use strict";
  764. "use strict";
  765. 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; }; }();
  766. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  767. var OptionsNormalizer = function () {
  768. function OptionsNormalizer() {
  769. _classCallCheck(this, OptionsNormalizer);
  770. }
  771. _createClass(OptionsNormalizer, null, [{
  772. key: 'normalize',
  773. value: function normalize(options) {
  774. var normalizedOptions = Object.assign({}, options);
  775. normalizedOptions = OptionsNormalizer.unicodeArrayRule(normalizedOptions);
  776. normalizedOptions = OptionsNormalizer.unicodeArrayThresholdRule(normalizedOptions);
  777. normalizedOptions = OptionsNormalizer.selfDefendingRule(normalizedOptions);
  778. return normalizedOptions;
  779. }
  780. }, {
  781. key: 'selfDefendingRule',
  782. value: function selfDefendingRule(options) {
  783. if (options['selfDefending']) {
  784. Object.assign(options, OptionsNormalizer.SELF_DEFENDING_OPTIONS);
  785. }
  786. return options;
  787. }
  788. }, {
  789. key: 'unicodeArrayRule',
  790. value: function unicodeArrayRule(options) {
  791. if (!options['unicodeArray']) {
  792. Object.assign(options, OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS);
  793. }
  794. return options;
  795. }
  796. }, {
  797. key: 'unicodeArrayThresholdRule',
  798. value: function unicodeArrayThresholdRule(options) {
  799. var minValue = 0,
  800. maxValue = 1;
  801. options['unicodeArrayThreshold'] = Math.min(Math.max(options['unicodeArrayThreshold'], minValue), maxValue);
  802. return options;
  803. }
  804. }]);
  805. return OptionsNormalizer;
  806. }();
  807. OptionsNormalizer.DISABLED_UNICODE_ARRAY_OPTIONS = {
  808. encodeUnicodeLiterals: false,
  809. rotateUnicodeArray: false,
  810. unicodeArray: false,
  811. unicodeArrayThreshold: 0,
  812. wrapUnicodeArrayCalls: false
  813. };
  814. OptionsNormalizer.SELF_DEFENDING_OPTIONS = {
  815. compact: true,
  816. selfDefending: true
  817. };
  818. exports.OptionsNormalizer = OptionsNormalizer;
  819. /***/ },
  820. /* 17 */
  821. /***/ function(module, exports, __webpack_require__) {
  822. "use strict";
  823. "use strict";
  824. 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; }; }();
  825. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  826. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  827. 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; }
  828. var esprima = __webpack_require__(7);
  829. var Node_1 = __webpack_require__(2);
  830. var NodeUtils_1 = __webpack_require__(0);
  831. var ConsoleOutputDisableExpressionNode = function (_Node_1$Node) {
  832. _inherits(ConsoleOutputDisableExpressionNode, _Node_1$Node);
  833. function ConsoleOutputDisableExpressionNode() {
  834. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  835. _classCallCheck(this, ConsoleOutputDisableExpressionNode);
  836. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ConsoleOutputDisableExpressionNode).call(this, options));
  837. _this.node = _this.getNodeStructure();
  838. return _this;
  839. }
  840. _createClass(ConsoleOutputDisableExpressionNode, [{
  841. key: 'appendNode',
  842. value: function appendNode(blockScopeNode) {
  843. NodeUtils_1.NodeUtils.prependNode(blockScopeNode.body, this.getNode());
  844. }
  845. }, {
  846. key: 'getNodeStructure',
  847. value: function getNodeStructure() {
  848. return NodeUtils_1.NodeUtils.getBlockScopeNodeByIndex(esprima.parse('\n (function () {\n var _ = \'(\u0004\u0006\u0003\u0005[]\' + \'["filter"]["\u0007tructor"]\' + \'("return this")()\' + \'.\' + \'\u0003;\u0006\u0002\u0005\u0004};\' + \'_\u0003.log\u0001.in\' + \'fo\u0001.\' + \'war\' + \'n\u0001.er\' + \'r\' + \'or\u0001})();\' + \'\u0001\u0005_\u0002;\' + \'_\u0003\u0002function\' + \'\u0003\u0007ole\u0004\u0002 ()\' + \'{\u0005 = \u0006var \' + \'_\u0007cons\', \n Y, \n $;\n \n for (Y in $ = "\u0007\u0006\u0005\u0004\u0003\u0002\u0001") {\n var arr = _.split($[Y]);\n _ = arr.join(arr.pop());\n }\n \n []["filter"]["constructor"](_)();\n })()\n '));
  849. }
  850. }]);
  851. return ConsoleOutputDisableExpressionNode;
  852. }(Node_1.Node);
  853. exports.ConsoleOutputDisableExpressionNode = ConsoleOutputDisableExpressionNode;
  854. /***/ },
  855. /* 18 */
  856. /***/ function(module, exports, __webpack_require__) {
  857. "use strict";
  858. "use strict";
  859. 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; }; }();
  860. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  861. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  862. 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; }
  863. var NodeType_1 = __webpack_require__(3);
  864. var Node_1 = __webpack_require__(2);
  865. var NodeUtils_1 = __webpack_require__(0);
  866. var DebugProtectionFunctionCallNode = function (_Node_1$Node) {
  867. _inherits(DebugProtectionFunctionCallNode, _Node_1$Node);
  868. function DebugProtectionFunctionCallNode(debugProtectionFunctionName) {
  869. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  870. _classCallCheck(this, DebugProtectionFunctionCallNode);
  871. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionCallNode).call(this, options));
  872. _this.debugProtectionFunctionName = debugProtectionFunctionName;
  873. _this.node = _this.getNodeStructure();
  874. return _this;
  875. }
  876. _createClass(DebugProtectionFunctionCallNode, [{
  877. key: "appendNode",
  878. value: function appendNode(blockScopeNode) {
  879. NodeUtils_1.NodeUtils.appendNode(blockScopeNode.body, this.getNode());
  880. }
  881. }, {
  882. key: "getNodeStructure",
  883. value: function getNodeStructure() {
  884. return {
  885. 'type': NodeType_1.NodeType.ExpressionStatement,
  886. 'expression': {
  887. 'type': NodeType_1.NodeType.CallExpression,
  888. 'callee': {
  889. 'type': NodeType_1.NodeType.Identifier,
  890. 'name': this.debugProtectionFunctionName
  891. },
  892. 'arguments': []
  893. }
  894. };
  895. }
  896. }]);
  897. return DebugProtectionFunctionCallNode;
  898. }(Node_1.Node);
  899. exports.DebugProtectionFunctionCallNode = DebugProtectionFunctionCallNode;
  900. /***/ },
  901. /* 19 */
  902. /***/ function(module, exports, __webpack_require__) {
  903. "use strict";
  904. "use strict";
  905. 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; }; }();
  906. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  907. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  908. 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; }
  909. var NodeType_1 = __webpack_require__(3);
  910. var Node_1 = __webpack_require__(2);
  911. var NodeUtils_1 = __webpack_require__(0);
  912. var DebugProtectionFunctionIntervalNode = function (_Node_1$Node) {
  913. _inherits(DebugProtectionFunctionIntervalNode, _Node_1$Node);
  914. function DebugProtectionFunctionIntervalNode(debugProtectionFunctionName) {
  915. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  916. _classCallCheck(this, DebugProtectionFunctionIntervalNode);
  917. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionIntervalNode).call(this, options));
  918. _this.debugProtectionFunctionName = debugProtectionFunctionName;
  919. _this.node = _this.getNodeStructure();
  920. return _this;
  921. }
  922. _createClass(DebugProtectionFunctionIntervalNode, [{
  923. key: 'appendNode',
  924. value: function appendNode(blockScopeNode) {
  925. NodeUtils_1.NodeUtils.appendNode(blockScopeNode.body, this.getNode());
  926. }
  927. }, {
  928. key: 'getNodeStructure',
  929. value: function getNodeStructure() {
  930. return {
  931. 'type': NodeType_1.NodeType.ExpressionStatement,
  932. 'expression': {
  933. 'type': NodeType_1.NodeType.CallExpression,
  934. 'callee': {
  935. 'type': NodeType_1.NodeType.Identifier,
  936. 'name': 'setInterval'
  937. },
  938. 'arguments': [{
  939. 'type': NodeType_1.NodeType.FunctionExpression,
  940. 'id': null,
  941. 'params': [],
  942. 'defaults': [],
  943. 'body': {
  944. 'type': NodeType_1.NodeType.BlockStatement,
  945. 'body': [{
  946. 'type': NodeType_1.NodeType.ExpressionStatement,
  947. 'expression': {
  948. 'type': NodeType_1.NodeType.CallExpression,
  949. 'callee': {
  950. 'type': NodeType_1.NodeType.Identifier,
  951. 'name': this.debugProtectionFunctionName
  952. },
  953. 'arguments': []
  954. }
  955. }]
  956. },
  957. 'generator': false,
  958. 'expression': false
  959. }, {
  960. 'type': NodeType_1.NodeType.Literal,
  961. 'value': 4000,
  962. 'raw': '4000'
  963. }]
  964. }
  965. };
  966. }
  967. }]);
  968. return DebugProtectionFunctionIntervalNode;
  969. }(Node_1.Node);
  970. exports.DebugProtectionFunctionIntervalNode = DebugProtectionFunctionIntervalNode;
  971. /***/ },
  972. /* 20 */
  973. /***/ function(module, exports, __webpack_require__) {
  974. "use strict";
  975. "use strict";
  976. 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; }; }();
  977. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  978. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  979. 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; }
  980. var esprima = __webpack_require__(7);
  981. var Node_1 = __webpack_require__(2);
  982. var NodeUtils_1 = __webpack_require__(0);
  983. var Utils_1 = __webpack_require__(1);
  984. var DebugProtectionFunctionNode = function (_Node_1$Node) {
  985. _inherits(DebugProtectionFunctionNode, _Node_1$Node);
  986. function DebugProtectionFunctionNode(debugProtectionFunctionName) {
  987. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  988. _classCallCheck(this, DebugProtectionFunctionNode);
  989. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionFunctionNode).call(this, options));
  990. _this.debugProtectionFunctionName = debugProtectionFunctionName;
  991. _this.node = _this.getNodeStructure();
  992. return _this;
  993. }
  994. _createClass(DebugProtectionFunctionNode, [{
  995. key: 'appendNode',
  996. value: function appendNode(blockScopeNode) {
  997. var programBodyLength = blockScopeNode.body.length,
  998. randomIndex = Utils_1.Utils.getRandomInteger(0, programBodyLength);
  999. NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), randomIndex);
  1000. }
  1001. }, {
  1002. key: 'getNodeIdentifier',
  1003. value: function getNodeIdentifier() {
  1004. return this.debugProtectionFunctionName;
  1005. }
  1006. }, {
  1007. key: 'getNodeStructure',
  1008. value: function getNodeStructure() {
  1009. return NodeUtils_1.NodeUtils.getBlockScopeNodeByIndex(esprima.parse('\n var ' + this.debugProtectionFunctionName + ' = function () {\n function debuggerProtection (counter) {\n if ((\'\' + counter / counter)[\'length\'] !== 1 || counter % 20 === 0) {\n (function () {}.constructor(\'debugger\')());\n } else {\n [].filter.constructor(' + Utils_1.Utils.stringToJSFuck('debugger') + ')();\n }\n \n debuggerProtection(++counter);\n }\n \n try {\n debuggerProtection(0);\n } catch (y) {}\n };\n '));
  1010. }
  1011. }]);
  1012. return DebugProtectionFunctionNode;
  1013. }(Node_1.Node);
  1014. exports.DebugProtectionFunctionNode = DebugProtectionFunctionNode;
  1015. /***/ },
  1016. /* 21 */
  1017. /***/ function(module, exports, __webpack_require__) {
  1018. "use strict";
  1019. "use strict";
  1020. 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; }; }();
  1021. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1022. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1023. 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; }
  1024. var esprima = __webpack_require__(7);
  1025. var AppendState_1 = __webpack_require__(6);
  1026. var JSFuck_1 = __webpack_require__(8);
  1027. var NoCustomNodesPreset_1 = __webpack_require__(12);
  1028. var JavaScriptObfuscator_1 = __webpack_require__(10);
  1029. var Node_1 = __webpack_require__(2);
  1030. var NodeUtils_1 = __webpack_require__(0);
  1031. var Utils_1 = __webpack_require__(1);
  1032. var SelfDefendingUnicodeNode = function (_Node_1$Node) {
  1033. _inherits(SelfDefendingUnicodeNode, _Node_1$Node);
  1034. function SelfDefendingUnicodeNode() {
  1035. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  1036. _classCallCheck(this, SelfDefendingUnicodeNode);
  1037. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(SelfDefendingUnicodeNode).call(this, options));
  1038. _this.appendState = AppendState_1.AppendState.AfterObfuscation;
  1039. _this.node = _this.getNodeStructure();
  1040. return _this;
  1041. }
  1042. _createClass(SelfDefendingUnicodeNode, [{
  1043. key: "appendNode",
  1044. value: function appendNode(blockScopeNode) {
  1045. var programBodyLength = blockScopeNode.body.length,
  1046. randomIndex = 0;
  1047. if (programBodyLength > 2) {
  1048. randomIndex = Utils_1.Utils.getRandomInteger(programBodyLength / 2, programBodyLength - 1);
  1049. }
  1050. NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), randomIndex);
  1051. }
  1052. }, {
  1053. key: "getNodeStructure",
  1054. value: function getNodeStructure() {
  1055. var node = esprima.parse(JavaScriptObfuscator_1.JavaScriptObfuscator.obfuscate("\n (function () { \n var func = function(){return " + Utils_1.Utils.stringToUnicode('dev') + ";},\n func2 = function () {\n return 'window';\n };\n \n !Function(" + Utils_1.Utils.stringToUnicode("return/\\w+ *\\(\\) *{\\w+ *['|\"].+['|\"];? *}/") + ")().test(func.toString()) ? Function(" + Utils_1.Utils.stringToUnicode("return/(\\\\[x|u](\\w){2,4})+/") + ")().test(func2.toString()) ? []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.False + "){}')() : []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.True + "){}')() : []['filter']['constructor'](" + Utils_1.Utils.stringToJSFuck('while') + " + '(" + JSFuck_1.JSFuck.False + "){}')();\n })();\n ", NoCustomNodesPreset_1.NO_CUSTOM_NODES_PRESET));
  1056. NodeUtils_1.NodeUtils.addXVerbatimPropertyToLiterals(node);
  1057. return NodeUtils_1.NodeUtils.getBlockScopeNodeByIndex(node);
  1058. }
  1059. }]);
  1060. return SelfDefendingUnicodeNode;
  1061. }(Node_1.Node);
  1062. exports.SelfDefendingUnicodeNode = SelfDefendingUnicodeNode;
  1063. /***/ },
  1064. /* 22 */
  1065. /***/ function(module, exports, __webpack_require__) {
  1066. "use strict";
  1067. "use strict";
  1068. 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; }; }();
  1069. var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
  1070. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1071. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1072. 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; }
  1073. var esprima = __webpack_require__(7);
  1074. var AppendState_1 = __webpack_require__(6);
  1075. var Node_1 = __webpack_require__(2);
  1076. var NodeUtils_1 = __webpack_require__(0);
  1077. var Utils_1 = __webpack_require__(1);
  1078. var UnicodeArrayCallsWrapper = function (_Node_1$Node) {
  1079. _inherits(UnicodeArrayCallsWrapper, _Node_1$Node);
  1080. function UnicodeArrayCallsWrapper(unicodeArrayCallsWrapperName, unicodeArrayName, unicodeArray) {
  1081. var options = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
  1082. _classCallCheck(this, UnicodeArrayCallsWrapper);
  1083. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayCallsWrapper).call(this, options));
  1084. _this.appendState = AppendState_1.AppendState.AfterObfuscation;
  1085. _this.unicodeArrayCallsWrapperName = unicodeArrayCallsWrapperName;
  1086. _this.unicodeArrayName = unicodeArrayName;
  1087. _this.unicodeArray = unicodeArray;
  1088. _this.node = _this.getNodeStructure();
  1089. return _this;
  1090. }
  1091. _createClass(UnicodeArrayCallsWrapper, [{
  1092. key: "appendNode",
  1093. value: function appendNode(blockScopeNode) {
  1094. NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), 1);
  1095. }
  1096. }, {
  1097. key: "getNodeIdentifier",
  1098. value: function getNodeIdentifier() {
  1099. return this.unicodeArrayCallsWrapperName;
  1100. }
  1101. }, {
  1102. key: "getNode",
  1103. value: function getNode() {
  1104. if (!this.unicodeArray.length) {
  1105. return;
  1106. }
  1107. this.updateNode();
  1108. return _get(Object.getPrototypeOf(UnicodeArrayCallsWrapper.prototype), "getNode", this).call(this);
  1109. }
  1110. }, {
  1111. key: "getNodeStructure",
  1112. value: function getNodeStructure() {
  1113. var keyName = Utils_1.Utils.getRandomVariableName(),
  1114. node = void 0;
  1115. node = esprima.parse("\n var " + this.unicodeArrayCallsWrapperName + " = function (" + keyName + ") {\n return " + this.unicodeArrayName + "[parseInt(" + keyName + ", 0x010)];\n };\n ");
  1116. NodeUtils_1.NodeUtils.addXVerbatimPropertyToLiterals(node);
  1117. return NodeUtils_1.NodeUtils.getBlockScopeNodeByIndex(node);
  1118. }
  1119. }]);
  1120. return UnicodeArrayCallsWrapper;
  1121. }(Node_1.Node);
  1122. exports.UnicodeArrayCallsWrapper = UnicodeArrayCallsWrapper;
  1123. /***/ },
  1124. /* 23 */
  1125. /***/ function(module, exports, __webpack_require__) {
  1126. "use strict";
  1127. "use strict";
  1128. 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; }; }();
  1129. var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
  1130. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1131. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1132. 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; }
  1133. var esprima = __webpack_require__(7);
  1134. var JavaScriptObfuscator_1 = __webpack_require__(10);
  1135. var AppendState_1 = __webpack_require__(6);
  1136. var JSFuck_1 = __webpack_require__(8);
  1137. var NoCustomNodesPreset_1 = __webpack_require__(12);
  1138. var Node_1 = __webpack_require__(2);
  1139. var NodeUtils_1 = __webpack_require__(0);
  1140. var Utils_1 = __webpack_require__(1);
  1141. var UnicodeArrayDecodeNode = function (_Node_1$Node) {
  1142. _inherits(UnicodeArrayDecodeNode, _Node_1$Node);
  1143. function UnicodeArrayDecodeNode(unicodeArrayName, unicodeArray) {
  1144. var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
  1145. _classCallCheck(this, UnicodeArrayDecodeNode);
  1146. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayDecodeNode).call(this, options));
  1147. _this.appendState = AppendState_1.AppendState.AfterObfuscation;
  1148. _this.unicodeArrayName = unicodeArrayName;
  1149. _this.unicodeArray = unicodeArray;
  1150. _this.node = _this.getNodeStructure();
  1151. return _this;
  1152. }
  1153. _createClass(UnicodeArrayDecodeNode, [{
  1154. key: 'appendNode',
  1155. value: function appendNode(blockScopeNode) {
  1156. NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), 1);
  1157. }
  1158. }, {
  1159. key: 'getNode',
  1160. value: function getNode() {
  1161. if (!this.unicodeArray.length) {
  1162. return;
  1163. }
  1164. this.updateNode();
  1165. return _get(Object.getPrototypeOf(UnicodeArrayDecodeNode.prototype), 'getNode', this).call(this);
  1166. }
  1167. }, {
  1168. key: 'getNodeStructure',
  1169. value: function getNodeStructure() {
  1170. var environmentName = Utils_1.Utils.getRandomVariableName(),
  1171. forLoopFunctionName = Utils_1.Utils.getRandomVariableName(),
  1172. indexVariableName = Utils_1.Utils.getRandomVariableName(),
  1173. tempArrayName = Utils_1.Utils.getRandomVariableName();
  1174. var code = '',
  1175. node = void 0;
  1176. if (this.options['selfDefending']) {
  1177. 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 ';
  1178. } else {
  1179. code = forLoopFunctionName + '();';
  1180. }
  1181. node = esprima.parse('\n (function () {\n ' + JavaScriptObfuscator_1.JavaScriptObfuscator.obfuscate('\n (function () {\n var object = [][\'filter\'][\'constructor\'](\'return this\')();\n var chars = \'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\';\n \n object.atob || (\n object.atob = function(input) {\n var str = String(input).replace(/=+$/, \'\');\n for (\n var bc = 0, bs, buffer, idx = 0, output = \'\';\n buffer = str.charAt(idx++);\n ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,\n bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0\n ) {\n buffer = chars.indexOf(buffer);\n }\n return output;\n });\n })();\n ', NoCustomNodesPreset_1.NO_CUSTOM_NODES_PRESET) + '\n \n var ' + forLoopFunctionName + ' = function () {\n var ' + tempArrayName + ' = [];\n \n for (var ' + indexVariableName + ' in ' + this.unicodeArrayName + ') {\n ' + tempArrayName + '[' + Utils_1.Utils.stringToUnicode('push') + '](decodeURI(atob(' + this.unicodeArrayName + '[' + indexVariableName + '])));\n }\n \n ' + this.unicodeArrayName + ' = ' + tempArrayName + ';\n };\n \n ' + code + '\n })();\n ');
  1182. NodeUtils_1.NodeUtils.addXVerbatimPropertyToLiterals(node);
  1183. return NodeUtils_1.NodeUtils.getBlockScopeNodeByIndex(node);
  1184. }
  1185. }]);
  1186. return UnicodeArrayDecodeNode;
  1187. }(Node_1.Node);
  1188. exports.UnicodeArrayDecodeNode = UnicodeArrayDecodeNode;
  1189. /***/ },
  1190. /* 24 */
  1191. /***/ function(module, exports, __webpack_require__) {
  1192. "use strict";
  1193. "use strict";
  1194. 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; }; }();
  1195. var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
  1196. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1197. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1198. 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; }
  1199. var escodegen = __webpack_require__(9);
  1200. var AppendState_1 = __webpack_require__(6);
  1201. var NodeType_1 = __webpack_require__(3);
  1202. var Node_1 = __webpack_require__(2);
  1203. var NodeUtils_1 = __webpack_require__(0);
  1204. var Utils_1 = __webpack_require__(1);
  1205. var UnicodeArrayNode = function (_Node_1$Node) {
  1206. _inherits(UnicodeArrayNode, _Node_1$Node);
  1207. function UnicodeArrayNode(unicodeArrayName) {
  1208. var unicodeArrayRotateValue = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
  1209. var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
  1210. _classCallCheck(this, UnicodeArrayNode);
  1211. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayNode).call(this, options));
  1212. _this.appendState = AppendState_1.AppendState.AfterObfuscation;
  1213. _this.unicodeArray = [];
  1214. _this.unicodeArrayName = unicodeArrayName;
  1215. _this.unicodeArrayRotateValue = unicodeArrayRotateValue;
  1216. _this.node = _this.getNodeStructure();
  1217. return _this;
  1218. }
  1219. _createClass(UnicodeArrayNode, [{
  1220. key: 'appendNode',
  1221. value: function appendNode(blockScopeNode) {
  1222. NodeUtils_1.NodeUtils.prependNode(blockScopeNode.body, this.getNode());
  1223. }
  1224. }, {
  1225. key: 'getNodeIdentifier',
  1226. value: function getNodeIdentifier() {
  1227. return this.unicodeArrayName;
  1228. }
  1229. }, {
  1230. key: 'getNodeData',
  1231. value: function getNodeData() {
  1232. return this.unicodeArray;
  1233. }
  1234. }, {
  1235. key: 'getNode',
  1236. value: function getNode() {
  1237. if (!this.unicodeArray.length) {
  1238. return;
  1239. }
  1240. Utils_1.Utils.arrayRotate(this.unicodeArray, this.unicodeArrayRotateValue);
  1241. this.updateNode();
  1242. return _get(Object.getPrototypeOf(UnicodeArrayNode.prototype), 'getNode', this).call(this);
  1243. }
  1244. }, {
  1245. key: 'updateNodeData',
  1246. value: function updateNodeData(data) {
  1247. this.unicodeArray.push(data);
  1248. }
  1249. }, {
  1250. key: 'getNodeStructure',
  1251. value: function getNodeStructure() {
  1252. return {
  1253. 'type': NodeType_1.NodeType.VariableDeclaration,
  1254. 'declarations': [{
  1255. 'type': NodeType_1.NodeType.VariableDeclarator,
  1256. 'id': {
  1257. 'type': NodeType_1.NodeType.Identifier,
  1258. 'name': this.unicodeArrayName
  1259. },
  1260. 'init': {
  1261. 'type': NodeType_1.NodeType.ArrayExpression,
  1262. 'elements': this.unicodeArray.map(function (value) {
  1263. return {
  1264. 'type': NodeType_1.NodeType.Literal,
  1265. 'value': value,
  1266. 'raw': '\'' + value + '\'',
  1267. 'x-verbatim-property': {
  1268. 'content': value,
  1269. precedence: escodegen.Precedence.Primary
  1270. }
  1271. };
  1272. })
  1273. }
  1274. }],
  1275. 'kind': 'var'
  1276. };
  1277. }
  1278. }]);
  1279. return UnicodeArrayNode;
  1280. }(Node_1.Node);
  1281. UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH = 4;
  1282. exports.UnicodeArrayNode = UnicodeArrayNode;
  1283. /***/ },
  1284. /* 25 */
  1285. /***/ function(module, exports, __webpack_require__) {
  1286. "use strict";
  1287. "use strict";
  1288. 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; }; }();
  1289. var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
  1290. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1291. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1292. 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; }
  1293. var esprima = __webpack_require__(7);
  1294. var AppendState_1 = __webpack_require__(6);
  1295. var JSFuck_1 = __webpack_require__(8);
  1296. var NoCustomNodesPreset_1 = __webpack_require__(12);
  1297. var JavaScriptObfuscator_1 = __webpack_require__(10);
  1298. var Node_1 = __webpack_require__(2);
  1299. var NodeUtils_1 = __webpack_require__(0);
  1300. var Utils_1 = __webpack_require__(1);
  1301. var UnicodeArrayRotateFunctionNode = function (_Node_1$Node) {
  1302. _inherits(UnicodeArrayRotateFunctionNode, _Node_1$Node);
  1303. function UnicodeArrayRotateFunctionNode(unicodeArrayName, unicodeArray, unicodeArrayRotateValue) {
  1304. var options = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
  1305. _classCallCheck(this, UnicodeArrayRotateFunctionNode);
  1306. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayRotateFunctionNode).call(this, options));
  1307. _this.appendState = AppendState_1.AppendState.AfterObfuscation;
  1308. _this.unicodeArrayName = unicodeArrayName;
  1309. _this.unicodeArray = unicodeArray;
  1310. _this.unicodeArrayRotateValue = unicodeArrayRotateValue;
  1311. _this.node = _this.getNodeStructure();
  1312. return _this;
  1313. }
  1314. _createClass(UnicodeArrayRotateFunctionNode, [{
  1315. key: "appendNode",
  1316. value: function appendNode(blockScopeNode) {
  1317. NodeUtils_1.NodeUtils.insertNodeAtIndex(blockScopeNode.body, this.getNode(), 1);
  1318. }
  1319. }, {
  1320. key: "getNode",
  1321. value: function getNode() {
  1322. if (!this.unicodeArray.length) {
  1323. return;
  1324. }
  1325. return _get(Object.getPrototypeOf(UnicodeArrayRotateFunctionNode.prototype), "getNode", this).call(this);
  1326. }
  1327. }, {
  1328. key: "getNodeStructure",
  1329. value: function getNodeStructure() {
  1330. var arrayName = Utils_1.Utils.getRandomVariableName(),
  1331. code = '',
  1332. timesName = Utils_1.Utils.getRandomVariableName(),
  1333. timesArgumentName = Utils_1.Utils.getRandomVariableName(),
  1334. whileFunctionName = Utils_1.Utils.getRandomVariableName(),
  1335. node = void 0;
  1336. if (this.options['selfDefending']) {
  1337. 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);
  1338. } else {
  1339. code = whileFunctionName + "(++" + timesName + ")";
  1340. }
  1341. node = esprima.parse("\n (function (" + arrayName + ", " + timesName + ") {\n var " + whileFunctionName + " = function (" + timesArgumentName + ") {\n while (--" + timesArgumentName + ") {\n " + arrayName + "[" + Utils_1.Utils.stringToUnicode('push') + "](" + arrayName + "[" + Utils_1.Utils.stringToUnicode('shift') + "]());\n }\n };\n \n " + code + "\n })(" + this.unicodeArrayName + ", 0x" + Utils_1.Utils.decToHex(this.unicodeArrayRotateValue) + ");\n ");
  1342. NodeUtils_1.NodeUtils.addXVerbatimPropertyToLiterals(node);
  1343. return NodeUtils_1.NodeUtils.getBlockScopeNodeByIndex(node);
  1344. }
  1345. }]);
  1346. return UnicodeArrayRotateFunctionNode;
  1347. }(Node_1.Node);
  1348. exports.UnicodeArrayRotateFunctionNode = UnicodeArrayRotateFunctionNode;
  1349. /***/ },
  1350. /* 26 */
  1351. /***/ function(module, exports, __webpack_require__) {
  1352. "use strict";
  1353. "use strict";
  1354. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1355. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1356. 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; }
  1357. var DebugProtectionFunctionCallNode_1 = __webpack_require__(18);
  1358. var DebugProtectionFunctionIntervalNode_1 = __webpack_require__(19);
  1359. var DebugProtectionFunctionNode_1 = __webpack_require__(20);
  1360. var NodesGroup_1 = __webpack_require__(11);
  1361. var Utils_1 = __webpack_require__(1);
  1362. var DebugProtectionNodesGroup = function (_NodesGroup_1$NodesGr) {
  1363. _inherits(DebugProtectionNodesGroup, _NodesGroup_1$NodesGr);
  1364. function DebugProtectionNodesGroup() {
  1365. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  1366. _classCallCheck(this, DebugProtectionNodesGroup);
  1367. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DebugProtectionNodesGroup).call(this, options));
  1368. _this.debugProtectionFunctionIdentifier = Utils_1.Utils.getRandomVariableName();
  1369. _this.nodes.set('debugProtectionFunctionNode', new DebugProtectionFunctionNode_1.DebugProtectionFunctionNode(_this.debugProtectionFunctionIdentifier, _this.options));
  1370. _this.nodes.set('debugProtectionFunctionCallNode', new DebugProtectionFunctionCallNode_1.DebugProtectionFunctionCallNode(_this.debugProtectionFunctionIdentifier, _this.options));
  1371. if (_this.options['debugProtectionInterval']) {
  1372. _this.nodes.set('debugProtectionFunctionIntervalNode', new DebugProtectionFunctionIntervalNode_1.DebugProtectionFunctionIntervalNode(_this.debugProtectionFunctionIdentifier, _this.options));
  1373. }
  1374. return _this;
  1375. }
  1376. return DebugProtectionNodesGroup;
  1377. }(NodesGroup_1.NodesGroup);
  1378. exports.DebugProtectionNodesGroup = DebugProtectionNodesGroup;
  1379. /***/ },
  1380. /* 27 */
  1381. /***/ function(module, exports, __webpack_require__) {
  1382. "use strict";
  1383. "use strict";
  1384. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1385. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1386. 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; }
  1387. var NodesGroup_1 = __webpack_require__(11);
  1388. var SelfDefendingUnicodeNode_1 = __webpack_require__(21);
  1389. var SelfDefendingNodesGroup = function (_NodesGroup_1$NodesGr) {
  1390. _inherits(SelfDefendingNodesGroup, _NodesGroup_1$NodesGr);
  1391. function SelfDefendingNodesGroup() {
  1392. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  1393. _classCallCheck(this, SelfDefendingNodesGroup);
  1394. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(SelfDefendingNodesGroup).call(this, options));
  1395. _this.nodes.set('selfDefendingUnicodeNode', new SelfDefendingUnicodeNode_1.SelfDefendingUnicodeNode(_this.options));
  1396. return _this;
  1397. }
  1398. return SelfDefendingNodesGroup;
  1399. }(NodesGroup_1.NodesGroup);
  1400. exports.SelfDefendingNodesGroup = SelfDefendingNodesGroup;
  1401. /***/ },
  1402. /* 28 */
  1403. /***/ function(module, exports, __webpack_require__) {
  1404. "use strict";
  1405. "use strict";
  1406. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1407. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1408. 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; }
  1409. var NodesGroup_1 = __webpack_require__(11);
  1410. var UnicodeArrayCallsWrapper_1 = __webpack_require__(22);
  1411. var UnicodeArrayDecodeNode_1 = __webpack_require__(23);
  1412. var UnicodeArrayNode_1 = __webpack_require__(24);
  1413. var UnicodeArrayRotateFunctionNode_1 = __webpack_require__(25);
  1414. var Utils_1 = __webpack_require__(1);
  1415. var UnicodeArrayNodesGroup = function (_NodesGroup_1$NodesGr) {
  1416. _inherits(UnicodeArrayNodesGroup, _NodesGroup_1$NodesGr);
  1417. function UnicodeArrayNodesGroup() {
  1418. var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
  1419. _classCallCheck(this, UnicodeArrayNodesGroup);
  1420. var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(UnicodeArrayNodesGroup).call(this, options));
  1421. _this.unicodeArrayName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH);
  1422. _this.unicodeArrayTranslatorName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH);
  1423. _this.unicodeArrayRotateValue = _this.options['rotateUnicodeArray'] ? Utils_1.Utils.getRandomInteger(100, 500) : 0;
  1424. var unicodeArrayNode = new UnicodeArrayNode_1.UnicodeArrayNode(_this.unicodeArrayName, _this.unicodeArrayRotateValue, _this.options),
  1425. unicodeArray = unicodeArrayNode.getNodeData();
  1426. _this.nodes.set('unicodeArrayNode', unicodeArrayNode);
  1427. if (_this.options['wrapUnicodeArrayCalls']) {
  1428. _this.nodes.set('unicodeArrayCallsWrapper', new UnicodeArrayCallsWrapper_1.UnicodeArrayCallsWrapper(_this.unicodeArrayTranslatorName, _this.unicodeArrayName, unicodeArray, _this.options));
  1429. }
  1430. if (_this.options['encodeUnicodeLiterals']) {
  1431. _this.nodes.set('unicodeArrayDecodeNode', new UnicodeArrayDecodeNode_1.UnicodeArrayDecodeNode(_this.unicodeArrayName, unicodeArray, _this.options));
  1432. }
  1433. if (_this.options['rotateUnicodeArray']) {
  1434. _this.nodes.set('unicodeArrayRotateFunctionNode', new UnicodeArrayRotateFunctionNode_1.UnicodeArrayRotateFunctionNode(_this.unicodeArrayName, unicodeArray, _this.unicodeArrayRotateValue, _this.options));
  1435. }
  1436. return _this;
  1437. }
  1438. return UnicodeArrayNodesGroup;
  1439. }(NodesGroup_1.NodesGroup);
  1440. exports.UnicodeArrayNodesGroup = UnicodeArrayNodesGroup;
  1441. /***/ },
  1442. /* 29 */
  1443. /***/ function(module, exports, __webpack_require__) {
  1444. "use strict";
  1445. "use strict";
  1446. 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; }; }();
  1447. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1448. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1449. 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; }
  1450. var estraverse = __webpack_require__(4);
  1451. var NodeObfuscator_1 = __webpack_require__(5);
  1452. var NodeUtils_1 = __webpack_require__(0);
  1453. var Utils_1 = __webpack_require__(1);
  1454. var CatchClauseObfuscator = function (_NodeObfuscator_1$Nod) {
  1455. _inherits(CatchClauseObfuscator, _NodeObfuscator_1$Nod);
  1456. function CatchClauseObfuscator() {
  1457. var _Object$getPrototypeO;
  1458. _classCallCheck(this, CatchClauseObfuscator);
  1459. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  1460. args[_key] = arguments[_key];
  1461. }
  1462. var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(CatchClauseObfuscator)).call.apply(_Object$getPrototypeO, [this].concat(args)));
  1463. _this.catchClauseParam = new Map();
  1464. return _this;
  1465. }
  1466. _createClass(CatchClauseObfuscator, [{
  1467. key: 'obfuscateNode',
  1468. value: function obfuscateNode(catchClauseNode) {
  1469. this.replaceCatchClauseParam(catchClauseNode);
  1470. this.replaceCatchClauseParamInBlock(catchClauseNode);
  1471. }
  1472. }, {
  1473. key: 'replaceCatchClauseParam',
  1474. value: function replaceCatchClauseParam(catchClauseNode) {
  1475. var _this2 = this;
  1476. estraverse.replace(catchClauseNode.param, {
  1477. leave: function leave(node, parentNode) {
  1478. if (NodeUtils_1.NodeUtils.isIdentifierNode(node) && !_this2.isReservedName(node.name)) {
  1479. _this2.catchClauseParam.set(node.name, Utils_1.Utils.getRandomVariableName());
  1480. node.name = _this2.catchClauseParam.get(node.name);
  1481. return;
  1482. }
  1483. return estraverse.VisitorOption.Skip;
  1484. }
  1485. });
  1486. }
  1487. }, {
  1488. key: 'replaceCatchClauseParamInBlock',
  1489. value: function replaceCatchClauseParamInBlock(catchClauseNode) {
  1490. var _this3 = this;
  1491. estraverse.replace(catchClauseNode.body, {
  1492. leave: function leave(node, parentNode) {
  1493. _this3.replaceNodeIdentifierByNewValue(node, parentNode, _this3.catchClauseParam);
  1494. }
  1495. });
  1496. }
  1497. }]);
  1498. return CatchClauseObfuscator;
  1499. }(NodeObfuscator_1.NodeObfuscator);
  1500. exports.CatchClauseObfuscator = CatchClauseObfuscator;
  1501. /***/ },
  1502. /* 30 */
  1503. /***/ function(module, exports, __webpack_require__) {
  1504. "use strict";
  1505. "use strict";
  1506. 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; }; }();
  1507. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1508. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1509. 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; }
  1510. var estraverse = __webpack_require__(4);
  1511. var NodeType_1 = __webpack_require__(3);
  1512. var NodeObfuscator_1 = __webpack_require__(5);
  1513. var NodeUtils_1 = __webpack_require__(0);
  1514. var Utils_1 = __webpack_require__(1);
  1515. var FunctionDeclarationObfuscator = function (_NodeObfuscator_1$Nod) {
  1516. _inherits(FunctionDeclarationObfuscator, _NodeObfuscator_1$Nod);
  1517. function FunctionDeclarationObfuscator() {
  1518. var _Object$getPrototypeO;
  1519. _classCallCheck(this, FunctionDeclarationObfuscator);
  1520. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  1521. args[_key] = arguments[_key];
  1522. }
  1523. var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(FunctionDeclarationObfuscator)).call.apply(_Object$getPrototypeO, [this].concat(args)));
  1524. _this.functionName = new Map();
  1525. return _this;
  1526. }
  1527. _createClass(FunctionDeclarationObfuscator, [{
  1528. key: "obfuscateNode",
  1529. value: function obfuscateNode(functionDeclarationNode, parentNode) {
  1530. if (parentNode.type === NodeType_1.NodeType.Program) {
  1531. return;
  1532. }
  1533. this.replaceFunctionName(functionDeclarationNode);
  1534. this.replaceFunctionCalls(functionDeclarationNode);
  1535. }
  1536. }, {
  1537. key: "replaceFunctionName",
  1538. value: function replaceFunctionName(functionDeclarationNode) {
  1539. var _this2 = this;
  1540. estraverse.replace(functionDeclarationNode.id, {
  1541. leave: function leave(node) {
  1542. if (NodeUtils_1.NodeUtils.isIdentifierNode(node) && !_this2.isReservedName(node.name)) {
  1543. _this2.functionName.set(node.name, Utils_1.Utils.getRandomVariableName());
  1544. node.name = _this2.functionName.get(node.name);
  1545. return;
  1546. }
  1547. return estraverse.VisitorOption.Skip;
  1548. }
  1549. });
  1550. }
  1551. }, {
  1552. key: "replaceFunctionCalls",
  1553. value: function replaceFunctionCalls(functionDeclarationNode) {
  1554. var _this3 = this;
  1555. var scopeNode = NodeUtils_1.NodeUtils.getBlockScopeOfNode(functionDeclarationNode);
  1556. estraverse.replace(scopeNode, {
  1557. enter: function enter(node, parentNode) {
  1558. _this3.replaceNodeIdentifierByNewValue(node, parentNode, _this3.functionName);
  1559. }
  1560. });
  1561. }
  1562. }]);
  1563. return FunctionDeclarationObfuscator;
  1564. }(NodeObfuscator_1.NodeObfuscator);
  1565. exports.FunctionDeclarationObfuscator = FunctionDeclarationObfuscator;
  1566. /***/ },
  1567. /* 31 */
  1568. /***/ function(module, exports, __webpack_require__) {
  1569. "use strict";
  1570. "use strict";
  1571. 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; }; }();
  1572. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1573. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1574. 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; }
  1575. var estraverse = __webpack_require__(4);
  1576. var NodeObfuscator_1 = __webpack_require__(5);
  1577. var NodeUtils_1 = __webpack_require__(0);
  1578. var Utils_1 = __webpack_require__(1);
  1579. var FunctionObfuscator = function (_NodeObfuscator_1$Nod) {
  1580. _inherits(FunctionObfuscator, _NodeObfuscator_1$Nod);
  1581. function FunctionObfuscator() {
  1582. var _Object$getPrototypeO;
  1583. _classCallCheck(this, FunctionObfuscator);
  1584. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  1585. args[_key] = arguments[_key];
  1586. }
  1587. var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(FunctionObfuscator)).call.apply(_Object$getPrototypeO, [this].concat(args)));
  1588. _this.functionParams = new Map();
  1589. return _this;
  1590. }
  1591. _createClass(FunctionObfuscator, [{
  1592. key: 'obfuscateNode',
  1593. value: function obfuscateNode(functionNode) {
  1594. this.replaceFunctionParams(functionNode);
  1595. this.replaceFunctionParamsInBody(functionNode);
  1596. }
  1597. }, {
  1598. key: 'replaceFunctionParams',
  1599. value: function replaceFunctionParams(functionNode) {
  1600. var _this2 = this;
  1601. functionNode.params.forEach(function (paramsNode) {
  1602. estraverse.replace(paramsNode, {
  1603. leave: function leave(node) {
  1604. if (NodeUtils_1.NodeUtils.isIdentifierNode(node) && !_this2.isReservedName(node.name)) {
  1605. _this2.functionParams.set(node.name, Utils_1.Utils.getRandomVariableName());
  1606. node.name = _this2.functionParams.get(node.name);
  1607. return;
  1608. }
  1609. return estraverse.VisitorOption.Skip;
  1610. }
  1611. });
  1612. });
  1613. }
  1614. }, {
  1615. key: 'replaceFunctionParamsInBody',
  1616. value: function replaceFunctionParamsInBody(functionNode) {
  1617. var _this3 = this;
  1618. estraverse.replace(functionNode.body, {
  1619. leave: function leave(node, parentNode) {
  1620. _this3.replaceNodeIdentifierByNewValue(node, parentNode, _this3.functionParams);
  1621. }
  1622. });
  1623. }
  1624. }]);
  1625. return FunctionObfuscator;
  1626. }(NodeObfuscator_1.NodeObfuscator);
  1627. exports.FunctionObfuscator = FunctionObfuscator;
  1628. /***/ },
  1629. /* 32 */
  1630. /***/ function(module, exports, __webpack_require__) {
  1631. "use strict";
  1632. "use strict";
  1633. 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; };
  1634. 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; }; }();
  1635. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1636. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1637. 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; }
  1638. var escodegen = __webpack_require__(9);
  1639. var NodeObfuscator_1 = __webpack_require__(5);
  1640. var NodeUtils_1 = __webpack_require__(0);
  1641. var LiteralObfuscator = function (_NodeObfuscator_1$Nod) {
  1642. _inherits(LiteralObfuscator, _NodeObfuscator_1$Nod);
  1643. function LiteralObfuscator() {
  1644. _classCallCheck(this, LiteralObfuscator);
  1645. return _possibleConstructorReturn(this, Object.getPrototypeOf(LiteralObfuscator).apply(this, arguments));
  1646. }
  1647. _createClass(LiteralObfuscator, [{
  1648. key: 'obfuscateNode',
  1649. value: function obfuscateNode(literalNode, parentNode) {
  1650. if (NodeUtils_1.NodeUtils.isPropertyNode(parentNode) && parentNode.key === literalNode) {
  1651. return;
  1652. }
  1653. if (literalNode['x-verbatim-property']) {
  1654. return;
  1655. }
  1656. var content = void 0;
  1657. switch (_typeof(literalNode.value)) {
  1658. case 'boolean':
  1659. content = this.replaceLiteralBooleanByJSFuck(literalNode.value);
  1660. break;
  1661. case 'number':
  1662. content = this.replaceLiteralNumberByHexadecimalValue(literalNode.value);
  1663. break;
  1664. case 'string':
  1665. content = this.replaceLiteralValueByUnicodeValue(literalNode.value);
  1666. break;
  1667. default:
  1668. return;
  1669. }
  1670. literalNode['x-verbatim-property'] = {
  1671. content: content,
  1672. precedence: escodegen.Precedence.Primary
  1673. };
  1674. }
  1675. }]);
  1676. return LiteralObfuscator;
  1677. }(NodeObfuscator_1.NodeObfuscator);
  1678. exports.LiteralObfuscator = LiteralObfuscator;
  1679. /***/ },
  1680. /* 33 */
  1681. /***/ function(module, exports, __webpack_require__) {
  1682. "use strict";
  1683. "use strict";
  1684. 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; };
  1685. 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; }; }();
  1686. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1687. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1688. 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; }
  1689. var escodegen = __webpack_require__(9);
  1690. var estraverse = __webpack_require__(4);
  1691. var NodeType_1 = __webpack_require__(3);
  1692. var NodeObfuscator_1 = __webpack_require__(5);
  1693. var NodeUtils_1 = __webpack_require__(0);
  1694. var MemberExpressionObfuscator = function (_NodeObfuscator_1$Nod) {
  1695. _inherits(MemberExpressionObfuscator, _NodeObfuscator_1$Nod);
  1696. function MemberExpressionObfuscator() {
  1697. _classCallCheck(this, MemberExpressionObfuscator);
  1698. return _possibleConstructorReturn(this, Object.getPrototypeOf(MemberExpressionObfuscator).apply(this, arguments));
  1699. }
  1700. _createClass(MemberExpressionObfuscator, [{
  1701. key: 'obfuscateNode',
  1702. value: function obfuscateNode(memberExpressionNode) {
  1703. var _this2 = this;
  1704. estraverse.replace(memberExpressionNode.property, {
  1705. leave: function leave(node, parentNode) {
  1706. if (NodeUtils_1.NodeUtils.isLiteralNode(node)) {
  1707. _this2.literalNodeController(node);
  1708. return;
  1709. }
  1710. if (NodeUtils_1.NodeUtils.isIdentifierNode(node)) {
  1711. if (memberExpressionNode.computed) {
  1712. return;
  1713. }
  1714. memberExpressionNode.computed = true;
  1715. _this2.identifierNodeController(node);
  1716. }
  1717. }
  1718. });
  1719. }
  1720. }, {
  1721. key: 'identifierNodeController',
  1722. value: function identifierNodeController(node) {
  1723. var nodeValue = node.name,
  1724. literalNode = {
  1725. raw: '\'' + nodeValue + '\'',
  1726. 'x-verbatim-property': {
  1727. content: this.replaceLiteralValueByUnicodeValue(nodeValue),
  1728. precedence: escodegen.Precedence.Primary
  1729. },
  1730. type: NodeType_1.NodeType.Literal,
  1731. value: nodeValue
  1732. };
  1733. delete node.name;
  1734. Object.assign(node, literalNode);
  1735. }
  1736. }, {
  1737. key: 'literalNodeController',
  1738. value: function literalNodeController(node) {
  1739. switch (_typeof(node.value)) {
  1740. case 'string':
  1741. if (node['x-verbatim-property']) {
  1742. break;
  1743. }
  1744. node['x-verbatim-property'] = {
  1745. content: this.replaceLiteralValueByUnicodeValue(node.value),
  1746. precedence: escodegen.Precedence.Primary
  1747. };
  1748. break;
  1749. default:
  1750. break;
  1751. }
  1752. }
  1753. }]);
  1754. return MemberExpressionObfuscator;
  1755. }(NodeObfuscator_1.NodeObfuscator);
  1756. exports.MemberExpressionObfuscator = MemberExpressionObfuscator;
  1757. /***/ },
  1758. /* 34 */
  1759. /***/ function(module, exports, __webpack_require__) {
  1760. "use strict";
  1761. "use strict";
  1762. 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; }; }();
  1763. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1764. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1765. 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; }
  1766. var estraverse = __webpack_require__(4);
  1767. var NodeObfuscator_1 = __webpack_require__(5);
  1768. var NodeUtils_1 = __webpack_require__(0);
  1769. var Utils_1 = __webpack_require__(1);
  1770. var MethodDefinitionObfuscator = function (_NodeObfuscator_1$Nod) {
  1771. _inherits(MethodDefinitionObfuscator, _NodeObfuscator_1$Nod);
  1772. function MethodDefinitionObfuscator() {
  1773. var _Object$getPrototypeO;
  1774. _classCallCheck(this, MethodDefinitionObfuscator);
  1775. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  1776. args[_key] = arguments[_key];
  1777. }
  1778. var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(MethodDefinitionObfuscator)).call.apply(_Object$getPrototypeO, [this].concat(args)));
  1779. _this.ignoredNames = ['constructor'];
  1780. return _this;
  1781. }
  1782. _createClass(MethodDefinitionObfuscator, [{
  1783. key: 'obfuscateNode',
  1784. value: function obfuscateNode(methodDefinitionNode, parentNode) {
  1785. this.replaceMethodName(methodDefinitionNode);
  1786. }
  1787. }, {
  1788. key: 'replaceMethodName',
  1789. value: function replaceMethodName(methodDefinitionNode) {
  1790. var _this2 = this;
  1791. estraverse.replace(methodDefinitionNode.key, {
  1792. leave: function leave(node) {
  1793. if (NodeUtils_1.NodeUtils.isIdentifierNode(node) && !Utils_1.Utils.arrayContains(_this2.ignoredNames, node.name) && methodDefinitionNode.computed === false) {
  1794. methodDefinitionNode.computed = true;
  1795. node.name = _this2.replaceLiteralValueByUnicodeValue(node.name);
  1796. return;
  1797. }
  1798. return estraverse.VisitorOption.Skip;
  1799. }
  1800. });
  1801. }
  1802. }]);
  1803. return MethodDefinitionObfuscator;
  1804. }(NodeObfuscator_1.NodeObfuscator);
  1805. exports.MethodDefinitionObfuscator = MethodDefinitionObfuscator;
  1806. /***/ },
  1807. /* 35 */
  1808. /***/ function(module, exports, __webpack_require__) {
  1809. "use strict";
  1810. "use strict";
  1811. 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; };
  1812. 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; }; }();
  1813. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1814. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1815. 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; }
  1816. var escodegen = __webpack_require__(9);
  1817. var estraverse = __webpack_require__(4);
  1818. var NodeType_1 = __webpack_require__(3);
  1819. var NodeObfuscator_1 = __webpack_require__(5);
  1820. var NodeUtils_1 = __webpack_require__(0);
  1821. var Utils_1 = __webpack_require__(1);
  1822. var ObjectExpressionObfuscator = function (_NodeObfuscator_1$Nod) {
  1823. _inherits(ObjectExpressionObfuscator, _NodeObfuscator_1$Nod);
  1824. function ObjectExpressionObfuscator() {
  1825. _classCallCheck(this, ObjectExpressionObfuscator);
  1826. return _possibleConstructorReturn(this, Object.getPrototypeOf(ObjectExpressionObfuscator).apply(this, arguments));
  1827. }
  1828. _createClass(ObjectExpressionObfuscator, [{
  1829. key: 'obfuscateNode',
  1830. value: function obfuscateNode(objectExpressionNode) {
  1831. var _this2 = this;
  1832. objectExpressionNode.properties.forEach(function (property) {
  1833. estraverse.replace(property.key, {
  1834. leave: function leave(node, parentNode) {
  1835. if (NodeUtils_1.NodeUtils.isLiteralNode(node)) {
  1836. _this2.literalNodeController(node);
  1837. return;
  1838. }
  1839. if (NodeUtils_1.NodeUtils.isIdentifierNode(node)) {
  1840. _this2.identifierNodeController(node);
  1841. }
  1842. }
  1843. });
  1844. });
  1845. }
  1846. }, {
  1847. key: 'literalNodeController',
  1848. value: function literalNodeController(node) {
  1849. switch (_typeof(node.value)) {
  1850. case 'string':
  1851. if (node['x-verbatim-property']) {
  1852. break;
  1853. }
  1854. node['x-verbatim-property'] = {
  1855. content: Utils_1.Utils.stringToUnicode(node.value),
  1856. precedence: escodegen.Precedence.Primary
  1857. };
  1858. break;
  1859. default:
  1860. break;
  1861. }
  1862. }
  1863. }, {
  1864. key: 'identifierNodeController',
  1865. value: function identifierNodeController(node) {
  1866. var nodeValue = node.name,
  1867. literalNode = {
  1868. raw: '\'' + nodeValue + '\'',
  1869. 'x-verbatim-property': {
  1870. content: Utils_1.Utils.stringToUnicode(nodeValue),
  1871. precedence: escodegen.Precedence.Primary
  1872. },
  1873. type: NodeType_1.NodeType.Literal,
  1874. value: nodeValue
  1875. };
  1876. delete node.name;
  1877. Object.assign(node, literalNode);
  1878. }
  1879. }]);
  1880. return ObjectExpressionObfuscator;
  1881. }(NodeObfuscator_1.NodeObfuscator);
  1882. exports.ObjectExpressionObfuscator = ObjectExpressionObfuscator;
  1883. /***/ },
  1884. /* 36 */
  1885. /***/ function(module, exports, __webpack_require__) {
  1886. "use strict";
  1887. "use strict";
  1888. 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; }; }();
  1889. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1890. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  1891. 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; }
  1892. var estraverse = __webpack_require__(4);
  1893. var NodeType_1 = __webpack_require__(3);
  1894. var NodeObfuscator_1 = __webpack_require__(5);
  1895. var NodeUtils_1 = __webpack_require__(0);
  1896. var Utils_1 = __webpack_require__(1);
  1897. var VariableDeclarationObfuscator = function (_NodeObfuscator_1$Nod) {
  1898. _inherits(VariableDeclarationObfuscator, _NodeObfuscator_1$Nod);
  1899. function VariableDeclarationObfuscator() {
  1900. var _Object$getPrototypeO;
  1901. _classCallCheck(this, VariableDeclarationObfuscator);
  1902. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  1903. args[_key] = arguments[_key];
  1904. }
  1905. var _this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(VariableDeclarationObfuscator)).call.apply(_Object$getPrototypeO, [this].concat(args)));
  1906. _this.variableNames = new Map();
  1907. return _this;
  1908. }
  1909. _createClass(VariableDeclarationObfuscator, [{
  1910. key: "obfuscateNode",
  1911. value: function obfuscateNode(variableDeclarationNode, parentNode) {
  1912. if (parentNode.type === NodeType_1.NodeType.Program) {
  1913. return;
  1914. }
  1915. this.replaceVariableName(variableDeclarationNode);
  1916. this.replaceVariableCalls(variableDeclarationNode, parentNode);
  1917. }
  1918. }, {
  1919. key: "replaceVariableName",
  1920. value: function replaceVariableName(variableDeclarationNode) {
  1921. var _this2 = this;
  1922. variableDeclarationNode.declarations.forEach(function (declarationNode) {
  1923. estraverse.replace(declarationNode.id, {
  1924. enter: function enter(node) {
  1925. if (NodeUtils_1.NodeUtils.isIdentifierNode(node) && !_this2.isReservedName(node.name)) {
  1926. _this2.variableNames.set(node.name, Utils_1.Utils.getRandomVariableName());
  1927. node.name = _this2.variableNames.get(node.name);
  1928. return;
  1929. }
  1930. return estraverse.VisitorOption.Skip;
  1931. }
  1932. });
  1933. });
  1934. }
  1935. }, {
  1936. key: "replaceVariableCalls",
  1937. value: function replaceVariableCalls(variableDeclarationNode, variableParentNode) {
  1938. var _this3 = this;
  1939. var scopeNode = variableDeclarationNode.kind === 'var' ? NodeUtils_1.NodeUtils.getBlockScopeOfNode(variableDeclarationNode) : variableParentNode,
  1940. isNodeAfterVariableDeclaratorFlag = false;
  1941. estraverse.replace(scopeNode, {
  1942. enter: function enter(node, parentNode) {
  1943. var functionNodes = [NodeType_1.NodeType.ArrowFunctionExpression, NodeType_1.NodeType.FunctionDeclaration, NodeType_1.NodeType.FunctionExpression];
  1944. if (Utils_1.Utils.arrayContains(functionNodes, node.type)) {
  1945. estraverse.replace(node, {
  1946. enter: function enter(node, parentNode) {
  1947. _this3.replaceNodeIdentifierByNewValue(node, parentNode, _this3.variableNames);
  1948. }
  1949. });
  1950. }
  1951. if (node === variableDeclarationNode) {
  1952. isNodeAfterVariableDeclaratorFlag = true;
  1953. }
  1954. if (isNodeAfterVariableDeclaratorFlag) {
  1955. _this3.replaceNodeIdentifierByNewValue(node, parentNode, _this3.variableNames);
  1956. }
  1957. }
  1958. });
  1959. }
  1960. }]);
  1961. return VariableDeclarationObfuscator;
  1962. }(NodeObfuscator_1.NodeObfuscator);
  1963. exports.VariableDeclarationObfuscator = VariableDeclarationObfuscator;
  1964. /***/ },
  1965. /* 37 */
  1966. /***/ function(module, exports) {
  1967. "use strict";
  1968. "use strict";
  1969. exports.DEFAULT_PRESET = Object.freeze({
  1970. compact: true,
  1971. debugProtection: false,
  1972. debugProtectionInterval: false,
  1973. disableConsoleOutput: true,
  1974. encodeUnicodeLiterals: false,
  1975. reservedNames: [],
  1976. rotateUnicodeArray: true,
  1977. selfDefending: true,
  1978. unicodeArray: true,
  1979. unicodeArrayThreshold: 0.8,
  1980. wrapUnicodeArrayCalls: true
  1981. });
  1982. /***/ }
  1983. /******/ ]);