Makes Douglas Crockford cry and gives JavaScript debuggers nightmares.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
jsFsck.js
jsFsck.png

README.md

jsFsck

jsFsck

jsFsck is a tool that makes Douglas Crockford cry and gives JavaScript debuggers nightmares.

jsFsck('console.log("hello world");');
"/*‮*/(function(){2226-"p\\>na|m";var fnLIfq=({'Hptty':3355,'Owfioh':9121,'gwCbwohqePwggpyS':window,
'leedeKmth':"iuiz",'f':"xa"});({'y':-5794});var unWkli=[[],~3831];2051.033;"Bm  var io x var H \\tj[p";
var Ahc=[-6071,![],function(fim,twhsn,Muv){-8847;var vH=943.88;[];return vH;},/* c c*/[],3256.598];863.061;
">cm function pmt(){4361.87}j function getAchievement(){\"Yp.X~bmkq\"}be function eval(){2521}fsx";5333.24;
_.each(unWkli,function(bUlgdv,bvIEv,wcBx){".fh";var gwds=2022.671;" var v(us(iu";return gwds;});
(function(a,jinmtd,gn){var T=function(kpic,agp,JqWa,JEWU){console;var dt=-1809;(function(m,OaztOd,axpp){
9832})();return dt;}})();var lbsbJs=_.map(Ahc,function(ni){(function(uZAig,z,ktt,uD,Iu){({});var epAkZf=
"sso function eval(){2088.202}tdog var jab sj";"q[Ueq`u";return epAkZf;});var krc=-3720;({});return krc;});
({'qFdgvjgjqztvjzi':"HXe var list=8868xPQMmt"});~"rZzxze var eval=({})yO<";var imJjv=({'whfq':({}),
'ogdzvcaqzkzvibzz':1381});4408.562;window;var kgqvd=({'wk':[],'oXTHidXdKfBs':-5201,'CnlXd':2646.52,
'jvBqldpPci':9748,'aayb':({})});true;1654.065;3932.31;var zglwMa=_.sortBy(imJjv,function(RXVww){var kmHUg=
({});var p=1463.247;"$PhbzZ";return p;});"tnpDa'b";var x=_.reduce(zglwMa,function(pdf,Gwac){-3808;var cF=
2144.65;var ft=({});return cF;},0);(function(eh){var ufkmv=-5684})();console.log("hello world"/*
‮requestAnimationFrame*/);(function(y,tqu){(function(gch,un,p){(function(pEfq){var mcdc=({'Blpsau
nzgfopsG':"<",'lWizd':-1001,'anbacvpmWAiuykxh':-8599,'toy':-9944})})()})();-9409;"\\?k#lk(z:"})();2482.249;
3476;var ljoyg=7544;var Gvqom=~({});})();"

It still works.... most of the time:

eval(jsFsck('console.log("hello world");'));
hello world

Underscore.js is required. Use jsFsck("foobar", level) with level a number >= 1 to control the amount of fsckery.

Note: jsFsck is not safe. It can only fsck basic JavaScript and will mercilessly clobber variables, comments and strings. Sometimes it generates invalid code. Don't bother trying to use this in production to hide real code, it won't work.