- Saved searches
- Use saved searches to filter your results more quickly
- code2319/decompilation-process-of-Python
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- Saved searches
- Use saved searches to filter your results more quickly
- ItsMerkz/Python-Exe-Decompiler
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- 11 Best Python Decompiler Tools for PYC, PYD, PYO, EXE Files
- decompyle3
- uncompyle6
- Decompyle++
- UnPYC
- Features
- Easy Python Decompiler
- Features
- decompile-py2exe
- Requirements
- Decompiler
- pydumpck
- Python exe Unpacker
- Python Decompiler Online
- PyC decompile
- Decompiler.com
- Related posts:
- Leave a Comment Cancel reply
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
code2319/decompilation-process-of-Python
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
0. Create venv and download dependencies
1. Convert exe file to pyc file
Using pyinstxtrator.py, enter the command in cmd (from venv): python pyinstxtractor.py xxx.exe
After successful decompression, a [XXX. Exe] extracted folder will appear in the same path, which contains the main program without any suffix. What we need to decompile is this file, and others are dependent libraries, such as pyz extracted folder. At this point, we may wonder why this file is not a. pyc file? This may be one of the shortcomings of the pyinstxtrator. The main program converted is not in the right format. We need to fix it manually.
If you directly change the suffix of the main file to main.pyc for decompilation, an error will occur.
The reason is that the file header magic number is not aligned, so you need to add magic number. Different python versions of magic number are different.
3. How to get magic number
Compile one by yourself to see how many pyinstaller is required for compiling py files, and modules can be installed with pip.
Hexadecimal view its magic number ( C:\Users\Maksim\desktop\1\__pycache__ )
Add magic number at the top.
Source:
Done, the source code is displayed in the terminal (a part of the source code is visible in the screenshot).
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Decompiles Exe’s That Were Compiled Using Pyinstaller
ItsMerkz/Python-Exe-Decompiler
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Python Modules Needed os, struct, marshal, zlib, sys Python Module Installation
pip install os pip install struct pip install marshal pip install zlib pip install sys
Windows Usage python decompile.py (file name)
Linux Usage python3 decompile.py (file name)
The Decompiler File Must Be In The Same Folder As The Exe Your Trying To Decompile Also Please Make Sure To Dm Me On Discord If You Have Any Problems Using This Haribo#1337
About
Decompiles Exe’s That Were Compiled Using Pyinstaller
11 Best Python Decompiler Tools for PYC, PYD, PYO, EXE Files
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.
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.
decompyle3
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
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++
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++.
UnPYC
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.
Features
- Can decompile Python bytecode versions 2.6, 2.7, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, using tools like uncompyle6.
- Can extract pyinstaller package using pyinstxtractor.
- Makes it easy to decompile pyc’s even without Python installed in the system.
- Helps in decompiling pyc’s of different versions.
- Works offline if dependencies and Python sources are satisfied, which can be done easily.
Easy Python Decompiler
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.
Features
- Decompiles python 1.0 – 3.4
- No python installation is needed.
- Unicode filename support.
- Nice GUI, no fiddling on a command line
- The new decompiler engine is blazing fast.
decompile-py2exe
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.
Requirements
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.
Decompiler
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
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.
Python exe Unpacker
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).
Python Decompiler Online
PyC decompile
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.
Decompiler.com
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.
Related posts:
- Modify/Update YAML Files Using Python 3 & ruamel.yaml
- Read, Parse & Write YAML Files Using Python 3 & pyyaml
- How to Upload Files & Images to OneDrive Using Python
- 20 Best EXE Decompilers 2023 (Ranked and Reviewed)
- 21 Website Session Recording Tools (Free, Open Source, Paid) 2023
- 7 Best Game Hacking Apps / Tools for Android 2023
- 35 Open Source Python Games Code Free Download 2023
- 22 Best Free WordPress Page Builder Plugins 2023
- 20 Open Source HTML5 And JavaScript Game Engines 2023
- 20 Best Free WordPress SEO Plugins 2023
- 20 Best Free WordPress News Magazine Themes 2023
- 12 Best PHP Code Beautifier and Formatter Online 2023
- 21 Best DLL Decompilers 2023 (Ranked and Reviewed)
- Join 1000+ SAP WhatsApp Group Links
- 1300+ iOS WhatsApp Group Links
- 1700+ Robotic Process Automation RPA WhatsApp Group Links
- 17+ Excel Learning WhatsApp Group Links
- 1800+ Apps WhatsApp Group Links
- 5000+ Java WhatsApp Group Links
- 999+ United Kingdom UK WhatsApp Group Links
Leave a Comment Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.