Created
July 16, 2012 13:16
-
-
Save aemkei/3122658 to your computer and use it in GitHub Desktop.
Obfuscate JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.jsfuck.com/ | |
// RUN THIS IN JAVASCRIPT | |
([]+{}+[])[!!{}+![]]+([]+ | |
{}+[])[!!{}+!![]]+(!{}+[] | |
)[!{}+![]]+([][{}]+[])[!{ | |
}+![]]+(!{}+[])[![]+!!{}+ | |
!!{}+!![]]+({}+{})[(!!{}+ | |
!![])*(!!{}+!![])+!!{}]+( | |
{}-{}+[])[!!{}+![]]+([]+! | |
!{})[!{}+![]]+([]+!!{})[! | |
[]+!!{}+!!{}+!![]]+([][{} | |
]+[])[![]+!!{}+!![]] // ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Update]: Now with eval(): http://jsbin.com/usumaq/quiet | |
possible characters: abcdefijlnorstuy NOI [] | |
sample string: obfuscated | |
undefined = ([][{}]+[]) | |
[object Object] = ({}+[]) | |
false = (!{}+[]) | |
true = ([]+!!{}) | |
NaN = ({}-{}+[]) | |
Infinity = (!!{}/![]+[]) | |
0 = !{}+![] | |
0 = +!{} | |
1 = !!{}+![] | |
1 = +!![] | |
1 = +!+{} | |
2 = ![]+!!{}+!![] | |
2 = !!{}+!![] | |
2 = +!+[]+!!{} | |
3 = ![]+!!{}+!!{}+!![] | |
5 = (!!{}+!![])*(![]+!!{}+!![])+!!{} | |
o ([]+{}+[])[1] | |
b ([]+{}+[])[2] | |
f (!{}+[])[0] | |
u ([][{}]+[])[0] | |
s (!{}+[])[3] | |
c ({}+{})[5] | |
a ({}-{}+[])[1] | |
t ([]+!!{})[0] | |
e ([]+!!{})[3] | |
d ([][{}]+[])[2] | |
([]+{}+[])[!!{}+![]]+ | |
([]+{}+[])[!!{}+!![]]+ | |
(!{}+[])[!{}+![]]+ | |
([][{}]+[])[!{}+![]]+ | |
(!{}+[])[![]+!!{}+!!{}+!![]]+ | |
({}+{})[(!!{}+!![])*(!!{}+!![])+!!{}]+ | |
({}-{}+[])[!!{}+![]]+ | |
([]+!!{})[!{}+![]]+ | |
([]+!!{})[![]+!!{}+!!{}+!![]]+ | |
([][{}]+[])[![]+!!{}+!![]] | |
([]+{}+[])[!!{}+![]]+([]+{}+[])[!!{}+!![]]+(!{}+[])[!{}+![]]+([][{}]+[])[!{}+![]]+(!{}+[])[![]+!!{}+!!{}+!![]]+({}+{})[(!!{}+!![])*(!!{}+!![])+!!{}]+({}-{}+[])[!!{}+![]]+([]+!!{})[!{}+![]]+([]+!!{})[![]+!!{}+!!{}+!![]]+([][{}]+[])[![]+!!{}+!![]] |
([][{}]+[])[6]+([][{}]+[])[5]+({}+{})[5]+([][{}]+[])[3]+"!"
Actually there is a tool : http://utf-8.jp/public/jsfuck.html
@tsaniel Damn, I thought I'm the first one who worked that out.
Just got the crazy constructor thing working to get the latest missing chars:
m = (0..constructor+"")[11]
But the tools seems to be broken in Node and Chrome.
Array.prototype.sort called on null or undefined
I guess that's an issue when they try to get "w" using this:
[].sort.call()
In old browsers it returned window
but now it doesn't.
Ps: The source of this converter is a bit more readable:
http://discogscounter.getfreehosting.co.uk/js-noalnum.php?txt=%22abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%22
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Brilliant. Now implement this in Brainfuck or vice versa. ;-)