

renaming variables/functions/classes to gibberish names) to make this type of reverse engineering harder. Unity), and there are a lot of modders/hackers using decompilers to obtain usable source code for games written in these languages.Ī developer can choose to defend against a decompiler by using obfuscation, where they deliberately mangle the compiled output in some way (e.g. Java and C# are similarly easy to decompile. # okay decompiling _pycache_/Īside from some extra comments and spaces, the output is basically 1:1 with the original.

# Embedded file name: /private/tmp/test.py

Original source: class M圜lass:Ĭompiled with Python 3.6, and decompiled again using uncompyle6: # uncompyle6 version 3.3.5 Decompilers exist that will restore shockingly accurate source code from the compiled code. In each of these examples, the bytecode contains direct representations of high-level concepts in the language such as classes, methods, virtual function calls, class layouts, etc. Let's start with the easy cases - a high-level language compiled to its own bytecode. How much is lost will depend on the source language, target language and choices made by developers. You can't recover original source code - the process of compilation is inherently lossy and some detail will inevitably be lost.
