r/SideProject • u/trustsigRobert • 1d ago
Built a JavaScript file that plays Tetris, but turns into Snake when you format it
https://trustsig.eu/blog/javascript-divergence/A formatter, minifier or deobfuscator can be made to turn one script into another.
You can go try out all 186 techniques with this script: https://divergence.trustsig.eu/
Or try the Tetris-Snake demo here: https://divergence-game.trustsig.eu/
Techical breakdown: https://trustsig.eu/blog/javascript-divergence/
11
Upvotes
1
u/Tarantino133 1d ago
the tetris that turns into snake after formatting is such a good demo. also slightly terrifying if you review the formatted version and trust it
2
u/QuanTradin 1d ago
so the formatter is the attack. that's a horrible thing to learn about a tool everyone runs on save, nicely done.