ptn1411/skill/pyinstaller-unpacker
Claude Code and agent skill by ptn1411/skill
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Fully automated PyInstaller extraction and decompilation pipeline. Extracts .pyc from onefile/onedir bundles, fixes headers, and batch-decompiles with pycdc/uncompyle6/decompile3 fallback chain.
Install
npx vskill@latest install ptn1411/skill/pyinstaller-unpackerSKILL.md
PyInstaller Unpacker & Decompiler
Extract and decompile Python source from PyInstaller-bundled executables (.exe/.elf).
Language rule: All skill instructions use English.Final summary presented to the user must be in Vietnamese.
0. Authorization & Routing
Operates under MASTER_POLICY.md §1-§2.
| Sibling skill | When | |
|---|---|---|
| binary-identifier | Upstream — confirms target is PyInstaller | |
| nuitka-decryptor | If misidentified — Nuitka ≠ PyInstaller | |
| writerpro-pentest | Downstream — keygen from recovered source | |
| javascript-deobfuscator | If embedded Electron+PyInstaller hybrid |
How PyInstaller Works
Two modes:
- Onefile: Single .exe with temp extraction at runtime. Everything in CArchive.
- Onedir: Directory with main .exe +
_internal/folder containing .pyc/.pyd/.dll.
Key challenge: PyInstaller strips .pyc headers (first 16 bytes: magic + flags + timestamp + size). Must restore before decompilation.
Step 1 — Recon: Confirm PyInstaller
Look for these markers:
MEImagic at end of file (8 bytes)- Strings:
_MEIPASS,_MEI,pyi_rth_,pyiboot - Section names or overlay data past PE end
Step 2 — Extract .pyc Files
What it does:
- Detect PyInstaller variant (onefile/onedir) and Python version
- If
pyinstxtractor-ngavailable → use it (best compatibility) - Fallback → manual CArchive parsing (built-in, no deps)
- Fix .pyc headers with correct magic number for detected Python version
- Extract PYZ archive (all imported modules)
- Write
manifest.jsonlisting all extracted files
Step 3 — Decompile .pyc to .py
Fallback chain (version-aware):
| Python version | Primary | Secondary | Last resort | |
|---|---|---|---|---|
| 3.9+ | pycdc | decompile3 | dis (bytecode) | |
| 3.6–3.8 | uncompyle6 | pycdc | dis | |
| 3.5 and below | uncompyle6 | — | dis |
Step 4 — Verify & Analyze
Workflow
Final Report to User (always in Vietnamese)
Anti-Patterns
| ❌ Don't | ✅ Do | |
|---|---|---|
| Assume all Python exes are PyInstaller | Run binary-identifier first — could be Nuitka, cx_Freeze, py2exe | |
| Skip .pyc header fix | PyInstaller strips headers — decompilers fail without them | |
| Use only one decompiler | Version-aware fallback chain catches more files | |
| Ignore PYZ archive | It contains all imported modules — often more interesting than main script | |
| Decompile without knowing Python version | Magic bytes differ per version — wrong header = wrong output |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpyinstaller-unpacker/SKILL.md
Popularity
- Repository stars
- 150
- Repository forks
- 90
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ptn1411/skill/pyinstaller-unpacker)