how is this "educational"? it's about as readable as hexadecimal machine code. What's the lesson?
JSFuck (2012)
11–20 of 168 posts
Re: JSFuck (2012)
#12Re: JSFuck (2012)
#13I don't understand how this works. I've seen brainfuck before, but not truly understood it. How is it possible to open up a new tab, paste the encoded form, and have working JavaScript?
Brainfuck is an unrelated, separate programming language.
Re: JSFuck (2012)
#14I don't understand how this works. I've seen brainfuck before, but not truly understood it. How is it possible to open up a new tab, paste the encoded form, and have working JavaScript?
With this I was able to get the letter 'a' by starting with their initial definition `(false+"")[1]`, then continually substituting
(false+'')[1]
(![]+'')[1]
(![]+([]+[]))[1]
(![]+([]+[]))[+!(+[])]
All of the above lines when evaluated result in 'a'.
Re: JSFuck (2012)
#15This is horrifying.
Re: JSFuck (2012)
#16I don't understand how this works. I've seen brainfuck before, but not truly understood it. How is it possible to open up a new tab, paste the encoded form, and have working JavaScript?
Re: JSFuck (2012)
#17https://enkhee-osiris.github.io/Decoder-JSFuck/
The same script also featured both of these equally-amusing obfuscations:
Re: JSFuck (2012)
#18wow this is exactly what I wanted!
Re: JSFuck (2012)
#19We wanted to obfuscate this bit of code, to make life just a little bit harder for reverse engineers. We made this huge function where we pretty much passed in all our application state, and it would run this JSFuck code, and spit out a token. We even made a few tweaks to the code so that you couldn't just reverse it back into JS with something like https://enkhee-osiris.github.io/Decoder-JSFuck/.
Performance was surprisingly alright, and it has never hit an environment where it couldn't execute. All in all, a fun few hours setting it up, and I haven't had to touch it since!