JSFuck is an esoteric and educational programming style based on the atomic parts of JavaScript. It uses only six different characters to write and execute code. It does not depend on a browser, so you can even run it on Node.js.
Questions tagged [jsfuck]
11 questions
28
votes
3 answers
How to decode a JSFuck script?
I have this code in JavaScript:
[(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+
(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+
(!![]+[])[+!+[]]]
In the console, it will return
Array [ "filter" ]
And how can I decode a lot of text that’s…

Szymon Marczak
- 1,055
- 1
- 16
- 31
9
votes
6 answers
Alternative way to get "C" letter in jsfuck
Currently jsfuck use following code to get "C" character
console.log(
Function("return escape")()(("")["italics"]())[2],
)
console.log( // after expansion
[]["flat"]["constructor"]("return…

Kamil Kiełczewski
- 85,173
- 29
- 368
- 345
4
votes
1 answer
Access to RegExp using JSFuck convention
I want to replace some characters in string e.g.
console.log(
"truefalse".replace("e","E")
)
but using jsfuck convenction where only 6 chars are allowed: []()!+, here for increase readability also JS strings with letters a-z and A-Z and…

Kamil Kiełczewski
- 85,173
- 29
- 368
- 345
3
votes
1 answer
How to explain such esoteric JS code
This code is equal to alert(1), but how does it work ? I don't see eval…

Vololodymyr
- 1,996
- 5
- 26
- 45
2
votes
2 answers
It is possible to call function with 2 params or more using JSFuck convention?
Suppose I have some string and I want to use function "replace" (ignore console.log and white chars in your head)
console.log(
"truefalse"["replace"]("true")
)
And I want to reduce used characters of this code using jsfuck (more info here)…

Kamil Kiełczewski
- 85,173
- 29
- 368
- 345
1
vote
2 answers
Pass function with one argument to array.map using jsfuck
I want to convert following code (ignore console.log) to jsfuck convention where only characters []()!+ are allowed (but here for clarity also numbers and strings with a-Z and 0-9 chars are allowed (wrapped by double quotes) - because conversion…

Kamil Kiełczewski
- 85,173
- 29
- 368
- 345
1
vote
1 answer
JSFuck: call sequence of functions with 2 (or more) parameters without nesting
This is continuation of this question with more difficult case. Suppose I want to call string function with 2 parameters e.g.
console.log(
"truefalse".replace("true",1)
)
In first step I reduce characters set to jsfuck convention where we have…

Kamil Kiełczewski
- 85,173
- 29
- 368
- 345
0
votes
2 answers
Does eval() behave differently on Node.js and chrome?
On NodeJS (12.10.0) I get an error if I try to eval some JSFuck:
const test =…

iflp
- 1,742
- 17
- 25
-1
votes
3 answers
Call methods in flow way for arrays using jsfuck convention
This is continuation of this question but for ARRAYS. Suppose I want to call array function with 2 parameters e.g.
console.log(
[3,4,5].slice(1,2)
)
In first step I reduce characters set to jsfuck convention where we have 6 available…

Kamil Kiełczewski
- 85,173
- 29
- 368
- 345
-1
votes
1 answer
Where does the strange behaviour of the + operator come from?
While stumbling upon JSFuck (an esoteric language that uses only 6 characters []()+! and is perfectly valid javascript code) i saw that in Javascript adding together 2 arrays [] + [] returns an empty string ''.
Also in general adding an array…

Philogy
- 283
- 1
- 12
-1
votes
1 answer
Using jint to decode Jsfuck
I'm trying to use jint to decode jsfuck, and am basing myself off this project: https://github.com/enkhee-Osiris/Decoder-JSFuck (it's the only one I've found that can decode the jsfuck correctly). The following c# isn't working…

user2950509
- 1,018
- 2
- 14
- 37