De-Obfuscation Report
De-Obfuscation Report
Introduction
This report provides a detailed guide on how to de-obfuscate Python code using the
[Dearmor](https://pypi.org/project/dearmor/) tool. Dearmor is a specialized utility designed to handle
code obfuscated using PyArmor encryption. The tool injects a DLL into the running process, executing
custom code to de-obfuscate the target Python script. This report includes information on the tool, its
description, how to use it, and the step-by-step process involved.
2. Place the obfuscated Python code file (e.g., `textcode.txt`) into this directory.
This command downloads and installs Dearmor, along with its necessary dependencies.
Step 3: Run Dearmor
1. Navigate to the directory where your obfuscated code file (`textcode.txt`) is located using the
command prompt or terminal.
dearmor -i textcode.txt
Dearmor injects a DLL into the running process, which executes custom code to de-obfuscate the
contents of `textcode.txt`.
1. After running Dearmor, it creates a folder named "dump" in the same directory where your
obfuscated code file is located.
2. Inside the "dump" folder, you will find one or more de-obfuscated Python code files. These files will
have names similar to the original obfuscated script but with de-obfuscated content.
3. You can review these de-obfuscated files using a text editor or a Python IDE to understand the original
code's functionality.
1. De-obfuscated files may have a ".pyc" extension, indicating that they are compiled Python files.
2. To work with the code in its human-readable ".py" format, you can use a tool like `docompyle++` to
convert them. Instructions for using `docompyle++` can be found in its documentation.
Conclusion
Dearmor is a powerful tool for de-obfuscating Python code obfuscated with PyArmor encryption. This
report has provided a comprehensive guide on how to use Dearmor, from installation to code de-
obfuscation. Keep in mind that the effectiveness of de-obfuscation may vary depending on the
complexity of the obfuscation techniques used in the original code. Always ensure you have proper
permissions to de-obfuscate code and respect intellectual property rights when dealing with proprietary
or copyrighted material.