Hướng dẫn error cannot find module javascript obfuscator - lỗi không thể tìm thấy mô-đun javascript obfuscator
Bình luận
Show
Tôi đã thêm
đến cấu hình trang web của tôi. Khi xây dựng ứng dụng của tôi (vue.js), mô -đun không thể được giải quyết. Sử dụng $ npm install --save-dev javascript-obfuscator8 hoạt động như mong đợi. Versioninformation:
Nếu bạn cần thêm thông tin, xin vui lòng cho tôi biết Tôi mong đợi điều này = (ngay bây giờ sử dụng $ npm install --save-dev javascript-obfuscator9. Tôi phải suy nghĩ về cách khắc phục nó. Cập nhật lên <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>0. Sử dụng Trình tải như được mô tả ở đây: Use loader like described here:
Nếu có sự cố xảy ra một lần nữa - hãy cho tôi biết
Nó đang hoạt động, cảm ơn bạn đã trả lời nhanh chóng. Chuyện gì đã xảy ra thế:: Không thể xây dựng một thực thi duy nhất khi sử dụng mã obfuscate. Tôi đang sử dụng công cụ JavaScript ObfusCator vì tôi muốn tăng cường bảo mật ứng dụng của mình. Khi tôi chạy ứng dụng của mình với mã bị obfuscated, nó hoạt động tốt, nhưng khi tôi muốn tạo một thực thi với NEXE, nó không hoạt động. Những gì bạn mong đợi sẽ xảy ra:: Tạo thực thi khi sử dụng mã obfuscated. Cách tái tạo nó (tối thiểu và chính xác nhất có thể):: Tôi đang gặp vấn đề khi yêu cầu các tệp cục bộ và sử dụng các đường dẫn tương đối. Ví dụ: <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>1 Error:
Environment::
Điều đáng nói là các plugin webpack như Uglify hoặc Webpack Obfuscator chỉ cung cấp Minification/obfuscation cơ bản và có thể nhanh chóng được đảo ngược với các công cụ tự động. Vì vậy, họ không bảo vệ đúng các tệp gói webpack. JavaScript obfuscator
Ví dụ về mã bị che khuất: github.com Phiên bản trực tuyến:obfuscator.io Bổ sung:
Bạn có thể hỗ trợ dự án này bằng cách quyên góp:
Rất cảm ơn tất cả những người ủng hộ! GHI CHÚ! Readme trên nhánh chính có thể không khớp với bản phát hành ổn định mới nhất!Nếu bạn có câu hỏi, hãy kiểm tra phần này trước: Câu hỏi thường gặpQuan trọngChỉ obfuscate mã thuộc về bạn.Không nên sử dụng các tập lệnh và polyfills của nhà cung cấp bảo vệ, vì mã bị che khuất chậm hơn 15-80% (phụ thuộc vào các tùy chọn) và các tệp lớn hơn đáng kể. Cài đặtSử dụng sợi hoặc npmCài đặt gói bằng sợi hoặc NPM và thêm nó vào <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>2 hoặc <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>3 của bạn: $ yarn add --dev javascript-obfuscator hoặc $ npm install --save-dev javascript-obfuscator Trong một trình duyệtTừ CDN: <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script> Từ <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>4: <script src="./node_modules/javascript-obfuscator/dist/index.browser.js">script> Cách sử dụngvar JavaScriptObfuscator = require('javascript-obfuscator'); var obfuscationResult = JavaScriptObfuscator.obfuscate( ` (function(){ var variable1 = '5' - 3; var variable2 = '5' + 3; var variable3 = '5' + - '2'; var variable4 = ['10','10','10','10','10'].map(parseInt); var variable5 = 'foo ' + 1 + 1; console.log(variable1); console.log(variable2); console.log(variable3); console.log(variable4); console.log(variable5); })(); `, { compact: false, controlFlowFlattening: true, controlFlowFlatteningThreshold: 1, numbersToExpressions: true, simplify: true, stringArrayShuffle: true, splitStrings: true, stringArrayThreshold: 1 } ); console.log(obfuscationResult.getObfuscatedCode()); /* var _0x9947 = [ 'map', 'log', 'foo\x20', 'bvmqO', '133039ViRMWR', 'xPfLC', 'ytpdx', '1243717qSZCyh', '2|7|4|6|9|', '1ErtbCr', '1608314VKvthn', '1ZRaFKN', 'XBoAA', '423266kQOYHV', '3|0|5|8|1', '235064xPNdKe', '13RUDZfG', '157gNPQGm', '1639212MvnHZL', 'rDjOa', 'iBHph', '9926iRHoRl', 'split' ]; function _0x33e4(_0x1809b5, _0x37ef6e) { return _0x33e4 = function (_0x338a69, _0x39ad79) { _0x338a69 = _0x338a69 - (0x1939 + -0xf * 0x1f3 + 0x1 * 0x469); var _0x2b223a = _0x9947[_0x338a69]; return _0x2b223a; }, _0x33e4(_0x1809b5, _0x37ef6e); } (function (_0x431d87, _0x156c7f) { var _0x10cf6e = _0x33e4; while (!![]) { try { var _0x330ad1 = -parseInt(_0x10cf6e(0x6c)) * -parseInt(_0x10cf6e(0x6d)) + -parseInt(_0x10cf6e(0x74)) * -parseInt(_0x10cf6e(0x78)) + parseInt(_0x10cf6e(0x6a)) + -parseInt(_0x10cf6e(0x70)) + parseInt(_0x10cf6e(0x6e)) * -parseInt(_0x10cf6e(0x75)) + parseInt(_0x10cf6e(0x72)) + -parseInt(_0x10cf6e(0x67)) * parseInt(_0x10cf6e(0x73)); if (_0x330ad1 === _0x156c7f) break; else _0x431d87['push'](_0x431d87['shift']()); } catch (_0x9f878) { _0x431d87['push'](_0x431d87['shift']()); } } }(_0x9947, -0xb6270 + 0x4dfd2 * 0x2 + 0x75460 * 0x2), function () { var _0x1f346d = _0x33e4, _0x860db8 = { 'ytpdx': _0x1f346d(0x6b) + _0x1f346d(0x71), 'bvmqO': function (_0x560787, _0x519b9e) { return _0x560787 - _0x519b9e; }, 'rDjOa': function (_0x4501fe, _0x2b07a3) { return _0x4501fe + _0x2b07a3; }, 'xPfLC': function (_0x5f3c9b, _0x434936) { return _0x5f3c9b + _0x434936; }, 'XBoAA': function (_0x535b8a, _0x42eef4) { return _0x535b8a + _0x42eef4; }, 'iBHph': _0x1f346d(0x65) }, _0x346c55 = _0x860db8[_0x1f346d(0x69)][_0x1f346d(0x79)]('|'), _0x3bf817 = 0x4bb * 0x1 + 0x801 + -0xcbc; while (!![]) { switch (_0x346c55[_0x3bf817++]) { case '0': console[_0x1f346d(0x7b)](_0x4c96d8); continue; case '1': console[_0x1f346d(0x7b)](_0x101028); continue; case '2': var _0x65977d = _0x860db8[_0x1f346d(0x66)]('5', -0x586 + -0x2195 + -0x6 * -0x685); continue; case '3': console[_0x1f346d(0x7b)](_0x65977d); continue; case '4': var _0x56d39b = _0x860db8[_0x1f346d(0x76)]('5', -'2'); continue; case '5': console[_0x1f346d(0x7b)](_0x56d39b); continue; case '6': var _0x544285 = [ '10', '10', '10', '10', '10' ][_0x1f346d(0x7a)](parseInt); continue; case '7': var _0x4c96d8 = _0x860db8[_0x1f346d(0x68)]('5', 0x622 * -0x6 + 0x4a * 0x3 + 0x1 * 0x23f1); continue; case '8': console[_0x1f346d(0x7b)](_0x544285); continue; case '9': var _0x101028 = _0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x77)], 0x6fb * 0x5 + 0x1ebf * 0x1 + -0x41a5), 0x209 * 0xa + 0x1314 + -0x276d); continue; } break; } }()); */ 5Trả về đối tượng <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>6 chứa hai phương thức công khai:
Gọi <script src="./node_modules/javascript-obfuscator/dist/index.browser.js">script>7 cho đối tượng <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>6 sẽ trả về <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>8 với mã bị lỗi. Phương thức lấy hai tham số, var JavaScriptObfuscator = require('javascript-obfuscator'); var obfuscationResult = JavaScriptObfuscator.obfuscate( ` (function(){ var variable1 = '5' - 3; var variable2 = '5' + 3; var variable3 = '5' + - '2'; var variable4 = ['10','10','10','10','10'].map(parseInt); var variable5 = 'foo ' + 1 + 1; console.log(variable1); console.log(variable2); console.log(variable3); console.log(variable4); console.log(variable5); })(); `, { compact: false, controlFlowFlattening: true, controlFlowFlatteningThreshold: 1, numbersToExpressions: true, simplify: true, stringArrayShuffle: true, splitStrings: true, stringArrayThreshold: 1 } ); console.log(obfuscationResult.getObfuscatedCode()); /* var _0x9947 = [ 'map', 'log', 'foo\x20', 'bvmqO', '133039ViRMWR', 'xPfLC', 'ytpdx', '1243717qSZCyh', '2|7|4|6|9|', '1ErtbCr', '1608314VKvthn', '1ZRaFKN', 'XBoAA', '423266kQOYHV', '3|0|5|8|1', '235064xPNdKe', '13RUDZfG', '157gNPQGm', '1639212MvnHZL', 'rDjOa', 'iBHph', '9926iRHoRl', 'split' ]; function _0x33e4(_0x1809b5, _0x37ef6e) { return _0x33e4 = function (_0x338a69, _0x39ad79) { _0x338a69 = _0x338a69 - (0x1939 + -0xf * 0x1f3 + 0x1 * 0x469); var _0x2b223a = _0x9947[_0x338a69]; return _0x2b223a; }, _0x33e4(_0x1809b5, _0x37ef6e); } (function (_0x431d87, _0x156c7f) { var _0x10cf6e = _0x33e4; while (!![]) { try { var _0x330ad1 = -parseInt(_0x10cf6e(0x6c)) * -parseInt(_0x10cf6e(0x6d)) + -parseInt(_0x10cf6e(0x74)) * -parseInt(_0x10cf6e(0x78)) + parseInt(_0x10cf6e(0x6a)) + -parseInt(_0x10cf6e(0x70)) + parseInt(_0x10cf6e(0x6e)) * -parseInt(_0x10cf6e(0x75)) + parseInt(_0x10cf6e(0x72)) + -parseInt(_0x10cf6e(0x67)) * parseInt(_0x10cf6e(0x73)); if (_0x330ad1 === _0x156c7f) break; else _0x431d87['push'](_0x431d87['shift']()); } catch (_0x9f878) { _0x431d87['push'](_0x431d87['shift']()); } } }(_0x9947, -0xb6270 + 0x4dfd2 * 0x2 + 0x75460 * 0x2), function () { var _0x1f346d = _0x33e4, _0x860db8 = { 'ytpdx': _0x1f346d(0x6b) + _0x1f346d(0x71), 'bvmqO': function (_0x560787, _0x519b9e) { return _0x560787 - _0x519b9e; }, 'rDjOa': function (_0x4501fe, _0x2b07a3) { return _0x4501fe + _0x2b07a3; }, 'xPfLC': function (_0x5f3c9b, _0x434936) { return _0x5f3c9b + _0x434936; }, 'XBoAA': function (_0x535b8a, _0x42eef4) { return _0x535b8a + _0x42eef4; }, 'iBHph': _0x1f346d(0x65) }, _0x346c55 = _0x860db8[_0x1f346d(0x69)][_0x1f346d(0x79)]('|'), _0x3bf817 = 0x4bb * 0x1 + 0x801 + -0xcbc; while (!![]) { switch (_0x346c55[_0x3bf817++]) { case '0': console[_0x1f346d(0x7b)](_0x4c96d8); continue; case '1': console[_0x1f346d(0x7b)](_0x101028); continue; case '2': var _0x65977d = _0x860db8[_0x1f346d(0x66)]('5', -0x586 + -0x2195 + -0x6 * -0x685); continue; case '3': console[_0x1f346d(0x7b)](_0x65977d); continue; case '4': var _0x56d39b = _0x860db8[_0x1f346d(0x76)]('5', -'2'); continue; case '5': console[_0x1f346d(0x7b)](_0x56d39b); continue; case '6': var _0x544285 = [ '10', '10', '10', '10', '10' ][_0x1f346d(0x7a)](parseInt); continue; case '7': var _0x4c96d8 = _0x860db8[_0x1f346d(0x68)]('5', 0x622 * -0x6 + 0x4a * 0x3 + 0x1 * 0x23f1); continue; case '8': console[_0x1f346d(0x7b)](_0x544285); continue; case '9': var _0x101028 = _0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x77)], 0x6fb * 0x5 + 0x1ebf * 0x1 + -0x41a5), 0x209 * 0xa + 0x1314 + -0x276d); continue; } break; } }()); */0 và var JavaScriptObfuscator = require('javascript-obfuscator'); var obfuscationResult = JavaScriptObfuscator.obfuscate( ` (function(){ var variable1 = '5' - 3; var variable2 = '5' + 3; var variable3 = '5' + - '2'; var variable4 = ['10','10','10','10','10'].map(parseInt); var variable5 = 'foo ' + 1 + 1; console.log(variable1); console.log(variable2); console.log(variable3); console.log(variable4); console.log(variable5); })(); `, { compact: false, controlFlowFlattening: true, controlFlowFlatteningThreshold: 1, numbersToExpressions: true, simplify: true, stringArrayShuffle: true, splitStrings: true, stringArrayThreshold: 1 } ); console.log(obfuscationResult.getObfuscatedCode()); /* var _0x9947 = [ 'map', 'log', 'foo\x20', 'bvmqO', '133039ViRMWR', 'xPfLC', 'ytpdx', '1243717qSZCyh', '2|7|4|6|9|', '1ErtbCr', '1608314VKvthn', '1ZRaFKN', 'XBoAA', '423266kQOYHV', '3|0|5|8|1', '235064xPNdKe', '13RUDZfG', '157gNPQGm', '1639212MvnHZL', 'rDjOa', 'iBHph', '9926iRHoRl', 'split' ]; function _0x33e4(_0x1809b5, _0x37ef6e) { return _0x33e4 = function (_0x338a69, _0x39ad79) { _0x338a69 = _0x338a69 - (0x1939 + -0xf * 0x1f3 + 0x1 * 0x469); var _0x2b223a = _0x9947[_0x338a69]; return _0x2b223a; }, _0x33e4(_0x1809b5, _0x37ef6e); } (function (_0x431d87, _0x156c7f) { var _0x10cf6e = _0x33e4; while (!![]) { try { var _0x330ad1 = -parseInt(_0x10cf6e(0x6c)) * -parseInt(_0x10cf6e(0x6d)) + -parseInt(_0x10cf6e(0x74)) * -parseInt(_0x10cf6e(0x78)) + parseInt(_0x10cf6e(0x6a)) + -parseInt(_0x10cf6e(0x70)) + parseInt(_0x10cf6e(0x6e)) * -parseInt(_0x10cf6e(0x75)) + parseInt(_0x10cf6e(0x72)) + -parseInt(_0x10cf6e(0x67)) * parseInt(_0x10cf6e(0x73)); if (_0x330ad1 === _0x156c7f) break; else _0x431d87['push'](_0x431d87['shift']()); } catch (_0x9f878) { _0x431d87['push'](_0x431d87['shift']()); } } }(_0x9947, -0xb6270 + 0x4dfd2 * 0x2 + 0x75460 * 0x2), function () { var _0x1f346d = _0x33e4, _0x860db8 = { 'ytpdx': _0x1f346d(0x6b) + _0x1f346d(0x71), 'bvmqO': function (_0x560787, _0x519b9e) { return _0x560787 - _0x519b9e; }, 'rDjOa': function (_0x4501fe, _0x2b07a3) { return _0x4501fe + _0x2b07a3; }, 'xPfLC': function (_0x5f3c9b, _0x434936) { return _0x5f3c9b + _0x434936; }, 'XBoAA': function (_0x535b8a, _0x42eef4) { return _0x535b8a + _0x42eef4; }, 'iBHph': _0x1f346d(0x65) }, _0x346c55 = _0x860db8[_0x1f346d(0x69)][_0x1f346d(0x79)]('|'), _0x3bf817 = 0x4bb * 0x1 + 0x801 + -0xcbc; while (!![]) { switch (_0x346c55[_0x3bf817++]) { case '0': console[_0x1f346d(0x7b)](_0x4c96d8); continue; case '1': console[_0x1f346d(0x7b)](_0x101028); continue; case '2': var _0x65977d = _0x860db8[_0x1f346d(0x66)]('5', -0x586 + -0x2195 + -0x6 * -0x685); continue; case '3': console[_0x1f346d(0x7b)](_0x65977d); continue; case '4': var _0x56d39b = _0x860db8[_0x1f346d(0x76)]('5', -'2'); continue; case '5': console[_0x1f346d(0x7b)](_0x56d39b); continue; case '6': var _0x544285 = [ '10', '10', '10', '10', '10' ][_0x1f346d(0x7a)](parseInt); continue; case '7': var _0x4c96d8 = _0x860db8[_0x1f346d(0x68)]('5', 0x622 * -0x6 + 0x4a * 0x3 + 0x1 * 0x23f1); continue; case '8': console[_0x1f346d(0x7b)](_0x544285); continue; case '9': var _0x101028 = _0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x77)], 0x6fb * 0x5 + 0x1ebf * 0x1 + -0x41a5), 0x209 * 0xa + 0x1314 + -0x276d); continue; } break; } }()); */1 - mã nguồn và các tùy chọn tương ứng:
Đối với các tùy chọn có sẵn, xem Tùy chọn. var JavaScriptObfuscator = require('javascript-obfuscator'); var obfuscationResult = JavaScriptObfuscator.obfuscate( ` (function(){ var variable1 = '5' - 3; var variable2 = '5' + 3; var variable3 = '5' + - '2'; var variable4 = ['10','10','10','10','10'].map(parseInt); var variable5 = 'foo ' + 1 + 1; console.log(variable1); console.log(variable2); console.log(variable3); console.log(variable4); console.log(variable5); })(); `, { compact: false, controlFlowFlattening: true, controlFlowFlatteningThreshold: 1, numbersToExpressions: true, simplify: true, stringArrayShuffle: true, splitStrings: true, stringArrayThreshold: 1 } ); console.log(obfuscationResult.getObfuscatedCode()); /* var _0x9947 = [ 'map', 'log', 'foo\x20', 'bvmqO', '133039ViRMWR', 'xPfLC', 'ytpdx', '1243717qSZCyh', '2|7|4|6|9|', '1ErtbCr', '1608314VKvthn', '1ZRaFKN', 'XBoAA', '423266kQOYHV', '3|0|5|8|1', '235064xPNdKe', '13RUDZfG', '157gNPQGm', '1639212MvnHZL', 'rDjOa', 'iBHph', '9926iRHoRl', 'split' ]; function _0x33e4(_0x1809b5, _0x37ef6e) { return _0x33e4 = function (_0x338a69, _0x39ad79) { _0x338a69 = _0x338a69 - (0x1939 + -0xf * 0x1f3 + 0x1 * 0x469); var _0x2b223a = _0x9947[_0x338a69]; return _0x2b223a; }, _0x33e4(_0x1809b5, _0x37ef6e); } (function (_0x431d87, _0x156c7f) { var _0x10cf6e = _0x33e4; while (!![]) { try { var _0x330ad1 = -parseInt(_0x10cf6e(0x6c)) * -parseInt(_0x10cf6e(0x6d)) + -parseInt(_0x10cf6e(0x74)) * -parseInt(_0x10cf6e(0x78)) + parseInt(_0x10cf6e(0x6a)) + -parseInt(_0x10cf6e(0x70)) + parseInt(_0x10cf6e(0x6e)) * -parseInt(_0x10cf6e(0x75)) + parseInt(_0x10cf6e(0x72)) + -parseInt(_0x10cf6e(0x67)) * parseInt(_0x10cf6e(0x73)); if (_0x330ad1 === _0x156c7f) break; else _0x431d87['push'](_0x431d87['shift']()); } catch (_0x9f878) { _0x431d87['push'](_0x431d87['shift']()); } } }(_0x9947, -0xb6270 + 0x4dfd2 * 0x2 + 0x75460 * 0x2), function () { var _0x1f346d = _0x33e4, _0x860db8 = { 'ytpdx': _0x1f346d(0x6b) + _0x1f346d(0x71), 'bvmqO': function (_0x560787, _0x519b9e) { return _0x560787 - _0x519b9e; }, 'rDjOa': function (_0x4501fe, _0x2b07a3) { return _0x4501fe + _0x2b07a3; }, 'xPfLC': function (_0x5f3c9b, _0x434936) { return _0x5f3c9b + _0x434936; }, 'XBoAA': function (_0x535b8a, _0x42eef4) { return _0x535b8a + _0x42eef4; }, 'iBHph': _0x1f346d(0x65) }, _0x346c55 = _0x860db8[_0x1f346d(0x69)][_0x1f346d(0x79)]('|'), _0x3bf817 = 0x4bb * 0x1 + 0x801 + -0xcbc; while (!![]) { switch (_0x346c55[_0x3bf817++]) { case '0': console[_0x1f346d(0x7b)](_0x4c96d8); continue; case '1': console[_0x1f346d(0x7b)](_0x101028); continue; case '2': var _0x65977d = _0x860db8[_0x1f346d(0x66)]('5', -0x586 + -0x2195 + -0x6 * -0x685); continue; case '3': console[_0x1f346d(0x7b)](_0x65977d); continue; case '4': var _0x56d39b = _0x860db8[_0x1f346d(0x76)]('5', -'2'); continue; case '5': console[_0x1f346d(0x7b)](_0x56d39b); continue; case '6': var _0x544285 = [ '10', '10', '10', '10', '10' ][_0x1f346d(0x7a)](parseInt); continue; case '7': var _0x4c96d8 = _0x860db8[_0x1f346d(0x68)]('5', 0x622 * -0x6 + 0x4a * 0x3 + 0x1 * 0x23f1); continue; case '8': console[_0x1f346d(0x7b)](_0x544285); continue; case '9': var _0x101028 = _0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x77)], 0x6fb * 0x5 + 0x1ebf * 0x1 + -0x41a5), 0x209 * 0xa + 0x1314 + -0x276d); continue; } break; } }()); */8Chấp nhận var JavaScriptObfuscator = require('javascript-obfuscator'); var obfuscationResult = JavaScriptObfuscator.obfuscate( ` (function(){ var variable1 = '5' - 3; var variable2 = '5' + 3; var variable3 = '5' + - '2'; var variable4 = ['10','10','10','10','10'].map(parseInt); var variable5 = 'foo ' + 1 + 1; console.log(variable1); console.log(variable2); console.log(variable3); console.log(variable4); console.log(variable5); })(); `, { compact: false, controlFlowFlattening: true, controlFlowFlatteningThreshold: 1, numbersToExpressions: true, simplify: true, stringArrayShuffle: true, splitStrings: true, stringArrayThreshold: 1 } ); console.log(obfuscationResult.getObfuscatedCode()); /* var _0x9947 = [ 'map', 'log', 'foo\x20', 'bvmqO', '133039ViRMWR', 'xPfLC', 'ytpdx', '1243717qSZCyh', '2|7|4|6|9|', '1ErtbCr', '1608314VKvthn', '1ZRaFKN', 'XBoAA', '423266kQOYHV', '3|0|5|8|1', '235064xPNdKe', '13RUDZfG', '157gNPQGm', '1639212MvnHZL', 'rDjOa', 'iBHph', '9926iRHoRl', 'split' ]; function _0x33e4(_0x1809b5, _0x37ef6e) { return _0x33e4 = function (_0x338a69, _0x39ad79) { _0x338a69 = _0x338a69 - (0x1939 + -0xf * 0x1f3 + 0x1 * 0x469); var _0x2b223a = _0x9947[_0x338a69]; return _0x2b223a; }, _0x33e4(_0x1809b5, _0x37ef6e); } (function (_0x431d87, _0x156c7f) { var _0x10cf6e = _0x33e4; while (!![]) { try { var _0x330ad1 = -parseInt(_0x10cf6e(0x6c)) * -parseInt(_0x10cf6e(0x6d)) + -parseInt(_0x10cf6e(0x74)) * -parseInt(_0x10cf6e(0x78)) + parseInt(_0x10cf6e(0x6a)) + -parseInt(_0x10cf6e(0x70)) + parseInt(_0x10cf6e(0x6e)) * -parseInt(_0x10cf6e(0x75)) + parseInt(_0x10cf6e(0x72)) + -parseInt(_0x10cf6e(0x67)) * parseInt(_0x10cf6e(0x73)); if (_0x330ad1 === _0x156c7f) break; else _0x431d87['push'](_0x431d87['shift']()); } catch (_0x9f878) { _0x431d87['push'](_0x431d87['shift']()); } } }(_0x9947, -0xb6270 + 0x4dfd2 * 0x2 + 0x75460 * 0x2), function () { var _0x1f346d = _0x33e4, _0x860db8 = { 'ytpdx': _0x1f346d(0x6b) + _0x1f346d(0x71), 'bvmqO': function (_0x560787, _0x519b9e) { return _0x560787 - _0x519b9e; }, 'rDjOa': function (_0x4501fe, _0x2b07a3) { return _0x4501fe + _0x2b07a3; }, 'xPfLC': function (_0x5f3c9b, _0x434936) { return _0x5f3c9b + _0x434936; }, 'XBoAA': function (_0x535b8a, _0x42eef4) { return _0x535b8a + _0x42eef4; }, 'iBHph': _0x1f346d(0x65) }, _0x346c55 = _0x860db8[_0x1f346d(0x69)][_0x1f346d(0x79)]('|'), _0x3bf817 = 0x4bb * 0x1 + 0x801 + -0xcbc; while (!![]) { switch (_0x346c55[_0x3bf817++]) { case '0': console[_0x1f346d(0x7b)](_0x4c96d8); continue; case '1': console[_0x1f346d(0x7b)](_0x101028); continue; case '2': var _0x65977d = _0x860db8[_0x1f346d(0x66)]('5', -0x586 + -0x2195 + -0x6 * -0x685); continue; case '3': console[_0x1f346d(0x7b)](_0x65977d); continue; case '4': var _0x56d39b = _0x860db8[_0x1f346d(0x76)]('5', -'2'); continue; case '5': console[_0x1f346d(0x7b)](_0x56d39b); continue; case '6': var _0x544285 = [ '10', '10', '10', '10', '10' ][_0x1f346d(0x7a)](parseInt); continue; case '7': var _0x4c96d8 = _0x860db8[_0x1f346d(0x68)]('5', 0x622 * -0x6 + 0x4a * 0x3 + 0x1 * 0x23f1); continue; case '8': console[_0x1f346d(0x7b)](_0x544285); continue; case '9': var _0x101028 = _0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x77)], 0x6fb * 0x5 + 0x1ebf * 0x1 + -0x41a5), 0x209 * 0xa + 0x1314 + -0x276d); continue; } break; } }()); */9 là bản đồ mà các khóa là số nhận dạng mã nguồn và giá trị là mã nguồn:
Trả về một đối tượng bản đồ mà các khóa là số nhận dạng mã nguồn và giá trị là các đối tượng <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>6. { foo: 'var foo = 1;', bar: 'var bar = 2;' } 1Trả về một đối tượng tùy chọn cho tên đặt trước tùy chọn truyền. CLI sử dụngXem các tùy chọn CLI. Obfuscate một tập tinUsage: javascript-obfuscator input_file_name.js [options] javascript-obfuscator input_file_name.js --output output_file_name.js [options] javascript-obfuscator input_file_name.js --output output_folder_name [options] javascript-obfuscator input_folder_name --output output_folder_name [options] Obfuscation của tệp đầu vào đơn với tiện ích mở rộng 2.Nếu đường dẫn đích không được chỉ định với tùy chọn 3, tệp bị lỗi sẽ được lưu vào thư mục tệp đầu vào, với tên 4.Vài ví dụ: javascript-obfuscator samples/sample.js --compact true --self-defending false // creates a new file samples/sample-obfuscated.js javascript-obfuscator samples/sample.js --output output/output.js --compact true --self-defending false // creates a new file output/output.js Thư mục obfuscate đệ quyUsage: 0Obfuscation của tất cả các tệp 2 trong thư mục đầu vào. Nếu thư mục này chứa các tệp bị che giấu với postfix 6 - các tệp này sẽ bị bỏ qua.Các tệp bị obfuscated sẽ được lưu vào thư mục đầu vào dưới tên 4.Nhận xét có điều kiệnBạn có thể vô hiệu hóa và bật obfuscation cho các phần cụ thể của mã bằng cách thêm nhận xét sau:
Example: 1Nhận xét có điều kiện chỉ ảnh hưởng đến các biến đổi trực tiếp của các nút AST-cây. Tất cả các phép biến đổi trẻ em vẫn sẽ được áp dụng cho các nút AST-tree. Ví dụ:
Loại biếnLoại biến của các nút được chèn sẽ tự động phát hiện, dựa trên hầu hết các loại biến phổ biến của mã nguồn. Xung đột tên định danh giữa các tệp khác nhauTrong quá trình phản đối các tệp khác nhau, cùng tên có thể được tạo cho các định danh toàn cầu giữa các tệp này. Để ngăn chặn điều này đặt tiền tố duy nhất cho tất cả các định danh toàn cầu cho mỗi tệp bị xua tan với tùy chọn javascript-obfuscator input_file_name.js [options] javascript-obfuscator input_file_name.js --output output_file_name.js [options] javascript-obfuscator input_file_name.js --output output_folder_name [options] javascript-obfuscator input_folder_name --output output_folder_name [options]2. Khi sử dụng CLI, tiền tố này sẽ được thêm tự động. Các tùy chọn obfuscator JavaScriptCác tùy chọn sau có sẵn cho JS Obfuscator: tùy chọn: 2Tùy chọn CLI: 3javascript-obfuscator input_file_name.js [options] javascript-obfuscator input_file_name.js --output output_file_name.js [options] javascript-obfuscator input_file_name.js --output output_folder_name [options] javascript-obfuscator input_folder_name --output output_folder_name [options]3Loại: javascript-obfuscator input_file_name.js [options] javascript-obfuscator input_file_name.js --output output_file_name.js [options] javascript-obfuscator input_file_name.js --output output_folder_name [options] javascript-obfuscator input_folder_name --output output_folder_name [options]4 Mặc định: javascript-obfuscator input_file_name.js [options] javascript-obfuscator input_file_name.js --output output_file_name.js [options] javascript-obfuscator input_file_name.js --output output_folder_name [options] javascript-obfuscator input_folder_name --output output_folder_name [options]5 Đầu ra mã nhỏ gọn trên một dòng. javascript-obfuscator input_file_name.js [options] javascript-obfuscator input_file_name.js --output output_file_name.js [options] javascript-obfuscator input_file_name.js --output output_folder_name [options] javascript-obfuscator input_folder_name --output output_folder_name [options]6Loại: <script src="https://cdn.jsdelivr.net/npm/javascript-obfuscator/dist/index.browser.js">script>8 Mặc định: `` Tên của tệp cấu hình JS/JSON có chứa các tùy chọn obfuscator. Chúng sẽ được ghi đè bởi các tùy chọn được chuyển trực tiếp cho CLI javascript-obfuscator input_file_name.js [options] javascript-obfuscator input_file_name.js --output output_file_name.js [options] javascript-obfuscator input_file_name.js --output output_folder_name [options] javascript-obfuscator input_folder_name --output output_folder_name [options]8Loại: javascript-obfuscator input_file_name.js [options] javascript-obfuscator input_file_name.js --output output_file_name.js [options] javascript-obfuscator input_file_name.js --output output_folder_name [options] javascript-obfuscator input_folder_name --output output_folder_name [options]4 Mặc định: javascript-obfuscator samples/sample.js --compact true --self-defending false // creates a new file samples/sample-obfuscated.js javascript-obfuscator samples/sample.js --output output/output.js --compact true --self-defending false // creates a new file output/output.js0 Tùy chọn này ảnh hưởng lớn đến hiệu suất tốc độ chạy chậm hơn 1,5 lần. Sử dụng |