Javascript code obfuscator for NodeJS
JavaScript Perl
Latest commit b7a7aa3 May 8, 2013 @contra contra Update LICENSE
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.npmignore
CHANGELOG.md
LICENSE
README.md
TODO.md
package.json

README.md

Installation

To install node-obf, use npm:

$ npm install node-obf

Usage

require('node-obf').obfuscate(global variable, code);

Example:

var obf = require('node-obf');
obf.obfuscate('$$', 'alert("hello world!")');

This will return

$$=~[];$$={___:++$$,$$$$:(![]+"")[$$],__$:++$$,$_$_:(![]+"")[$$],_$_:++$$,$_$$:({}+"")[$$],$$_$:($$[$$]+"")[$$],_$$:++$$,$$$_:(!""+"")[$$],$__:++$$,$_$:++$$,$$__:({}+"")[$$],$$_:++$$,$$$:++$$,$___:++$$,$__$:++$$};$$.$_=($$.$_=$$+"")[$$.$_$]+($$._$=$$.$_[$$.__$])+($$.$$=($$.$+"")[$$.__$])+((!$$)+"")[$$._$$]+($$.__=$$.$_[$$.$$_])+($$.$=(!""+"")[$$.__$])+($$._=(!""+"")[$$._$_])+$$.$_[$$.$_$]+$$.__+$$._$+$$.$;$$.$$=$$.$+(!""+"")[$$._$$]+$$.__+$$._+$$.$+$$.$$;$$.$=($$.___)[$$.$_][$$.$_];$$.$($$.$($$.$$+"\""+$$.$_$_+(![]+"")[$$._$_]+$$.$$$_+"\\"+$$.__$+$$.$$_+$$._$_+$$.__+"(\\\"\\"+$$.__$+$$.$_$+$$.___+$$.$$$_+(![]+"")[$$._$_]+(![]+"")[$$._$_]+$$._$+"\\"+$$.$__+$$.___+"\\"+$$.__$+$$.$$_+$$.$$$+$$._$+"\\"+$$.__$+$$.$$_+$$._$_+(![]+"")[$$._$_]+$$.$$_$+"!\\\")"+"\"")())();

OG

All credit to Yosuke Hasegawa. All I did was find this on SO, clean up the source, and turn it into a node module. You can view the original authors site at http://utf-8.jp/