A Qt Widgets desktop UI for exploring Python bytecode with pycdc / pycdas, inspecting native decompilation results, importing Pyarmor oneshot output, and retrying unsupported code objects with AI fallback.
The app supports both Windows and Linux desktop environments.
- Open
.pyc/.pyofiles directly - Drag a folder into the window and recursively discover supported bytecode files
- Import a Pyarmor-obfuscated project through the bundled oneshot workflow
- Show all discovered files together in the left tree
- Inspect code object trees for modules, classes, functions, lambdas, and comprehensions
- Compare:
MergedNativeAI
- View per-node metadata and disassembly
- Preview the exact prompt sent to the AI fallback model
- Retry the currently selected node with AI using a prominent action button or
Ctrl+R
- Left: code object tree
- Center: merged / native / AI source views
- Right: disassembly / metadata / prompt / log
The app does not send the whole .pyc by default.
It builds a prompt from the currently selected code object, including:
- qualified name
- object type
- names / varnames / consts previews
- native error
- disassembly
That keeps fallback reconstruction focused on the selected node instead of the whole file.
The app currently prefers local executables next to the application binary and will look for:
pycdc.exepycdcpycdas.exepycdas
in the same directory as the pycdc-studio application binary.
You can override them with environment variables:
PYCDC_STUDIO_PYCDCPYCDC_STUDIO_PYCDAS
The app can import Pyarmor-protected projects by delegating to
Lil-House/Pyarmor-Static-Unpack-1shot.
Current integration flow:
- Run
oneshot/shot.pyon a selected Pyarmor project directory - Let
pyarmor-1shotgenerate.1shot.dasand.1shot.cdc.py - Load those generated files back into the existing workspace UI
Release packages are expected to bundle the Pyarmor oneshot toolchain and the required Python package dependencies automatically.
For local development, the current code first looks for bundled files next to the application package, and also supports a local clone at:
external/Pyarmor-Static-Unpack-1shot/oneshot/shot.py
and expects pyarmor-1shot / pyarmor-1shot.exe to be available in the same
directory as shot.py.
You also need a Python environment that can run shot.py, including
pycryptodome.
If your layout is different, you can still override it with environment variables:
PYCDC_STUDIO_PYARMOR_PYTHONPYCDC_STUDIO_PYARMOR_SHOTPYCDC_STUDIO_PYARMOR_PYTHONPATHPYCDC_STUDIO_PYARMOR_OUTPUT_ROOT
Example:
git clone https://github.com/Lil-House/Pyarmor-Static-Unpack-1shot external/Pyarmor-Static-Unpack-1shot
cmake -S external/Pyarmor-Static-Unpack-1shot/pycdc -B external/Pyarmor-Static-Unpack-1shot/build
cmake --build external/Pyarmor-Static-Unpack-1shot/build --config Release
cmake --install external/Pyarmor-Static-Unpack-1shot/build --config Release
python -m pip install pycryptodome- Launch
pycdc-studio - Open
File -> Import Pyarmor Project... - Choose the root directory that contains the obfuscated scripts and
pyarmor_runtime - Wait for the generated
.1shot.*files to be imported into the workspace
Notes:
- The importer uses a temporary output directory unless
PYCDC_STUDIO_PYARMOR_OUTPUT_ROOTis set. - Disassembly is generally more reliable than decompiled source.
- Archives such as PyInstaller bundles still need to be unpacked before using this flow.
- Packaged builds are intended to work without manually configuring Pyarmor environment variables.
Before using AI fallback, open Settings and configure at least:
Base URLAPI KeyModel
The current client expects an OpenAI-compatible API endpoint.
The settings dialog stores provider configuration with QSettings and falls back to environment variables when a field is empty.
Supported environment variables:
PYCDC_STUDIO_AI_BASE_URLPYCDC_STUDIO_AI_API_KEYPYCDC_STUDIO_AI_MODELPYCDC_STUDIO_AI_SYSTEM_PROMPT
Requirements:
- Qt 6 Widgets
- Qt Network
- CMake
- C++17 compiler
Example:
cmake -S . -B build
cmake --build build- Launch
pycdc-studio - Open a
.pyc/.pyofile, or drag a folder into the window - Or open
File -> Import Pyarmor Project...for a Pyarmor-protected project - Open
Settingsfrom the top-level menu and configure your AI model if you want to use AI fallback - Select a file or code object in the tree
- Inspect native output, disassembly, metadata, and prompt context
- Use
Retry with AIon the selected node if native decompilation is incomplete or wrong
Longer test cases are included under test/:
workflow_orchestrator.pyasync_batch_runner.pyplugin_config_resolver.py- plus several smaller samples
The repository tracks the source samples only.
To generate local .pyc files for drag-and-drop testing:
python test/compile_test_samples.pyThat script writes the compiled bytecode into test/__pycache__/.
This project is still experimental.
The current Merged view is an honest mixed document:
- native source when available
- AI fallback patches appended per code object
It is not yet a full inline source merger.
This project integrates with pycdc / pycdas, whose upstream project is licensed under GPL-3.0.
pycdc: GPL-3.0- release packages that bundle
pycdc/pycdasshould include the GPL-3.0 notice - release packages also record the bundled upstream
pycdcrepository and commit inTHIRD_PARTY_NOTICES.txt
See the upstream project for full license details: