Re:Leaping Brain's "Virtually Uncrackable" DRM is just an XO...
by daeken on Monday November 26, 2012 @11:34PM
(#4835646)
Yeah, the reconstruction isn't hard at all, but it's not a direct 1:1 mapping to the AST, since multiple control flow structures in the AST can become the same thing in bytecode. That said, it's quite simple to make it Good Enough (TM); the reason I wrote that and the RMarshal module was that I was writing a Python decompiler a part of a larger commercial project. I should release the decompiler at some point.
Compilation:
Interpretation: Control flow makes things slightly more complicated, but not for predictable code generation.Obfuscated bytecode which e.g. doesn't maintain consistent interpreter stack depths for every code path (illegal for JVM or .net CLR) would make things a little harder to analyze, but I doubt that's often the case in practice with Python.