When I first saw the final code, I thought it unfathomable that I could resolve it down to "Hello World!" at any point in my lifetime. The following 20min provided an education into logic, programming, and Python that rivals 200 page reference books with clear explanations and the ideal amount of build up for each step. Thanks Ben for the post!
I thought this was a great post, some amazing code, and humbling since this is WAY beyond my current - and future - ability.<p>Even more impressive - it looks like the author is a freshman in college! <a href="https://www.linkedin.com/in/benkurtovic" rel="nofollow">https://www.linkedin.com/in/benkurtovic</a><p>Nice work, Ben!
This is perhaps the clearest example on the value of implementation-oriented code comments. When you need them, they are superheroic. But... don't need them, please.
I barely know any Python and upon first glance I could easily get an idea of how it worked (without looking at the explanation): by computing the required strings out of funny-named variables with shifts and arithmetic. co_nlocals is obviously the only actual integer constant from which all the other values are coming from.<p>Only then did I read the explanation, and realised I wasn't far-off (the only thing I got wrong was the string computation, which I thought would be a string concatenation.) I think it says something about the language when even <i>obfuscated</i> code in it is rather readable! (Then again, I do RE where most of the code I'm reading is disassembled machine instructions, so maybe my perspective on what constitutes obfuscation is a bit skewed...)
the level of obfuscation is impressive. i wonder if similar obfuscation for javascript exists? The one from google doesn't seem to quite work right and end up breaking my script. The paid version from jscrambler seems to work but seems like a large waste of money to obfuscate one file.