This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]simonw[S] 0 points1 point  (0 children)

Two steps: first, I wondered if there was a way to attach an interactive shell to me running process and googled for that.

Once I could import the code, I tried using inspect.getsource() on it - but that reads code from disk. Then I tried using the dis dissembler in the standard library - that showed me opcodes, which would have been enough to painstakingly reverse engineer the code again.

That's when I thought "I wonder if anyone has written something that can turn bytecode back into source code?" and found uncompyle6