JS逆向:常见的JS代码混淆策略的逆向特征

eval 混淆

Javascript 提供了将字符串当做代码执行(evaluate)的能力,可以通过 Function 构造器、evalsetTimeoutsetInterval 将字符串传递给 js 引擎进行解析执行。其最明显的特征是生成的代码以 eval(function(p,a,c,k,...){...}) 开头。 这类混淆的关键思想在于将需要执行的代码进行一次编码,在执行的时候还原出浏览器可执行的合法的脚本,然后执行之,看上去和可执行文件的加壳有那么点类似。

逆向特征

  • 无论代码如何进行变形,其最终都要调用一次 evalthrow 等函数。
  • 解密的方法不需要对其算法做任何分析,只需要简单地找到这个最终的调用,改为 console.log 或者其他方式,将程序解码后的结果按照字符串输出即可。
  • 关键字:evalthrow

AA 混淆

有如下 js 代码:

var test = function(x){console.log(x)}
test('1')

使用 https://www.jsjiami.com/aaencode.html 工具,经过 AA 混淆后得到:

゚ω゚ノ= /`m´)ノ ~┻━┻   //*´∇`*/ ['_']; o=(゚ー゚)  =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');

经过美化后,展示如下:

゚ω゚ノ = /`m´)ノ ~┻━┻   //*´∇`*/
['_'];
o = (゚ー゚) = _ = 3;
c = (゚Θ゚) = (゚ー゚) - (゚ー゚);
(゚Д゚) = (゚Θ゚) = (o ^ _ ^ o) / (o ^ _ ^ o);
(゚Д゚) = {
    ゚Θ゚: '_',
    ゚ω゚ノ: ((゚ω゚ノ == 3) + '_')[゚Θ゚],
    ゚ー゚ノ: (゚ω゚ノ + '_')[o ^ _ ^ o - (゚Θ゚)],
    ゚Д゚ノ: ((゚ー゚ == 3) + '_')[゚ー゚]
};
(゚Д゚)[゚Θ゚] = ((゚ω゚ノ == 3) + '_')[c ^ _ ^ o];
(゚Д゚)['c'] = ((゚Д゚) + '_')[(゚ー゚) + (゚ー゚) - (゚Θ゚)];
(゚Д゚)['o'] = ((゚Д゚) + '_')[゚Θ゚];
(゚o゚) = (゚Д゚)['c'] + (゚Д゚)['o'] + (゚ω゚ノ + '_')[゚Θ゚] + ((゚ω゚ノ == 3) + '_')[゚ー゚] + ((゚Д゚) + '_')[(゚ー゚) + (゚ー゚)] + ((゚ー゚ == 3) + '_')[゚Θ゚] + ((゚ー゚ == 3) + '_')[(゚ー゚) - (゚Θ゚)] + (゚Д゚)['c'] + ((゚Д゚) + '_')[(゚ー゚) + (゚ー゚)] + (゚Д゚)['o'] + ((゚ー゚ == 3) + '_')[゚Θ゚];
(゚Д゚)['_'] = (o ^ _ ^ o)[゚o゚][゚o゚];
(゚ε゚) = ((゚ー゚ == 3) + '_')[゚Θ゚] + (゚Д゚).゚Д゚ノ + ((゚Д゚) + '_')[(゚ー゚) + (゚ー゚)] + ((゚ー゚ == 3) + '_')[o ^ _ ^ o - ゚Θ゚] + ((゚ー゚ == 3) + '_')[゚Θ゚] + (゚ω゚ノ + '_')[゚Θ゚];
(゚ー゚) += (゚Θ゚);
(゚Д゚)[゚ε゚] = '\\';
(゚Д゚).゚Θ゚ノ = (゚Д゚ + ゚ー゚)[o ^ _ ^ o - (゚Θ゚)];
(o゚ー゚o) = (゚ω゚ノ + '_')[c ^ _ ^ o];
(゚Д゚)[゚o゚] = '\"';
(゚Д゚)['_']((゚Д゚)['_'](゚ε゚ + (゚Д゚)[゚o゚] + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + (゚ー゚) + (゚Θ゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + ((o ^ _ ^ o) - (゚Θ゚)) + (゚Д゚)[゚ε゚] + (゚ー゚) + (c ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚ー゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + (゚ー゚) + ((゚ー゚) + (゚Θ゚)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (o ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚ー゚) + (゚Д゚)[゚ε゚] + (゚ー゚) + (c ^ _ ^ o) + (゚Д゚)[゚ε゚] + ((゚ー゚) + (o ^ _ ^ o)) + ((゚ー゚) + (゚Θ゚)) + (゚Д゚)[゚ε゚] + (゚ー゚) + (c ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + (゚ー゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + ((゚ー゚) + (゚Θ゚)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + (゚ー゚) + (o ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚ー゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + (゚Θ゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + ((゚ー゚) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + ((゚ー゚) + (゚Θ゚)) + (c ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (o ^ _ ^ o)) + (c ^ _ ^ o) + (゚Д゚)[゚ε゚] + ((゚ー゚) + (゚Θ゚)) + (゚Θ゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (o ^ _ ^ o)) + (o ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + (゚ー゚) + (o ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + ((゚ー゚) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (o ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + ((゚ー゚) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + (゚ー゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + (゚ー゚) + ((゚ー゚) + (゚Θ゚)) + (゚Д゚)[゚ε゚] + ((゚ー゚) + (゚Θ゚)) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + (゚ー゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (゚Θ゚)) + ((゚ー゚) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + (゚ー゚) + ((゚ー゚) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + ((゚ー゚) + (゚Θ゚)) + (c ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (o ^ _ ^ o)) + (c ^ _ ^ o) + (゚Д゚)[゚ε゚] + ((゚ー゚) + (゚Θ゚)) + (゚Θ゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((゚ー゚) + (o ^ _ ^ o)) + ((゚ー゚) + (゚Θ゚)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) - (゚Θ゚)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚ー゚) + (゚Д゚)[゚ε゚] + (゚Θ゚) + (゚ー゚) + ((゚ー゚) + (゚Θ゚)) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (o ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚Θ゚) + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚ー゚) + (゚Д゚)[゚ε゚] + ((゚ー゚) + (゚Θ゚)) + (c ^ _ ^ o) + (゚Д゚)[゚ε゚] + (゚ー゚) + ((゚ー゚) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + ((o ^ _ ^ o) + (o ^ _ ^ o)) + (゚Θ゚) + (゚Д゚)[゚ε゚] + (゚ー゚) + ((゚ー゚) + (o ^ _ ^ o)) + (゚Д゚)[゚ε゚] + ((゚ー゚) + (゚Θ゚)) + (゚Θ゚) + (゚Д゚)[゚o゚])(゚Θ゚))('_');

反混淆工具

注意:不同站点的混淆工具,得到的混淆结果不尽相同,在一个站点生成的混淆代码,在另一站点不一定能反混淆成功。

  • https://www.qtool.net/decode
  • https://cat-in-136.github.io/2010/12/aadecode-decode-encoded-as-aaencode.html
  • http://www.hiencode.com/jjencode.html

JJ 混淆

有如下 js 代码:

var test = function(x){console.log(x)}
test('1');

设全局变量 $,经过 jj 混淆后将代码如下:

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

美化展示,得到下面的代码:

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

注意: 美化后的 jj 混淆代码可能无法进行直接解码。

使用 http://www.hiencode.com/jjencode.html 解码工具,将美化后的 jj 混淆代码进行 decode 解码时,会有 no match 报错,如下图:

而如果 jj 混淆代码是未经美化的,那就可以顺利的解码,如下图:

jsfuck

  • jsfuck 源于一门编程语言 brainfuck,其主要的思想就是只使用8种特定的符号来编写代码;
  • jsfuck 也是沿用了这个思想,它仅仅使用6种符号来编写代码,它们分别是 (、)、+、[、]、!
  • github:https://github.com/aemkei/jsfuck

  • 下面这串代码,复制黏贴到 consle 中执行:
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()
  • 执行的结果如下图所示,窗口弹出数字 “1”:

生成 jsfuck 代码

  • 我们也可以在 jsfuck 调试网站,将普通的 js 代码转换成 jsfuck 代码;

    调试网站:http://www.jsfuck.com/ 

jsfuck 调试

  • 复制下面的代码,在 console 中执行;
[][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]][([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]]((!![] + [])[+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+!![]] + (![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (+[![]] + [[!![]][+(![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![] + [+[]]]]] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![] + [+[]]] + (![] + [])[+!![]] + (![] + [])[!![] + !![]])()((!![] + !![] + [!![] + !![]] + ![] + (+!![]) + (+!![]) + ![] + (+!![]) + ![] + ![] + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![] + !![] + !![]) + (+!![]) + ![] + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + ![] + (+!![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + ![] + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (+!![]) + ![] + ![] + (+!![]) + ![] + ![] + (!![] + !![] + !![] + !![]) + (+!![]) + ![] + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + ![] + (+!![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + ![] + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (+!![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![]) + (+!![]) + ![] + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (+!![]) + ![] + ![] + (!![] + !![] + !![] + !![] + !![]) + (+[]) + ![] + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (+!![]) + ![] + ![] + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + ![] + (!![] + !![] + !![] + !![]) + (+!![]) + ![] + ![] + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+!![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (+[]) + ![] + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + ![] + (+!![]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (+!![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + ![] + (+!![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (+[]) + ![] + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + ![] + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (+[]) + ![] + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + ![] + (+!![]) + ![] + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (+[]) + ![] + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (+!![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + ![] + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![]) + (+!![]) + ![] + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + ![] + ![] + ![] + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + ![] + (!![] + !![] + !![] + !![]) + (+!![]) + ![] + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + ![] + (+!![]) + (+[]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + ![] + (+!![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + ![] + ![] + ![] + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (+!![]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (+!![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + ![] + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (+!![]) + ![] + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + (!![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+!![]) + ![] + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + (+!![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (+[]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![] + !![]) + (+[]) + ![] + (+!![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + (+!![]) + (!![] + !![]) + ![] + (!![] + !![]) + (!![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + ![] + (+!![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + ![] + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![]) + ![] + (+!![]) + (+!![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + ![] + ![] + ![] + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (+!![]) + ![] + (!![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![]) + (+!![]))[(![] + [])[!![] + !![] + !![]] + (+[![]] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]][([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]]((!![] + [])[+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+!![]] + (![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + [+[]]] + ([][(!![] + [])[!![] + !![] + !![]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (![] + [])[!![] + !![] + !![]]]() + [])[!![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (![] + [])[+!![]])()([][[]]))[+!![] + [+[]]] + (![] + [])[!![] + !![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[+[]]](![])[(+(!![] + !![] + [+[]] + (+!![]) + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![])))[(!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([] + [])[([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]][([][[]] + [])[+!![]] + (![] + [])[+!![]] + ([] + (+[])[([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]])[+!![] + [+!![]]] + (!![] + [])[!![] + !![] + !![]]]](!![] + !![] + !![] + [+[]])](([] + [])[([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]][([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]]((!![] + [])[+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+!![]] + (![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + [+[]]] + ([][(!![] + [])[!![] + !![] + !![]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (![] + [])[!![] + !![] + !![]]]() + [])[!![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (![] + [])[+!![]])()(+[] + [![]])[!![] + !![] + !![]] + (![] + [])[+!![]] + (!![] + [])[+!![]] + (+[![]] + [][(!![] + [])[!![] + !![] + !![]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (![] + [])[!![] + !![] + !![]]]())[+!![] + [+!![]]] + (!![] + [])[+[]]][([][(!![] + [])[!![] + !![] + !![]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (![] + [])[!![] + !![] + !![]]]() + [])[!![] + !![]] + ([![]] + [][[]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + ([][[]] + [])[!![] + !![]]]([][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]][([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]]((!![] + [])[+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+!![]] + (![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + [+[]]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (![] + [])[+!![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (![] + [])[!![] + !![] + !![]] + (+(+!![] + [+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + !![]) + (+[])) + [])[+!![]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]] + (+(+!![] + [+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + !![]) + (+[])) + [])[+!![]] + (![] + [])[+[]] + (!![] + [])[+!![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([] + (+[])[([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]])[+!![] + [+!![]]] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]][([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]]((!![] + [])[+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+!![]] + (![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + [+[]]] + (![] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][(!![] + [])[!![] + !![] + !![]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (![] + [])[!![] + !![] + !![]]]() + [])[!![] + !![]])()(+[] + [+[]] + (+[![]]) + ![])[+!![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[!![] + !![]] + (!![] + [])[!![] + !![] + !![]] + ([][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]][([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]]((!![] + [])[+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+!![]] + (![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + [+[]]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (![] + [])[+!![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (![] + [])[!![] + !![] + !![]] + ([][(!![] + [])[!![] + !![] + !![]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (![] + [])[!![] + !![] + !![]]]() + [])[!![] + !![]] + (![] + [])[+!![]] + (!![] + [])[+!![]])() + [])[+!![] + [+!![]]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([![]] + [][[]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [!![] + !![] + !![]]] + (!![] + !![] + !![] + [!![] + !![]] + ![] + (+!![]) + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + (+[]) + ![] + (+!![]) + (+!![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + (+!![]) + ![] + (!![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (+!![]) + ![] + (+!![]) + (+[]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + ![] + (+!![]) + (+[]) + (!![] + !![]) + ![] + (!![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + (+!![]) + ![] + (+!![]) + (+[]) + (+[]) + ![] + (+!![]) + (+[]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + (+!![]) + ![] + (+!![]) + (+!![]) + (!![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + (+!![]) + ![] + (+!![]) + (+[]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (!![] + !![]) + (!![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + (+[]) + ![] + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + (!![] + !![] + !![]) + ![] + (+!![]) + (+!![]) + (!![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (!![] + !![] + !![] + !![]) + (!![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![]) + ![] + (+!![]) + (+[]) + (!![] + !![] + !![] + !![]))[(![] + [])[!![] + !![] + !![]] + (+[![]] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]][([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([][[]] + [])[+!![]] + (![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+[]] + ([] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (!![] + [])[+!![]]]((!![] + [])[+!![]] + (!![] + [])[!![] + !![] + !![]] + (!![] + [])[+[]] + ([][[]] + [])[+[]] + (!![] + [])[+!![]] + ([][[]] + [])[+!![]] + (![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + [+[]]] + ([][(!![] + [])[!![] + !![] + !![]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (![] + [])[!![] + !![] + !![]]]() + [])[!![] + !![]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + (![] + [])[+!![]])()([][[]]))[+!![] + [+[]]] + (![] + [])[!![] + !![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[+[]]](![]) + (+[] + [![]] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[!![] + !![] + [+[]]])()))[([][(!![] + [])[!![] + !![] + !![]] + ([][[]] + [])[+!![]] + (!![] + [])[+[]] + (!![] + [])[+!![]] + ([![]] + [][[]])[+!![] + [+[]]] + (!![] + [])[!![] + !![] + !![]] + (![] + [])[!![] + !![] + !![]]]() + [])[!![] + !![] + !![]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][[]])[+!![] + [+[]]] + (![] + [])[!![] + !![]] + (![] + [])[!![] + !![]]])[+!![] + [+[]]] + ([![]] + [][[]])[+!![] + [+[]]] + ([][[]] + [])[+!![]]]([]))
  • 发现 console 提示下面的错误;

  • 此时我们需要把代码复制到 notepad++ 编辑器,鼠标放在代码最后,如下图:
  • 之后往上翻,查找对应的左半边括号,如下图:

  • 将【括号内部】的代码,复制到 console 中执行,得到下面的代码:

隐写术

  • 严格说这不能称之为混淆,只是将 js 代码隐藏到了特定的介质当中。如通过最低有效位(LSB)算法嵌入到图片的 RGB 通道、隐藏在图片 EXIF 元数据、隐藏在 HTML 空白字符等。

  • 比如这个耸人听闻的议题:《一张图片黑掉你》在图片中嵌入恶意程序,正是使用了最低有效位平面算法。结合 HTML5 的 canvas 或者处理二进制数据的 TypeArray,脚本可以抽取出载体中隐藏的数据(如代码)。

复杂表达式

代码混淆不一定会调用 eval,也可以通过在代码中填充无效的指令来增加代码复杂度,极大地降低可读性。Javascript 中存在许多称得上丧心病狂的特性,这些特性组合起来,可以把原本简单的字面量(Literal)、成员访问(MemberExpression)、函数调用(CallExpression)等代码片段变得难以阅读。

举个简单的例子,可能会更好理解:

  1. 访问一个对象的成员有两种方法——点运算符和下标运算符。调用 windoweval 方法,既可以写成 window.eval(),也可以 window[‘eval’]
  2. 为了让代码更变态一些,混淆器选用第二种写法,然后再在字符串字面量上做文章。先把字符串拆成几个部分:’e’ + ‘v’ + ‘al’
  3. 这样看上去还是很明显,再利用一个数字进制转换的技巧:14..toString(15) + 31..toString(32) + 0xf1.toString(22)
  4. 一不做二不休,把数字也展开:(0b1110).toString(4<<2) + (‘ ‘.charCodeAt() - 1).toString(Math.log(0x100000000) / Math.log(2)) + 0xf1.toString(11 << 1)
  5. 最后的效果:window[(2*7).toString(4<<2) + (‘ ‘.charCodeAt() - 1).toString(Math.log(0x100000000) / Math.log(2)) + 0xf1.toString(11 << 1)](http://jartto.wang/2017/10/31/js-anti-aliasing/'alert(1)‘)

在 js 中可以找到许多这样互逆的运算,通过使用随机生成的方式将其组合使用,可以把简单的表达式无限复杂化。

  • 隐写的方式同样需要解码程序和动态执行,所以破解的方式和前者相同,在浏览器上下文中劫持替换关键函数调用的行为,改为文本输出即可得到载体中隐藏的代码。

ob 混淆

TODO