Javascript code obfuscator
一个 JS 代码混淆器
e.g.
- input:
console.log(/\w/img.test('hello'));
- output:
(function ($fog$0, $fog$1, $fog$2, $fog$3) {
console[$fog$0]($fog$2[$fog$1]($fog$3));
})("log", "test", /\w/img, "hello");
$ npm install --save jfogs
var jfogs = require('jfogs');
console.log(jfogs.obfuscate('function hello() { console.log('Hello world!'); }'));
$ npm install --global jfogs
$ jfogs --help
Usage:
jfogs <input list> [options]
Options:
-o, --output Output file (default STDOUT)
-t, --type Encryption type (default "") e.g. "zero" | "reverse"
-v, --version Output jfogs version
MIT © zswang