Skip to content

Instantly share code, notes, and snippets.

@JavaScript-Packer
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save JavaScript-Packer/5e4eb1a5353111021b2b to your computer and use it in GitHub Desktop.

Select an option

Save JavaScript-Packer/5e4eb1a5353111021b2b to your computer and use it in GitHub Desktop.
Command Runner Function - Highly obfuscated eval because some sites do not allow it (usually confuse it with PHP's evil eval)... Live demo on http://jsfiddle.net/rb46a1rr/1/
/* 348 bytes command runner AKA hidden eval, I modfied code from aemkei */
function command2(run) {
ウ = "", ア = !ウ + ウ, ネ = !ア + ウ, ホ = ウ + {}, ヌ = ア[ウ++], セ = ア[ミ = ウ], ハ = ++ミ + ウ,
ヘ = ホ[ミ + ハ], ア[ヘ += ホ[ウ] + (ホ.ホ + ホ)[ウ] + ネ[ハ] + ヌ + セ + ア[ミ] + ヘ + ヌ + ホ[ウ] +
セ][ヘ](ア[ハ] + "v" + ネ[ウ] + ネ[ミ] + "(" + run + ")")();
}
//command2("alert('WHAK.com'),alert(9)"); //semicolons will break it
// minified version to 256 bytes
/*
function x(y){ウ="",ア=!ウ+ウ,ネ=!ア+ウ,ホ=ウ+{},ヌ=ア[ウ++],セ=ア[ミ=ウ],ハ=++ミ+ウ,ヘ=ホ[ミ+ハ],
ア[ヘ+=ホ[ウ]+(ホ.ホ+ホ)[ウ]+ネ[ハ]+ヌ+セ+ア[ミ]+ヘ+ヌ+ホ[ウ]+セ][ヘ](ア[ハ]+"v"+ネ[ウ]+ネ[ミ]+"("+y+")")()}
//x("alert('WHAK.com'),alert(9)");
*/
// minified for less bytes as the odd characters above are 2 bytes each, now 158 bytes
/*
function x(y){W="",H=!W+W,A=!H+W,x=W+{},K=H[W++],y=H[z=W],a=++z+W,b=x[z+a],
H[b+=x[W]+(x.x+x)[W]+A[a]+K+y+H[z]+b+K+x[W]+y][b](H[a]+"v"+A[W]+A[z]+"("+y+")")()}
//x("alert('WHAK.com'),alert(9)");
*/
// extreme minifize to 37 bytes
/*
function x(y){\u0065v\u0061\u006c(y)}
//x("alert('WHAK.com'),alert(9)");
*/
@JavaScript-Packer

Copy link
Copy Markdown
Author
function run(a) {
  b = "";
  c = !b + b;
  d = !c + b;
  e = b + {};
  f = c[b++];
  g = c[h = b];
  i = ++h + b;
  j = e[h + i];
  c[j += e[b] + (e.e + e)[b] + d[i] + f + g + c[h] + j + f + e[b] + g][j](c[i] + "v" + d[b] + d[h] + "(" + a + ")")();
}
//run("alert('www.WHAK.com'),alert(9)"); //semicolons will break it

@JavaScript-Packer

Copy link
Copy Markdown
Author
function run(a){b="";c=!b+b;d=!c+b;e=b+{};f=c[b++];g=c[h=b];i=++h+b;j=e[h+i];c[j+=e[b]+(e.e+e)[b]+d[i]+f+g+c[h]+j+f+e[b]+g][j](c[i]+"v"+d[b]+d[h]+"("+a+")")()};
//run("alert('www.WHAK.com'),alert(9)"); //semicolons will break it

@JavaScript-Packer

Copy link
Copy Markdown
Author
var $="alert('www.WHAK.ca')";
this[(true+"")[3]+(+(31))["toString"](32)+(false+"")[1]+(false+"")[2]]($);

@JavaScript-Packer

Copy link
Copy Markdown
Author
var $ = "alert('www.WHAK.ca')";
this[(!0 + "")[3] + 31..toString(32) + (!1 + "")[1] + (!1 + "")[2]]($);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment