seeWxapkg
Discovered★ 127A Minimalist and Practical WeChat Mini Program Decompilation Web Tool
See Wxapkg
开源、自托管的微信小程序 .wxapkg 反编译工具
上传文件,自动解密、解包、反编译和整理代码,完成后直接下载 src/ 工程
See Wxapkg lets you decompile .wxapkg files directly in the browser. It automatically detects the package type, uses the AppID for decryption when needed, and completes unpacking, decompilation, formatting, and result validation.
[!IMPORTANT] "Decompilation" means best-effort static recovery of compiled output, not source extraction. Results may lack variable names, comments, structure, or runtime content; "result generated" ≠ identical to or runnable from the original.
Key Features
- Supports standard packages, encrypted packages, and common WeChat 4.x structures; encrypted packages require a matching AppID.
- Static decompilation without executing in-package JavaScript via
eval,Function, or a VM. - Automatically decompiles and organizes JSON, JavaScript, WXML, and WXSS; content that cannot be confirmed is explicitly flagged.
- Provides real-time progress, result status, static quality score, inspection hints, and a technical report.
- The downloaded ZIP contains only
src/; raw unpacking artifacts are not mixed into the deliverable files. - Supports online use and standalone Docker Compose self-hosting, with no dependency on external databases, caches, or message queues.
Quick Start
Online
Open seewxapkg.keepbuild.cn and select or drag in a .wxapkg file. Code formatting and deep decompilation are enabled by default; encrypted packages also require the corresponding AppID.
The public demo stores uploads temporarily; originals are deleted on normal completion, and stranded data is cleaned per a 72h max policy. Do not upload sensitive or unauthorized packages; self-host in a controlled environment.
Docker Compose (Recommended)
All you need is Docker Engine and Docker Compose:
git clone https://github.com/Leslie-SSS/seeWxapkg.git
cd seeWxapkg
docker compose up -d --build
Once started:
- Web interface: http://localhost:3004
- Health check: http://localhost:9090/api/health
- API base URL:
http://localhost:9090/api
Default Compose uses a local-file task repo, file queue, and a dedicated Worker; task data lives only in the configured local volume. This is a single-node setup with no database, cache, or message queue. To stop:
docker compose down
Named volumes retain task state and files; ordinary unfinished tasks in the file queue resume on next startup. Auto-cleanup is paused while the service is down. To avoid storing credentials long-term, the AppID is destroyed after one decryption attempt, so encrypted tasks must be resubmitted if the process is interrupted afterward. To delete all uploads, task records, and artifacts immediately, verify you no longer need them and run docker compose down -v.
Usage
- Select a
.wxapkgfile; for encrypted packages, enter the 18-character AppID (wx+ 16 lowercase hexadecimal characters). - Click "Start decompilation" and wait for the system to process automatically.
- Review the result hints and download the decompilation output, which contains only
src/.
在哪里查找 wxapkg 文件?
Directories vary by WeChat version; below are common reference paths:
- macOS:
~/Library/Containers/com.tencent.xinWeChat/Data/Documents/app_data/radium/users/{一串值}/applet/packages - Windows:
C:\Users\{用户名}\Documents\WeChat Files\Applet\{AppID}
Decompilation Output
The download is a clean project for reading and analysis:
wxapkg-result.zip
└── src/
├── app.json
├── app.js
├── app.wxss
└── ...
The reports/ technical report is available via the results page or task API and is not included in the downloaded ZIP. Fallback temp copies created during processing are deleted right after merging; duplicate source files are not kept long-term.
| Result status | Meaning | Recommendation |
|---|---|---|
Decompilation result generated (completed) | Core results exist and static checks passed | You may continue analysis, but this does not mean the output matches the original source code |
Result generated, some content needs review (partial) | Downloadable result generated, but some content could not be fully confirmed | Read the inspection hints and report first |
Decompilation incomplete (failed) | Core steps could not be completed safely | Check the AppID, file integrity, and error hints |
The score reflects structural completeness and static parseability, not original source fidelity or runtime correctness.
Scope & Limitations
| Package type or structure | Current support |
|---|---|
| Standard package | Identification, unpacking, and static decompilation are supported |
| Encrypted package | Supported, but an AppID matching the target package must be provided |
| WeChat 4.x aggregated structure | Common structures are supported; coverage of all client versions and compilation forms is not guaranteed |
| Independent subpackage | Can be identified; when the main package runtime is missing, unreliable processing is skipped and the result is marked as partial |
| Mini-game package | Only classification identification is currently supported; full decompilation is not guaranteed |
Decompilation cannot regenerate compile-time lost comments, variable names, directories, or configs, nor statically resolve all dynamic, runtime-injected, or obfuscated content. Output is not guaranteed to recompile or run; fallbacks and inferences retain provenance and are not presented as original source.
Privacy & Deployment
- No external database, cache, or message queue is used; task state, queues, and artifacts are stored only in the configured local directory or Docker volume.
- Homepage star count is queried server-side from a fixed GitHub repository API and briefly cached; the browser never contacts GitHub directly, and no visitor IP, task info, or upload content is forwarded to GitHub. The decompilation Worker retains no outbound network access.
- To allow the standalone Worker to decrypt, the AppID is briefly written to a one-time credential file with
0600permissions; it never enters task state, queues, or reports. It is deleted immediately after one decryption attempt or task failure. If the process exits before deletion, the credential is cleaned up with the task directory per the retention policy; if the task is interrupted after deletion, encrypted packages must be resubmitted. Original filenames and file sizes are also not written to task records; upgrades automatically clean up legacy sensitive fields in old task state. - Task directories use
0700permissions; task state, queue files, and artifacts use0600. Production Workers have external networking disabled by default. - Application request logs do not record client IPs, query parameters, or real task IDs; production gateways have access logs disabled by default. The small number of severe infrastructure error logs should still be treated as sensitive data. Task IDs should be treated as temporary access credentials and must not be shared publicly.
- Unpacking and packaging check for path traversal, absolute paths, duplicate ZIP entries, and symlinks.
- Node helper processes have execution timeouts, output limits, and V8 old-space limits; strict memory isolation should rely on container resource limits.
- The API has no built-in user authentication or per-user task scoping. Public deployments must add TLS, authentication, and rate limiting at the front gateway, and isolate the Worker network.
- Normal terminal states immediately delete original uploads, AppID, fallback workspaces, and raw duplicate copies; abnormal stranded data, task records, recovered source, reports, failed queue records, and ZIPs are cleaned up per the
RETAIN_ARTIFACTS_HOURScycle. The code default is 24 hours; the public demo site currently uses 72 hours.
Dev & Deploy
本地开发
Node.js 24 and Go 1.26 are recommended; the minimum version declared in the Go module is 1.25. The following commands work with Bash:
npm ci --prefix backend/internal/beautify
npm ci --prefix backend/internal/beautify/wxappUnpacker
mkdir -p /tmp/seewxapkg-tasks /tmp/seewxapkg-output
cd backend
TEMP_DIR=/tmp/seewxapkg-tasks \
OUTPUT_DIR=/tmp/seewxapkg-output \
go run ./cmd/server
New terminal:
cd frontend
npm ci
npm run dev
The frontend is at http://localhost:5180 and proxies /api to the backend on port 9090. Running the services directly defaults to memory + inmem, which is only suitable for short development sessions — task state and queue are lost on restart. For persistent runs, use Compose with file + file.
deploy/production/ provides a reference single-machine production deployment, but does not include authentication. Before using it on the public internet, you must replace the image, domain, and certificate, and integrate authentication at the gateway.
API endpoints
查看 HTTP API
New task:
curl -fsS -X POST http://localhost:9090/api/compile \
-F 'file=@/path/to/__APP__.wxapkg' \
-F 'beautify=true' \
-F 'decompile=true'
Do not write the real AppID of an encrypted package directly into the command line or shell history; use the privacy-safe acceptance script described below, which masks the input and submits it through a temporary config with 0600 permissions. When calling the API directly, any beautify and decompile options that are not provided default to false.
| Method | Path | Purpose |
|---|---|---|
GET | /api/health | Health status, version and capabilities |
POST | /api/compile | Upload file and create task |
GET | /api/events?taskId=<id> | SSE real-time progress |
GET | /api/tasks/:taskId | Authoritative task status, stage and scores |
GET | /api/tasks/:taskId/report | Comprehensive or named technical report |
GET | /api/tasks/:taskId/diagnostics | Redacted diagnostics |
GET | /api/tasks/:taskId/artifacts | Artifact list and provenance |
GET / HEAD | /api/download/:taskId | Download ZIP or check readiness |
The status in the GET /api/tasks/:taskId response is the single authoritative terminal state. Named reports include package-profile, the various *-recovery-report files, format-report and zip-manifest; the actual set returned depends on the request options and task progress.
Settings
查看常用环境变量
The table below shows the defaults when the Go service is run directly; Compose overrides some of the settings according to the API and Worker roles.
| Variable | Default | Purpose |
|---|---|---|
SERVER_PORT | 9090 | API listen port |
MAX_UPLOAD_SIZE | 52428800 | Maximum upload size (50 MiB) |
TEMP_DIR / OUTPUT_DIR | /tmp/seewxapkg / /output | Working directory and ZIP output directory |
TASK_REPO_DRIVER | memory | memory or file |
QUEUE_DRIVER | inmem | inmem or file |
BEAUTIFY_ENABLED | true | Whether to format code |
DEOBFUSCATE_ENABLED | false | Whether to enable heuristic readability transforms |
NATIVE_RECOVER_ENABLED / FALLBACK_RECOVER_ENABLED | true / true | Switches for the two decompilation paths |
VERIFICATION_ENABLED / REPORT_ENABLED | true / true | Verification and report switches |
NODE_EXEC_TIMEOUT_SECONDS / NODE_EXEC_MEMORY_MB | 60 / 512 | Node timeout and V8 old-space limit |
MAX_CONCURRENT_TASKS | 4 | Worker concurrency |
RETAIN_ARTIFACTS_HOURS | 24 | Artifact retention period; 0 disables automatic cleanup |
See backend/internal/config/config.go for the full validation rules.
Testing
运行质量门禁
npm ci --prefix backend/internal/beautify
npm ci --prefix backend/internal/beautify/wxappUnpacker
npm test --prefix backend/internal/beautify
cd backend
go test -race ./...
go vet ./...
go run golang.org/x/vuln/cmd/govulncheck@v1.6.0 ./...
The frontend runs npm ci && npm test && npm run build && npm audit under frontend/. CI also builds the image, runs the Compose health checks and validates the production configuration; real .wxapkg files are not included in public CI.
Authorized samples:
WXAPKG_PATH='/absolute/path/to/__APP__.wxapkg'
./scripts/manual_validate.sh "$WXAPKG_PATH" http://127.0.0.1:9090 completed
The script securely prompts for AppID (blank for plain packages), uses a 0700 temp dir removed on exit. The last arg may be partial; when omitted, neither state is restricted, but all quality gates must pass and failed always fails acceptance.
Docs & help
- Architecture & Design Constraints
- Task State Machine
- Test Fixture Specification
- Decompilation Report Specification
- Third-Party Components & Licenses
Contributing
Issues and Pull Requests are both welcome. For larger feature changes, please submit a Feature Request first; for bugs, use the Bug Report template and include a minimal reproduction along with redacted logs. Do not submit real packages you have no right to distribute; changes to decompilation logic and third-party code must include tests, provenance and license information.
Star Growth Trend
The trend chart is updated by repository automation via the GitHub API and stores only per-UTC-date aggregated counts, never Stargazer usernames.
License
The project's own code is released under the MIT License. The compatibility fallback in backend/internal/beautify/wxappUnpacker/ is derived from wxappUnpacker and is released under GPL-3.0-or-later; its source, modifications and license are provided together with the repository. Please read THIRD_PARTY_NOTICES.md and the license files in that directory before redistributing or modifying.
Disclaimer
For authorized packages only: learning, research, compatibility and debugging. Users confirm their rights and comply with laws, platform rules and licenses. Provided "AS IS" without warranty.
Comments
Loading…
Similar plugins
by zhxnix
Portable DSH plugin for native WeChat Mini Program discovery, local preview, debugging, source mapping, and sidebar inspection.
★ 0
MIT
JavaScript
Sep 22, 2026
dsh plugin --profile web add dsh-wx-previewby wangx-wx
dsh-channel-wechat
★ 5
↓ 1.6k/wk
MIT
TypeScript
Oct 23, 2026
dsh plugin --profile web add dsh-channel-wechatby sxylvlv
微信通道插件 for DSH:把微信消息接成 DSH 会话(文本/图片/文件/语音/视频双向,出站可推文档)
★ 0
JavaScript
Sep 14, 2026
dsh plugin --profile web add dsh-weixin-channelby FuncWei
WeChat Official Account content studio: anti-homogenization rotation writing, low-creativity remediation playbook, blessing-image visual baseline, gpt-image pipeline with OCR acceptance, and the measu
★ 3
MIT
Python
Aug 16, 2026
dsh plugin --profile web add dsh-wechat-mp-studioby GeekRicardo
DeepSeek Harness web 插件:把工具调用(含 MCP)、流式工具行与 thinking 行渲染成紧凑时间线
★ 1
MIT
JavaScript
Oct 14, 2026
dsh plugin --profile web add dsh-better-tool-uiby VincentJiang06
WeChat Mini Program automated testing for DeepSeek Harness (dsh) — selector-addressed actions, build-freshness gates, geometry-first assertions for text-only models, real screenshots on vision routes
★ 0
MIT
JavaScript
Aug 16, 2026
dsh plugin --profile web add dsh-mp-automator