In this article, I have organized an ultimate list of the best Python decompiler projects that are available for reverse engineers. These tools will allow you to extract source code from compiled Python files like .pyc, .pyo, and .pyd.
Decompiling Python bytecode is helpful if you want to understand how the software works without having access to the original source code.
These tools are well-equipped for tasks like:
The below list contains free, paid, open-source, and online Python decompilers.
Let’s have a look at the features, pros/cons, and usage details of the below given Python decompilers and then select the best Python decompiler that can fulfill your specific requirements.
Python decompiler for version 3.7, 3.8, and up. It is stripped down from uncompyle6 so we can refactor and start to fix up some long-standing problems.
For example, uncompyle6 is awesome, but it has a fundamental problem in the way it handles control flow. In the early days of Python when there was little optimization and code was generated in a very template-oriented way, figuring out control flow structures could be done by simply looking at code patterns.
Over the years more code optimization, specifically around handling jumps has made it harder to support detecting control flow strictly from code patterns. This was noticed as far back as Python 2.4 (2004) but since this is a difficult problem, so far it hasn’t been tackled in a satisfactory way.
decompyle3 is introduced to fix this issue.
uncompyle6 translates Python bytecode back into equivalent Python source code. It accepts bytecodes from Python version 1.0 to version 3.8, spanning over 24 years of Python releases.
It is a native Python cross-version decompiler and fragment decompiler. It is the successor to popular decompilation tools decompyle, uncompyle, and uncompyle2.
Decompyle++ aims to translate compiled Python byte-code back into valid and human-readable Python source code. While other projects have achieved this with varied success, Decompyle++ is unique in that it seeks to support byte code from any version of Python.
Decompyle++ is a Python Byte-code Disassembler/Decompiler. It’s because Decompyle++ includes both a byte-code disassembler (pycdas) and a decompiler (pycdc).
As the name implies, Decompyle++ is written in C++.
This is a GUI tool for decompiling Python bytecode files like .pyc and .pyo back to .py using existing tools.
It’s also bundled with a modified pyinstxtractor for making it easy to extract pyinstaller packaged executables.
UnPYC is specifically designed as a pyc decompiler for Windows only.
Easy Python Decompiler is Python bytecode decompiler. It can decompile pyc & pyo files to python source code.
It supports Python versions from 1.0 to 3.4. No python installation is necessary for decompiling!
This project makes use of two popular decompilers which are Decompyle++ and Uncompyle2.
By using Easy Python Decompiler, you can decompile a single file or a whole directory.
Also, it supports Unicode filenames.
decompile-py2exe takes an executable (.exe file) as argument, extracts the Python bytecode and decompiles it with uncompyle6, all in one step. The executable can also be passed via stdin or inside a (password protected) ZIP file. Be sure to use Python 3 to run decompile-py2exe.
If you want to decompile an exe file that is based on older versions of Python then you can use unpy2exe to extract the Python bytecode as a pyc file, which can then be decompiled with uncompyle6.
It is a Visual Studio Code extension that makes use of several decompilers for different programming languages. In our case, it can decompile .pyc and .pyo files to reveal their Python source code.
Just right-click → Decompile on a supported executable and wait for the magic to happen.
The decompilation result is added to a temporary sub-workspace. You can right-click → Download files to your local file-system right from the sub-workspace.
pydumpck is a multi-threads tool for decompiling exe, elf, pyz, and pyc files that are created using Python. It is based on pycdc and uncompyle6 packages. Sometimes its .py file result is not exactly right.
A script that helps researcher to unpack and decompile executable written in python. However, right now this only supports executable created with py2exe and pyinstaller.
This script glues together several tools available to the community. Hopefully, this can help people in their daily job. Several YARA rules are available to determine if the executable is written in python (This script also confirms if the executable is created with either py2exe or pyinstaller).
It is a website where you can upload your .pyc file and after processing, it will display the decompiled Python code on the screen.
It is no doubt the best pyc decompiler online.
This website provides an all in one decompiler solution for different programming languages and compiled files. In our case, you can upload your .pyc or .pyo files and decompile them back to Python source code.
We evaluated the performance of Llama 3.1 vs GPT-4 models on over 150 benchmark datasets…
The manufacturing industry is undergoing a significant transformation with the advent of Industrial IoT Solutions.…
If you're reading this, you must have heard the buzz about ChatGPT and its incredible…
How to Use ChatGPT in Cybersecurity If you're a cybersecurity geek, you've probably heard about…
Introduction In the dynamic world of cryptocurrencies, staying informed about the latest market trends is…
The Events Calendar Widgets for Elementor has become easiest solution for managing events on WordPress…