Skip to content

wearefractal/node-obf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/

Releases

No releases published

Packages

No packages published