This release is a pre-release and may not be stable for production use.
erek — Python Bindings for EREK
EREK (ECMAScript Reverse Engineering Kit) is a memory-safe, zero-recursion Rust framework for inspecting, lifting, analyzing, and decompiling precompiled mobile JavaScript / TypeScript / ArkTS bytecodes (.abc and .hbc) and application packages (.hap, .hsp, .app, .apk, .ipa).
Installation
pip install erek
Quick Start
import erek
# 1. Classify raw payload bytes by wire magic (never relies on file extensions)
info = erek.classify_payload(b"PANDA\x00\x00\x00\x11\x22\x33\x44\x0c\x00\x06\x00")
# -> {'kind': 'abc', 'version': '12.0.6.0'}
# 2. Inspect a .hap / .hsp / .app archive in memory (with IEEE CRC-32 & bomb limits)
with open("entry.hap", "rb") as f:
modules = erek.extract_abc_modules(f.read())
for mod in modules:
print(mod["container_path"], mod["entry_name"], len(mod["data"]))
# 3. Decode an ArkCompiler (.abc) method instruction stream
insns = erek.decode_abc_bytecode(bytes([0x64, 0x65])) # ldundefined; returnundefined
for insn in insns:
print(f"{insn['offset']:#06x}: {insn['text']}")
Links
- Repository: https://github.com/erek-rs/erek
- License: Apache-2.0
Metadata
Release files for erek 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| erek-0.1.0a1-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for erek-0.1.0a1-cp39-abi3-macosx_11_0_arm64.whl |
Release files / erek-0.1.0a1-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | erek-0.1.0a1-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 246.3 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c938e57d74d7ced033a28d6e1cc3bed8f68470307652b396769e3b0c6b78a751
|
|
BLAKE2b-256 checksum How to use checksums |
a7f85da6623bdd544ad5f0ac0d01c348b62a5327ef9d3e1fb75209c305276600
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.16.0
|
Security for erek 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.