neige d'aoust

knowledge, art, and other stuff

User Tools

Site Tools


symbolicjs

This is an old revision of the document!


Notes on JavaScipt obfuscation

Inspired by JSFuck, but here's the rules:

  • 7-bit printable ASCII (32 to 126)
  • No alphanumerics ([a-zA-Z0-9]), no spaces, only `` quotes

Build some strings with keywords

Use either `${<code>}` or (<code>+[]) to obtain useful keywords:

keywordcode
[object Object]{}
true !``
false![]
NaN-`!`
undefined[][[]]
-Infinity~[]/[]

Index the strings with numerals

numbercode
-4~-~-~!``
-3~-~!``
-2~!``
-1~``
-0-``
0+``
1+!``
2-~!``
3-~-~!``
4-~-~-~!``

Build a basic alphabet

code
a$$_=`${![]}`[+!``]
b$_$$$=`${{}}`[-~!``]
c$_$_$=`${{}}`[-~-~-~-~!``]
d$_$$=`${[][[]]}`[-~!``]
e$$=`${!``}`[-~-~!``]
f$$$_$=`${![]}`[-``]
i$$$=`${[][[]]}`[-~-~-~-~!``]
j$$___=`${{}}`[-~-~!``]
l$$_$$=`${![]}`[-~!``]
n$_$=`${[][[]]}`[+!``]
o$___=`${{}}`[+!``]
r$$_$=`${!``}`[+!``]
s$$$$=`${![]}`[-~-~!``]
t$_=`${!``}`[-``]
u$$$_=`${!``}`[-~!``]
y$_$__=`${-~[]/[]}`[-~-~-~-~-~-~!``]
I_$$=`${~[]/[]}`[+!``]
N__$=``${-`!`}`[-``]
O____=`${{}}`[-~-~-~-~-~-~-~!``]
space____$=`${{}}`[-~-~-~-~-~-~!``]

Build a function

$=(_=>_)[$_$_$+$___+$_$+$$$$+$_+$$_$+$$$_+$_$_$+$_+$___+$$_$]

Build the global object

$$$$$=$(`${$$_$+$$+$_+$$$_+$$_$+$_$+____$+$_$$$+$_+$___+$$_}\`${$$+$$+$$_}\``)()[-~-~!``]
_=$($$_$+$$+$_+$$$_+$$_$+$_$+____$+$_+$$$$$+$$$+$$$$)()
symbolicjs.1747030997.txt.gz · Last modified: 2025/05/12 02:23 by Yuki