3 ms·
How in the world did they come up with the obfuscated code for this? Surely they must be using a tool?
by zendist 2y ago
How in the world did they come up with the obfuscated code for this? Surely they must be using a tool?
- deleted 2y ago[deleted]
- bruce511 2y agono, it was a thing back in the 90's (and likely earlier.) The goal was to write a program that was "impossible to read". Some of the winners are seriously creative. And it's very much just smat kids and their machines... I remember one back in the day which wasn't obfuscated at all. It was clearly a simple utility. Except that it didn't do what you thought it did, it did something completely different. (alas I can't remember the details...)
- thih9 2y ago> I remember one back in the day which wasn't obfuscated at all. Perhaps it was the Underhanded C Contest[1][2]? It's another competition, entires there often seem simple and perform something unexpected. [1]: https://en.wikipedia.org/wiki/Underhanded_C_Contest https://en.wikipedia.org/wiki/Underhanded_C_Contest [2]: https://www.underhanded-c.org https://www.underhanded-c.org
- thamer 2y agoThere are a number of blog posts online and StackOverflow questions explaining IOCCC entries, and they generally seem to be built/obfuscated by hand. It's an art and it's far from trivial, which is one of the reasons why the contest exists :) For an example, see this StackOverflow question and its detailed answers for an overview of what obfuscation techniques can be used, although many more exist of course: https://stackoverflow.com/questions/15393441/obfuscated-c-code-contest-2006-please-explain-sykes2-c https://stackoverflow.com/questions/15393441/obfuscated-c-co... I was able to compile it on macOS, but had to include an extra flag to stop clang from being too strict (version 16): cc -Wno-implicit-function-declaration -std=c89 -o test test.c ./test