Express middleware plugin for obfuscation purposes.
Installation
npm i -S express-middleware-obfuscator
Usage
const express = ;const app = ; const express_middleware_obfuscator = ; app; app;
Example of obfuscation
Not obfuscated
const helloMessage = { console}; const house = name: "Casa topo" rooms: 3 bathrooms: 2 meters: 54 wooden_planks_floor: true { ; } { ; }; house;
Obfuscated
var _0x9f4d='\x6c\x65\x6e\x67\x74\x68''\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72''\x64\x65\x62\x75\x67\x67\x65\x72''\x61\x70\x70\x6c\x79''\x72\x65\x74\x75\x72\x6e\x20\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20''\x7b\x7d\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x22\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x22\x29\x28\x20\x29''\x63\x6f\x6e\x73\x6f\x6c\x65''\x6c\x6f\x67''\x77\x61\x72\x6e''\x65\x72\x72\x6f\x72''\x65\x78\x63\x65\x70\x74\x69\x6f\x6e''\x74\x72\x61\x63\x65''\x64\x65\x62\x75\x67';{var {while--_0x17e481_0xd5e86c'\x70\x75\x73\x68'_0xd5e86c'\x73\x68\x69\x66\x74';};;}_0x9f4d0x9f;var {_0x15d794=_0x15d794-0x0;var _0x4f5e9a=_0x9f4d_0x15d794;return _0x4f5e9a;};var {var _0x33ab0e=!!;return {var _0x11b3dc=_0x33ab0e?{if_0x5722devar _0x3c58e4=_0x5722de_0x1ffa62arguments;_0x5722de=null;return _0x3c58e4;}:{};_0x33ab0e=!;return _0x11b3dc;};};var _0x303372=;;;var {{if''+_0x36aabc/_0x36aabc!==0x1||_0x36aabc%0x14===0x0{};else{};;}try;catch_0x10d436{}};;
Options
name | option | description | default |
---|---|---|---|
src | string | public javascript path | - |
version | string | name of the cache version | Date.now() |
console_enabled | boolean | if console log is enabled | true |