Open misland opened 5 years ago
Have you tried running the obfuscator (https://github.com/javascript-obfuscator/javascript-obfuscator) on its own, not as a Rollup plugin?
This plugin has unfortunately not been updated in a long time and uses an older version of the obfuscator. I would suggest trying the latest obfuscator on its own to see if it mangles your lines correctly.
@derrickb As you said,I use it as a Rollup plugin,version is 1.0.1,I will test obfuscato on its own later.many Thanks to you :)
var _0x4651 = ['connection\x20closed', 'indexOf', 'splice', 'error', 'Server\x20error:', 'message', 'clear\x20connection', 'Server\x20closed', 'logError', 'start error\x0d\x0a', 'middleware\x20is\x20running\x20at\x20%s:%d', 'stop', 'middleware\x20has\x20been\x20closed', 'status', 'exports', '../adapter/mssql-access', '../tools/log', '../middleware/hl7parser', 'moment', '127.0.0.1', 'readFile', './ip.json', 'log', 'read error \x0d\x0a', 'parse', 'connection', 'got\x20a\x20new\x20connection\x20host:', 'remoteAddress', '\x20port\x20is:', 'remotePort', 'push', 'data', 'getSearchData', 'toString', 'from', 'queryPromise', 'queryPId', 'then', 'queryExchangePromise', 'queryWithParamsPromise', 'length', 'getReturnMsg', 'getEmptyReturnMsg', 'writeLog', 'search sccess \x0d\x0a', 'concat', 'write', 'catch', 'search error\x0d\x0a', 'search empty\x0d\x0a', 'close']; (function (_0x4a1d85, _0x54af7f) { var _0x485f74 = function (_0xbba3c1) { while (--_0xbba3c1) { _0x4a1d85['push'](_0x4a1d85['shift']()); } }; _0x485f74(++_0x54af7f); }(_0x4651, 0x1c2)); var _0x1465 = function (_0x3dd15e, _0x1f0015) { _0x3dd15e = _0x3dd15e - 0x0; var _0x231fd0 = _0x4651[_0x3dd15e]; return _0x231fd0; }; 'use strict'; const net = require('net'); const fs = require('fs'); const mssql = require(_0x1465('0x0')); const log = require(_0x1465('0x1')); const hl7Parser = require(_0x1465('0x2')); const moment = require(_0x1465('0x3')); const server = net['createServer']();
every time I packed my code ,there are some lines not mangled,sometimes is 'fs' and 'net',and sometimes another lines,can anyone explain this?thanks