This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| symbolicjs [2025/05/12 17:20] – Yuki | symbolicjs [2025/05/12 21:22] (current) – Yuki | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== SymbolicJS: notes on JavaScipt | + | ====== SymbolicJS: notes on JavaScript |
| Inspired by JSFuck, but here's the rules: | Inspired by JSFuck, but here's the rules: | ||
| Line 61: | Line 61: | ||
| <code javascript> | <code javascript> | ||
| - | [, | + | [, |
| - | [$$$_$, | + | [$$$_$, |
| - | [,$$_$,$$$_]=!``+[], | + | [, |
| - | [__$]=-`!`+[], | + | [__$]=-`!`+[], |
| - | [,_$$,$_$,$$$_$,$$$,$_$,,, | + | [, |
| - | [$$$_,, | + | [$$$_,, |
| </ | </ | ||
| + | |||
| + | Of course, a few of those are not needed, can be removed if you don't need them, and those identifiers can always be shorter. We need at least enough to spell '' | ||
| + | |||
| + | <code javascript> | ||
| + | [, | ||
| + | [, | ||
| + | [, | ||
| + | [$$$_, | ||
| + | </ | ||
| + | |||
| + | < | ||
| ===== Execute arbitrary code ===== | ===== Execute arbitrary code ===== | ||
| Line 83: | Line 94: | ||
| ===== Build more letters ===== | ===== Build more letters ===== | ||
| - | We can then use `btoa` to get a lot of the letters we're missing: | + | We can then use `btoa` to get a lot of the letters we're missing, most notably '' |
| <code javascript> | <code javascript> | ||
| - | [K,C, | + | [K,i, |
| </ | </ | ||
| <code javascript> | <code javascript> | ||
| - | [,, | + | [,$$$, |
| </ | </ | ||
| + | |||
| + | < | ||
| + | It's useful to save ''" | ||
| + | </ | ||
| ===== Build the global object ===== | ===== Build the global object ===== | ||
| Line 100: | Line 115: | ||
| <code javascript> | <code javascript> | ||
| - | _=$($$_$+$$+$_+$$$_+$$_$+$_$+____$+$_+$$$$$+$$$+$$$$)() | + | _=$(_+$_+$$$$$+$$$+$$$$)() |
| </ | </ | ||
| Line 113: | Line 128: | ||
| </ | </ | ||
| - | ===== Final result | + | ===== console.log example |
| + | |||
| + | <code javascript> | ||
| + | [, | ||
| + | [, | ||
| + | [, | ||
| + | [$$$_, | ||
| + | $=(_=> | ||
| + | [, | ||
| + | $($$_$+$$+$_+$$$_+$$_$+$_$+____$+$_+$$$$$+$$$+$$$$)() // $(" | ||
| + | [$_$_$+$___+$_$+$$$$+$___+$$_$$+$$][$$_$$+$___+$__$]($$$$$+$$+$$_$$+$$_$$+$___) // console.log(" | ||
| + | </ | ||
| <code javascript> | <code javascript> | ||
| - | [, | + | [, |
| </ | </ | ||