r/programming • u/trustsigRobert • 9h ago
Same JavaScript file plays Tetris in the browser and Snake after formatting
trustsig.euA formatter, minifier or deobfuscator can be made to turn one script into another.
Edit: this does NOT use source code checking for detection. Each technique only works for the tool it was meant for. You can go try out all 186 techniques with this script: https://divergence.trustsig.eu/
Welp, I've gotten over 50 downvotes because of one comment. You can have a read through the above given script (or let an AI read it) and quickly conclude that it has nothing to do with checking or comparing the source code. Also, running it through prettier or any other processor will produce a different log statement.