dexsect 4.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. dexsect-4.1.0/LICENSE +21 -0
  2. dexsect-4.1.0/PKG-INFO +532 -0
  3. dexsect-4.1.0/README.md +498 -0
  4. dexsect-4.1.0/pyproject.toml +63 -0
  5. dexsect-4.1.0/setup.cfg +4 -0
  6. dexsect-4.1.0/src/dexsect/__init__.py +4 -0
  7. dexsect-4.1.0/src/dexsect/__main__.py +5 -0
  8. dexsect-4.1.0/src/dexsect/catalog/EXTRACTION_CATALOG.json +4057 -0
  9. dexsect-4.1.0/src/dexsect/catalog/__init__.py +0 -0
  10. dexsect-4.1.0/src/dexsect/cli.py +1272 -0
  11. dexsect-4.1.0/src/dexsect/core/__init__.py +0 -0
  12. dexsect-4.1.0/src/dexsect/core/config.py +177 -0
  13. dexsect-4.1.0/src/dexsect/core/context.py +181 -0
  14. dexsect-4.1.0/src/dexsect/core/i18n.py +40 -0
  15. dexsect-4.1.0/src/dexsect/core/pipeline.py +153 -0
  16. dexsect-4.1.0/src/dexsect/core/platform_utils.py +164 -0
  17. dexsect-4.1.0/src/dexsect/core/runner.py +124 -0
  18. dexsect-4.1.0/src/dexsect/core/theme.py +64 -0
  19. dexsect-4.1.0/src/dexsect/core/ui.py +405 -0
  20. dexsect-4.1.0/src/dexsect/core/utils.py +150 -0
  21. dexsect-4.1.0/src/dexsect/inspectors/__init__.py +0 -0
  22. dexsect-4.1.0/src/dexsect/inspectors/assets_db_inspector.py +235 -0
  23. dexsect-4.1.0/src/dexsect/inspectors/base.py +46 -0
  24. dexsect-4.1.0/src/dexsect/inspectors/bundle_inspector.py +55 -0
  25. dexsect-4.1.0/src/dexsect/inspectors/code_inspector.py +341 -0
  26. dexsect-4.1.0/src/dexsect/inspectors/custom_rules_inspector.py +178 -0
  27. dexsect-4.1.0/src/dexsect/inspectors/dex_inspector.py +144 -0
  28. dexsect-4.1.0/src/dexsect/inspectors/manifest_inspector.py +503 -0
  29. dexsect-4.1.0/src/dexsect/inspectors/native_fw_inspector.py +167 -0
  30. dexsect-4.1.0/src/dexsect/inspectors/resources_inspector.py +195 -0
  31. dexsect-4.1.0/src/dexsect/inspectors/scanner_inspector.py +153 -0
  32. dexsect-4.1.0/src/dexsect/inspectors/signing_inspector.py +423 -0
  33. dexsect-4.1.0/src/dexsect/inspectors/text_scanner.py +336 -0
  34. dexsect-4.1.0/src/dexsect/locales/__init__.py +0 -0
  35. dexsect-4.1.0/src/dexsect/locales/ar.json +130 -0
  36. dexsect-4.1.0/src/dexsect/locales/de.json +51 -0
  37. dexsect-4.1.0/src/dexsect/locales/en.json +110 -0
  38. dexsect-4.1.0/src/dexsect/locales/es.json +51 -0
  39. dexsect-4.1.0/src/dexsect/locales/fr.json +51 -0
  40. dexsect-4.1.0/src/dexsect/locales/ja.json +51 -0
  41. dexsect-4.1.0/src/dexsect/locales/pt.json +51 -0
  42. dexsect-4.1.0/src/dexsect/locales/ru.json +51 -0
  43. dexsect-4.1.0/src/dexsect/locales/tr.json +51 -0
  44. dexsect-4.1.0/src/dexsect/locales/zh.json +51 -0
  45. dexsect-4.1.0/src/dexsect/parsers/__init__.py +0 -0
  46. dexsect-4.1.0/src/dexsect/parsers/axml.py +264 -0
  47. dexsect-4.1.0/src/dexsect/parsers/bundle.py +214 -0
  48. dexsect-4.1.0/src/dexsect/parsers/elf.py +396 -0
  49. dexsect-4.1.0/src/dexsect/phases/__init__.py +0 -0
  50. dexsect-4.1.0/src/dexsect/phases/base.py +102 -0
  51. dexsect-4.1.0/src/dexsect/phases/decode.py +507 -0
  52. dexsect-4.1.0/src/dexsect/phases/decompile.py +408 -0
  53. dexsect-4.1.0/src/dexsect/phases/fingerprint.py +341 -0
  54. dexsect-4.1.0/src/dexsect/phases/frameworks.py +377 -0
  55. dexsect-4.1.0/src/dexsect/phases/mapper.py +41 -0
  56. dexsect-4.1.0/src/dexsect/phases/native.py +188 -0
  57. dexsect-4.1.0/src/dexsect/plugins/__init__.py +0 -0
  58. dexsect-4.1.0/src/dexsect/plugins/base.py +20 -0
  59. dexsect-4.1.0/src/dexsect/plugins/diff.py +162 -0
  60. dexsect-4.1.0/src/dexsect/plugins/inspect.py +172 -0
  61. dexsect-4.1.0/src/dexsect/plugins/report.py +80 -0
  62. dexsect-4.1.0/src/dexsect/plugins/trace.py +141 -0
  63. dexsect-4.1.0/src/dexsect/reporting/__init__.py +0 -0
  64. dexsect-4.1.0/src/dexsect/reporting/analysis_report.py +1190 -0
  65. dexsect-4.1.0/src/dexsect/reporting/diff_report.py +144 -0
  66. dexsect-4.1.0/src/dexsect/reporting/sarif_report.py +109 -0
  67. dexsect-4.1.0/src/dexsect/reporting/unpack_map.py +149 -0
  68. dexsect-4.1.0/src/dexsect/rules/__init__.py +0 -0
  69. dexsect-4.1.0/src/dexsect/rules/anti_analysis.json +45 -0
  70. dexsect-4.1.0/src/dexsect/rules/crypto_audit.json +41 -0
  71. dexsect-4.1.0/src/dexsect/rules/secrets_extended.json +46 -0
  72. dexsect-4.1.0/src/dexsect/storage/__init__.py +0 -0
  73. dexsect-4.1.0/src/dexsect/storage/findings_db.py +460 -0
  74. dexsect-4.1.0/src/dexsect.egg-info/PKG-INFO +532 -0
  75. dexsect-4.1.0/src/dexsect.egg-info/SOURCES.txt +86 -0
  76. dexsect-4.1.0/src/dexsect.egg-info/dependency_links.txt +1 -0
  77. dexsect-4.1.0/src/dexsect.egg-info/entry_points.txt +2 -0
  78. dexsect-4.1.0/src/dexsect.egg-info/requires.txt +8 -0
  79. dexsect-4.1.0/src/dexsect.egg-info/top_level.txt +1 -0
  80. dexsect-4.1.0/tests/test_catalog_v41.py +160 -0
  81. dexsect-4.1.0/tests/test_fuzz_parsers.py +102 -0
  82. dexsect-4.1.0/tests/test_inspect.py +114 -0
  83. dexsect-4.1.0/tests/test_parsers.py +131 -0
  84. dexsect-4.1.0/tests/test_phase2.py +100 -0
  85. dexsect-4.1.0/tests/test_phase3.py +100 -0
  86. dexsect-4.1.0/tests/test_pipeline.py +87 -0
  87. dexsect-4.1.0/tests/test_qa_fixes.py +101 -0
  88. dexsect-4.1.0/tests/test_reporting_v2.py +59 -0
dexsect-4.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mohammed Abdulqader
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
dexsect-4.1.0/PKG-INFO ADDED
@@ -0,0 +1,532 @@
1
+ Metadata-Version: 2.4
2
+ Name: dexsect
3
+ Version: 4.1.0
4
+ Summary: Cross-Platform Android APK/Bundle Unpacking, Catalog-Driven Static Inspection & Reporting Toolkit
5
+ Author: 0xMohammad (Al-Azzi)
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/moAbdulqader/dexsect
8
+ Project-URL: Repository, https://github.com/moAbdulqader/dexsect
9
+ Project-URL: Issues, https://github.com/moAbdulqader/dexsect/issues
10
+ Project-URL: Changelog, https://github.com/moAbdulqader/dexsect/blob/main/CHANGELOG.md
11
+ Keywords: android,apk,reverse-engineering,static-analysis,apktool,jadx,elf,sarif
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Information Technology
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Security
23
+ Classifier: Topic :: Software Development :: Disassemblers
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Provides-Extra: beautify
28
+ Requires-Dist: jsbeautifier>=1.14.0; extra == "beautify"
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=7.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
32
+ Requires-Dist: ruff>=0.4.0; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ <p align="center">
36
+ <img src="https://raw.githubusercontent.com/moAbdulqader/dexsect/main/docs/images/banner.png" alt="DexSect Banner" width="100%">
37
+ </p>
38
+
39
+ # DexSect
40
+
41
+ > **Cross-Platform Android Unpacking, Catalog-Driven Static Inspection & Reporting Toolkit**
42
+ > Zero mandatory Python dependencies — built for **Linux**, **macOS**, **Windows**, and **Termux (Android ARM64)**.
43
+
44
+ [![Version: v4.1.0](https://img.shields.io/badge/version-4.1.0-FF8C24.svg)](https://github.com/moAbdulqader/dexsect)
45
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
46
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/moAbdulqader/dexsect/blob/main/LICENSE)
47
+ [![Catalog: 153 Items](https://img.shields.io/badge/Extraction%20Catalog-153%20Specs%20%7C%2018%20Domains-B83B5E.svg)](https://github.com/moAbdulqader/dexsect/blob/main/docs/EXTRACTION_CATALOG.md)
48
+ [![SARIF 2.1.0](https://img.shields.io/badge/SARIF-2.1.0-FF8C24.svg)](#-multilingual-interactive-reports--sarif-210)
49
+ [![Report Locales: 10 Languages](https://img.shields.io/badge/Reports-10%20Languages%20(LTR%20%26%20RTL)-purple.svg)](#-multilingual-interactive-reports--sarif-210)
50
+
51
+ **DexSect** (*Dex + Dissect*) is a modular static reverse-engineering and binary inspection toolkit designed for security researchers, malware analysts, and Android engineers. Give it an `.apk`, a split app bundle (`.xapk`, `.apks`, `.apkm`), an externally unpacked folder, or even a standalone `.dex`, `.so`, `.bundle`, or binary `AndroidManifest.xml`—and DexSect turns it into a clean, numbered, **SQLite + FTS5** indexed workspace backed by a **153-item Extraction Catalog** with full file/line provenance, confidence scoring, cross-layer correlation (`trace`), version diffing (`diff`), built-in & custom rule packs (`--rules`), **SARIF 2.1.0** export, and an interactive mobile/desktop HTML5 dashboard.
52
+
53
+ ---
54
+
55
+ ## Table of Contents
56
+
57
+ - [Why DexSect?](#why-dexsect)
58
+ - [What's New in v4.1.0 & v4.0.0](#whats-new-in-v410--v400)
59
+ - [Architecture](#architecture)
60
+ - [Installation](#installation)
61
+ - [Quick Start](#quick-start)
62
+ - [Unpacking Pipeline & Binary Resilience](#unpacking-pipeline--binary-resilience)
63
+ - [Catalog-Driven Inspection, Confidence & Scope](#catalog-driven-inspection-confidence--scope)
64
+ - [Cross-Layer Trace, Version Diff, Rules & Sharing](#cross-layer-trace-version-diff-rules--sharing)
65
+ - [Flexible Query, Search & Export](#flexible-query-search--export)
66
+ - [Multilingual Interactive Reports & SARIF 2.1.0](#multilingual-interactive-reports--sarif-210)
67
+ - [Standalone Single-Artifact Tools](#standalone-single-artifact-tools)
68
+ - [CLI Reference & Built-in Help](#cli-reference--built-in-help)
69
+ - [Workspace Directory Layout](#workspace-directory-layout)
70
+ - [Framework & Binary Support Matrix](#framework--binary-support-matrix)
71
+ - [Configuration, Security & Extensibility](#configuration-security--extensibility)
72
+ - [Testing & Verification](#testing--verification)
73
+
74
+ ---
75
+
76
+ ## Why DexSect?
77
+
78
+ Standard single-tool Android reverse engineering falls short on real-world applications:
79
+
80
+ * **Split Bundles & Nested APKs:** Modern apps arrive split across `.xapk`/`.apks`/`.apkm` containers or embed secondary `.apk`/`.dex` payloads inside `assets/` and `res/`.
81
+ * **OOM & Obfuscation Failures:** Massive 15+ DEX apps crash `jadx` with `OutOfMemoryError`, extreme obfuscation breaks individual methods, and resource protectors (`AndResGuard`) break `apktool`.
82
+ * **Hidden Native Binaries:** Many apps load `.so` ELF libraries dynamically from `assets/` or `jniLibs/` (outside `lib/`) or strip ELF section headers (`e_shoff = 0`).
83
+ * **Ad-SDK Noise Starvation:** Thousands of third-party ad/analytics SDK classes drown out the application's own logic in generic scanners.
84
+ * **Cross-Platform Logic:** Business logic often lives in **Flutter** (`libapp.so`), **React Native** (`index.android.bundle` / **Hermes** bytecode), **Unity** (`IL2CPP` / `Mono`), **Cordova / Ionic / Capacitor**, or **Xamarin**, and minified `.min.js` bundles pack hundreds of kilobytes onto a single line.
85
+
86
+ **DexSect solves every one of these cleanly using only the Python standard library, with optional integration for external reverse-engineering tools.**
87
+
88
+ ---
89
+
90
+ ## What's New in v4.1.0 & v4.0.0
91
+
92
+ ### v4.1.0 — Reliability, Forensic Determinism & DevSecOps
93
+ * **Non-Freezing Live UI Ticker & Single-Pass Decode:** Dedicated 0.25s background render thread keeps elapsed timers and progress smooth during massive `os.scandir` inventories and `SQLite FTS5` rebuilds, while `DecodePhase` merges file inventory and embedded-APK discovery into a single pass.
94
+ * **JADX Failure Recovery (`COD-GAP-002`) & `--jadx-args`:** Captures JADX method warnings/errors from logs and inline `/* JADX WARN/ERROR */` annotations, automatically falls back to scanning the missing/errored classes in **Smali** during `standard` inspection, and adds `--jadx-args` pass-through.
95
+ * **Catalog Reliability & Finding Confidence (`--confidence high|medium|low`):** Every item in the 153-spec catalog carries a `reliability` rating propagated automatically into `findings.db` and filterable via `query` and `search`.
96
+ * **SARIF 2.1.0 Export (`--format sarif`):** Generates OASIS SARIF 2.1.0 output (`ANALYSIS_REPORT.sarif`) for GitHub Code Scanning, GitLab, and VS Code.
97
+ * **Deterministic Reproducibility (`--deterministic`):** Computes and records `analysis_hash` (`SHA-256`) across inputs, options, rule packs, and tool versions.
98
+ * **Bundled Rule Packs (`--rules builtin`) & New CLI Utilities:** Includes curated `crypto_audit`, `anti_analysis`, and `secrets_extended` rule packs, `dexsect explain <ID>`, `dexsect pack <ws> [--minimal]`, and `--low-mem` preset for memory-constrained environments.
99
+ * **Global Standards & Quality:** Added `SECURITY.md`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `CHANGELOG.md`, `docs/API.md`, `.editorconfig`, `.gitattributes`, multi-OS CI (`ubuntu`, `macos`, `windows`), `pytest-cov`, `ruff`, and pure-Python malformed-input parser stress tests (`tests/test_fuzz_parsers.py`).
100
+
101
+ ### v4.0.0 — Unified Brand Identity & Deep Investigation
102
+ * **Unified Visual Identity:** Official Ember Orange (`#FF8C24`), Warm Cream (`#F5EFE6`), Shield Crimson (`#B83B5E`), and Obsidian (`#111015`) palette across both the redesigned **Live Terminal Dashboard** (with multi-stage pipeline strip) and interactive HTML reports.
103
+ * **Cross-Platform Global Registry (`dexsect runs`):** XDG/AppData run registry (`runs_index.json`) lets workspace shortcuts (`01`, `02`, `latest`) and `--resume` work from any directory on **Windows, Linux, macOS, and Termux**, plus `--timeout` process guards and `BrokenPipeError`-safe piping (`| head`).
104
+ * **Scope Isolation (`--scope app | third_party | boilerplate`):** Classifies Manifest components, Java classes, URLs, and domains into **app code** vs **third-party SDKs** vs **boilerplate**.
105
+ * **Cross-Layer Correlation (`dexsect trace`) & Version Diffing (`dexsect diff`):** Trace classes, URLs, permissions, or JNI bridges across Manifest ↔ Intents ↔ Java ↔ Native, and compare two app versions in Terminal, Markdown, JSON, or interactive HTML.
106
+ * **Hardened Binary Parsers:** `PT_DYNAMIC` + `DT_GNU_HASH` fallback for stripped `.so` files, `NT_GNU_BUILD_ID`, `AXML ResourceMap`, v1/v2/v3 pure-Python ASN.1 DER certificate parsing, `.js.map` SourceMap reconstruction, and UTF-8 + UTF-16LE wide-string extraction.
107
+
108
+ ---
109
+
110
+ ## Architecture
111
+
112
+ DexSect strictly separates **Unpacking (`phases/`)**, **Inspection (`inspectors/` via `InspectPlugin`)**, **Research Plugins (`diff`, `trace`)**, and **Reporting (`reporting/` via `ReportPlugin`)** around `workspace.json` and `10_Analysis/findings.db`:
113
+
114
+ ```text
115
+ Target (.apk / .xapk / .apks / .apkm / .dex / .so / .bundle / .xml / dir)
116
+ │
117
+ ▼
118
+ ┌─────────────────────────────────────────────────────────────────────┐
119
+ │ STAGE A :: UNPACKING PIPELINE (Named, Composable Phases) │
120
+ │ decode ──► decompile ──► fingerprint ──► frameworks ──► native │
121
+ │ │ │
122
+ │ workspace.json + │
123
+ │ UNPACK_MAP.txt/.md │
124
+ └─────────────────────────────────────────────────────────────────────┘
125
+ │
126
+ ▼ (--inspect or `dexsect inspect`)
127
+ ┌─────────────────────────────────────────────────────────────────────┐
128
+ │ STAGE B :: 153-ITEM CATALOG ENGINE (9 Inspectors + Custom Rules) │
129
+ │ bundle │ signing │ manifest │ resources │ dex │ assets_db │
130
+ │ code (shared scan + Smali fallback) │ native_fw │ scanner │ rules │
131
+ │ │ │
132
+ │ ▼ │
133
+ │ 10_Analysis/findings.db (SQLite + FTS5 findings & strings) │
134
+ │ 10_Analysis/inspection_summary.json (+ analysis_hash) │
135
+ └─────────────────────────────────────────────────────────────────────┘
136
+ │
137
+ ├──► `dexsect query` / `dexsect search` (table, values, json, jsonl, csv, tsv, md)
138
+ ├──► `dexsect trace` / `dexsect diff` / `dexsect pack`
139
+ └──► STAGE C :: `dexsect report` (HTML v2 / MD / JSON / SARIF 2.1.0)
140
+ ```
141
+
142
+ ### Repository Structure
143
+
144
+ ```text
145
+ dexsect/
146
+ ├── pyproject.toml
147
+ ├── LICENSE
148
+ ├── SECURITY.md
149
+ ├── CONTRIBUTING.md
150
+ ├── CODE_OF_CONDUCT.md
151
+ ├── CHANGELOG.md
152
+ ├── README.md
153
+ ├── .editorconfig
154
+ ├── .gitattributes
155
+ ├── .github/workflows/ci.yml # Multi-OS CI (Ubuntu, macOS, Windows) + Ruff + Pytest Coverage
156
+ ├── docs/
157
+ │ ├── API.md # Developer & plugin integration guide
158
+ │ ├── EXTRACTION_CATALOG.md # Human-readable specification of all 153 catalog items
159
+ │ └── images/banner.png # Project cover banner
160
+ ├── tests/ # Automated unit, regression, catalog & parser fuzz tests
161
+ └── src/dexsect/
162
+ ├── cli.py # Unified CLI, auto-detect router, shortcuts & help guides
163
+ ├── catalog/
164
+ │ └── EXTRACTION_CATALOG.json # Machine-readable catalog schema (v1.1.0)
165
+ ├── locales/ # 10 external JSON translations (en, ar, zh, es, fr, ru, pt, de, ja, tr)
166
+ ├── rules/ # Bundled rule packs (crypto_audit, anti_analysis, secrets_extended)
167
+ ├── core/
168
+ │ ├── config.py # OS-aware tool discovery & ~/.config/dexsect/config.json
169
+ │ ├── context.py # WorkspaceState (workspace.json), ErrorRecord, PluginRegistry
170
+ │ ├── i18n.py # External JSON locale loader (built-in + custom locales)
171
+ │ ├── pipeline.py # Phase orchestrator & input auto-detection
172
+ │ ├── platform_utils.py # Windows/POSIX VT100, XDG paths & global RunsRegistry
173
+ │ ├── runner.py # Cross-platform subprocess runner + timeout + JAVA_OPTS
174
+ │ ├── theme.py # Official DexSect brand palette & 24-bit Truecolor ANSI
175
+ │ ├── ui.py # Background-ticking live terminal UI with stage strip
176
+ │ └── utils.py # Chunked UTF-8/UTF-16LE strings, SHA-256, scandir, JS formatter
177
+ ├── parsers/
178
+ │ ├── axml.py # Pure-Python Binary AXML decoder (with ResourceMap)
179
+ │ ├── bundle.py # .apk/.xapk/.apks/.apkm extractor, manifest peek & ZIP guard
180
+ │ └── elf.py # Pure-Python ELF32/64 (SHT + PT_DYNAMIC fallback) & JNI demangler
181
+ ├── phases/ # decode, decompile, fingerprint, frameworks, native, mapper
182
+ ├── inspectors/ # 9 built-in catalog inspectors + custom_rules + text_scanner
183
+ ├── storage/
184
+ │ └── findings_db.py # SQLite + FTS5 engine (findings_fts & strings_fts)
185
+ ├── plugins/ # BaseAnalysisPlugin, InspectPlugin, ReportPlugin, DiffPlugin, TracePlugin
186
+ └── reporting/ # UNPACK_MAP, HTML v2 dashboard, MD/JSON, Diff HTML & SARIF 2.1.0
187
+ ```
188
+
189
+ ---
190
+
191
+ ## Installation
192
+
193
+ ### 1. System Prerequisites
194
+
195
+ * **Linux (Debian / Ubuntu):**
196
+ ```bash
197
+ sudo apt update && sudo apt install -y python3 python3-pip openjdk-17-jre apktool jadx git
198
+ ```
199
+ * **macOS (Homebrew):**
200
+ ```bash
201
+ brew install python openjdk@17 apktool jadx git
202
+ ```
203
+ * **Windows (Winget / Scoop):**
204
+ ```powershell
205
+ winget install EclipseAdoptium.Temurin.17.JDK
206
+ scoop install apktool jadx
207
+ ```
208
+ * **Termux (Android ARM64):**
209
+ ```bash
210
+ pkg update && pkg upgrade -y
211
+ pkg install python openjdk-17 apktool jadx git -y
212
+ termux-setup-storage
213
+ ```
214
+
215
+ ### 2. Install DexSect
216
+ ```bash
217
+ git clone https://github.com/moAbdulqader/dexsect.git
218
+ cd dexsect
219
+ pip install --no-build-isolation -e .
220
+ ```
221
+ *(For development tools `pytest`, `pytest-cov`, and `ruff`: `pip install --no-build-isolation -e ".[dev]"`.)*
222
+
223
+ ### 3. Optional External Unpackers
224
+ DexSect includes built-in pure-Python extractors for every supported framework and automatically delegates to external tools when available:
225
+ ```bash
226
+ # React Native Hermes bytecode decompiler & disassembler (pure Python)
227
+ pip install --upgrade git+https://github.com/P1sec/hermes-dec.git
228
+
229
+ # High-accuracy JavaScript formatter
230
+ pip install jsbeautifier
231
+ ```
232
+ *(Also auto-detected when present in `PATH` or configured via `config.json`/env vars: `blutter`, `Il2CppDumper`, `ilspycmd`, `hbctool`, `readelf`.)*
233
+
234
+ ### 4. Verify Environment Health
235
+ ```bash
236
+ dexsect doctor
237
+ ```
238
+
239
+ ---
240
+
241
+ ## Quick Start
242
+
243
+ ### Unpack Only (Default Behavior)
244
+ ```bash
245
+ dexsect app.apk
246
+ ```
247
+ DexSect peeks the package name and version via its binary AXML decoder before decoding, creating a numbered workspace inside `./dexsect_runs/`:
248
+ ```text
249
+ ./dexsect_runs/01_com.example.app_1.4.2-20261204/
250
+ ```
251
+
252
+ ### Full End-to-End Pipeline (Unpack + 153-Item Inspect + Reports)
253
+ ```bash
254
+ dexsect app.apk --inspect --report
255
+ ```
256
+
257
+ ### With Built-in Rules, Deterministic Hash & Low-Memory Preset
258
+ ```bash
259
+ dexsect app.apk --low-mem --inspect --rules builtin --deterministic --report
260
+ ```
261
+
262
+ ### List Runs & Work Using Shortcuts From Anywhere
263
+ ```bash
264
+ dexsect runs
265
+ dexsect explain ACT-005
266
+ dexsect query 01 --summary
267
+ dexsect report latest --lang ar
268
+ ```
269
+
270
+ ---
271
+
272
+ ## Unpacking Pipeline & Binary Resilience
273
+
274
+ DexSect runs six named, composable phases (`decode` -> `decompile` -> `fingerprint` -> `frameworks` -> `native` -> `map`):
275
+
276
+ * **Recursive Embedded APK & Hidden DEX Recovery:** Discovers secondary `.apk` files and hidden `assets/*.dex` payloads, prevents duplicates via `SHA-256`, and unpacks nested APKs up to `--max-depth`.
277
+ * **Automatic `apktool --no-res` Fallback:** If resource-obfuscated APKs (e.g., `AndResGuard`) break `apktool`, DexSect automatically retries `--no-res` and decodes `AndroidManifest.xml` using its pure-Python AXML parser.
278
+ * **Automatic Per-DEX JADX Fallback & Error Capture:** If `jadx` hits `OutOfMemoryError` on massive multi-DEX APKs (15+ DEX files), DexSect naturally sorts root `classes*.dex` (`1..N`), extracts each DEX individually, decompiles one DEX at a time, and records failed methods in `jadx_failed_items.json`.
279
+ * **Non-Standard `.so` Discovery & Stripped ELF Recovery:** Discovers ELF binaries in `lib/`, `assets/`, `jniLibs/`, and `unknown/`, and falls back to `PT_DYNAMIC` + `DT_GNU_HASH` parsing when section headers are stripped (`e_shoff = 0`).
280
+ * **Granular Phase & Sub-Task Control (`--only` / `--skip`):**
281
+ * Whole phases: `decode`, `decompile`, `fingerprint`, `frameworks`, `native`, `map`
282
+ * Granular sub-tasks: `smali`, `res`, `debug-info`, `lang-splits`, `embedded`, `inventory`, `disasm`, `so-strings`
283
+ ```bash
284
+ dexsect app.xapk -j 4 --skip lang-splits,so-strings
285
+ dexsect app.apk --only decode,native,map
286
+ ```
287
+ * **Safe Interrupts, `--timeout`, `--low-mem` & `--resume`:** Terminates child process groups cleanly on POSIX/Windows, protects against infinite tool hangs (`--timeout`), tunes mobile RAM via `--low-mem`, and resumes automatically via `dexsect app.apk --resume`.
288
+
289
+ ---
290
+
291
+ ## Catalog-Driven Inspection, Confidence & Scope
292
+
293
+ Guided by the official **153-item Extraction Catalog (`docs/EXTRACTION_CATALOG.md`)**, `dexsect inspect` guarantees **evidence-only** extraction backed by full provenance (`unit_id`, `scope`, `confidence`, `layer`, `file_path`, `line_no`, `class_name`, `method_name`):
294
+
295
+ ### Scope & Confidence Isolation
296
+ * **Scope (`app` | `third_party` | `boilerplate`):** Manifest components (`ACT-*`, `SRV-*`, `REC-*`, `PRO-*`, `INT-*`), Java/Kotlin classes, and correlated URLs/domains (`URL-001`, `NET-001`) are tagged by scope against the app's `packageName`. Third-party ad SDKs are capped cleanly in `standard` mode while **`scope == "app"` is never capped**. Boilerplate XML namespaces and `localhost`/`example.com` are tagged `boilerplate`.
297
+ * **Confidence (`high` | `medium` | `low`):** Deterministic structural facts (Manifest, Certificates, DEX/ELF headers, SQLite schemas) carry `high` confidence, code/URL pattern matches carry `medium`, and heuristic candidates (Base64, secret regexes, raw strings) carry `low`.
298
+
299
+ ### What the Inspectors Cover
300
+
301
+ | Inspector | Catalog IDs | Capabilities |
302
+ | :--- | :--- | :--- |
303
+ | **`bundle`** | `BND-001..002` | Main, Split & nested Embedded APK hierarchy, sizes & `SHA-256` correlation |
304
+ | **`signing`** | `SIG-001..007` | Parses **v1 (`.RSA/.DSA/.EC`) and v2/v3 APK Signature Block (`APK Sig Block 42`)** X.509 certificates (`keytool`, `openssl`, plus built-in **pure-Python ASN.1 DER parser**) |
305
+ | **`manifest`** | `APP-*`, `PER-*`, `ACT/SRV/REC/PRO-*`, `INT-*`, `SEC-001/002/008` | Metadata, `<queries>`, `<uses-feature>`, duplicate permissions, unprotected exported components, deep links & `autoVerify` App Links, `network_security_config.xml`, and `FileProvider` `res/xml/*.xml` path resolution |
306
+ | **`resources`** | `RES-001..005`, `CFG-001..003` | `public.xml`, `strings.xml`, localization qualifiers, `res/xml` & `res/raw`, compiled Firebase/Google/OAuth keys, `.env` and filtered config `.properties` |
307
+ | **`dex`** | `DEX-001..004`, `APP-020` | Binary DEX headers (`035`/`037`), class/method/field/string counts, `META-INF/*.version` / `app-metadata.properties` / `kotlin-tooling-metadata.json` library & AGP/Compose/Kotlin versions, plus automatic Smali sensitive API scan (`DEX-004`) when Java sources are missing |
308
+ | **`assets_db`** | `AST-001..005`, `DB-001..003` | Magic-byte inspection, `SHA-256` deduplication, ML model & nested archive detection, and read-only **SQLite** schema/row-count inspection (plus capped sample rows in `deep` mode) |
309
+ | **`code`** | `COD-*`, `COD-GAP-001..002`, `KOT-*`, `REF-*`, `NAPI-*`, `PER-010/011`, `SEC-003..007` | Single-pass shared Java scan with multi-line call capture, Kotlin `@Metadata`, **Smali vs JADX recovery gap + JADX error log/comment capture + automatic Smali fallback scan**, undeclared permissions, reflection/`DexClassLoader`, WebView/Crypto/TrustManager/Anti-Tamper indicators |
310
+ | **`native_fw`** | `NAT-001..005`, `FLT/RN/UNT/WEB/XAM` | ELF32/64 metadata, `BuildID`, **hardening flags (`NX`, `RELRO`, `PIE`, `Stripped`)**, **JNI `Java_*` cross-referencing** against Java `native` methods, and hybrid framework metadata |
311
+ | **`scanner`** | `URL-001..004`, `NET-001..004`, `CFG-004/005`, `STR-*`, `NAT-006` | Multi-layer scanner across raw DEX strings, Java, Resources, Assets (un-truncated `.min.js` lines), Frameworks & Native strings: HTTP/WS/FTP/`file://`/`content://`/custom schemes, RFC-validated domains, IPv4, validated IPv6, Base64 with decoded preview, secrets & DB URIs |
312
+ | **`custom_rules`** | `CUSTOM-*` | Bundled (`--rules builtin`) and user-defined JSON regex packs |
313
+
314
+ ### Inspection Profiles (`--profile`)
315
+ * `--profile fast`: Manifest, Signing, Bundles, DEX Headers, Basic Resources/Assets, Native ELF metadata & hardening, Frameworks.
316
+ * `--profile standard` *(default)*: Everything in `fast` + SQLite schemas, full URL/Custom-Scheme/IP/Secret/Code/API scanning, JADX recovery gap + Smali fallback, JNI cross-referencing.
317
+ * `--profile deep`: Everything in `standard` + full class catalog (`COD-001`), ELF symbol export tables (`NAT-004`), SQLite sample records (`DB-003`), UUIDs, complete `public.xml`, and full string indexing (`STR-001`) into `strings_fts` for `search --strings`.
318
+
319
+ ---
320
+
321
+ ## Cross-Layer Trace, Version Diff, Rules & Sharing
322
+
323
+ ### 1. Cross-Layer Correlation Trace (`dexsect trace`)
324
+ Follow any class, library, URL, domain, permission, or JNI symbol across Manifest → Intents → Java/Smali → Native ELF → Network:
325
+ ```bash
326
+ dexsect trace 01 MainActivity
327
+ dexsect trace 01 libvidmatecodec --format json -o trace.json
328
+ ```
329
+
330
+ ### 2. Version-to-Version Differential Analysis (`dexsect diff`)
331
+ Compare two APK workspaces (`01` vs `02`) across permissions, exported components, deep links, domains/URLs, native `.so`/JNI, and security indicators:
332
+ ```bash
333
+ dexsect diff 01 02
334
+ dexsect diff 01 02 --scope app --format md -o diff.md
335
+ dexsect diff 01 02 --format html -o diff_report.html
336
+ ```
337
+
338
+ ### 3. Built-in & Custom Rule Packs (`--rules`)
339
+ Activate all bundled packs (`crypto_audit`, `anti_analysis`, `secrets_extended`) or pass custom JSON packs:
340
+ ```bash
341
+ dexsect inspect 01 --rules builtin --report
342
+ dexsect inspect 01 --rules builtin:crypto_audit,./my_rules.json --report
343
+ dexsect query 01 --id CUSTOM-*
344
+ ```
345
+
346
+ ### 4. Portable Workspace Packing (`dexsect pack`)
347
+ Bundle an entire workspace—or just the compact `workspace.json`, reports, `findings.db`, and logs (`--minimal`)—for sharing across teams:
348
+ ```bash
349
+ dexsect pack 01 --minimal -o case_01_minimal.zip
350
+ dexsect pack 01 --format tar.gz -o case_01_full.tar.gz
351
+ ```
352
+
353
+ ---
354
+
355
+ ## Flexible Query, Search & Export
356
+
357
+ Query `10_Analysis/findings.db` using SQLite + FTS5 and export into `table`, `values`, `json`, `jsonl`, `csv`, `tsv`, or `md`:
358
+
359
+ ```bash
360
+ # Explain any Catalog ID in detail
361
+ dexsect explain ACT-005
362
+
363
+ # Discover all extracted Catalog IDs & counts (including STR-001)
364
+ dexsect query 01 --summary
365
+
366
+ # Filter by Catalog ID, Scope, Confidence, Layer, or Unit
367
+ dexsect query 01 --id ACT-005 --scope app --format json -o app_exported.json
368
+ dexsect query 01 --confidence high --id SEC-* --scope app --format table
369
+ dexsect query 01 --id NET-001 --scope app --unique --format values -o app_domains.txt
370
+ dexsect query 01 --id URL-001 --layer java,assets --unique --format csv -o urls.csv
371
+ dexsect query 01 --id NAT-005 --unit 0001 --format md -o jni.md
372
+
373
+ # Lightning-fast FTS5 or regex search across findings or deep strings
374
+ dexsect search 01 firebase --scope app --format table
375
+ dexsect search latest "https://.*api" --regex --unique --format values
376
+ dexsect search 01 "api_users" --strings --unique
377
+ ```
378
+
379
+ ---
380
+
381
+ ## Multilingual Interactive Reports & SARIF 2.1.0
382
+
383
+ Generate self-contained **`ANALYSIS_REPORT.html`**, **`ANALYSIS_REPORT.md`**, **`ANALYSIS_REPORT.json`**, and **`ANALYSIS_REPORT.sarif`** (zero internet/CDN required):
384
+
385
+ ```bash
386
+ dexsect report 01
387
+ dexsect report 01 --lang ar
388
+ dexsect report 01 --format sarif -o dexsect.sarif
389
+ dexsect report 01 --include-noise --full-json
390
+ ```
391
+
392
+ ### HTML5 Dashboard & SARIF Features
393
+ * **DexSect Branded Desktop & Mobile UI:** Fixed navigation sidebar on desktop; smooth slide-out drawer on mobile with responsive cards (`<= 768px`).
394
+ * **Executive Overview Tab:** Visual App vs 3rd-Party scope ratio bar, clickable Domain distribution bars, Signing certificates, Clean Domains cloud, Attack Surface summary & ELF hardening table.
395
+ * **All Findings Master Explorer & 3 View Modes:** Switch seamlessly between **`Table`**, **`Cards`**, and **`Grouped by ID`** (collapsible accordions showing official Catalog descriptions).
396
+ * **Precision Controls:** Quick multi-select **Catalog ID chips**, **Scope** (`All / App Code / 3rd-Party`), **Unit**, **Layer**, **Column Visibility toggles**, **Regex** search, **Exclude** filter, **Sorting**, **Detail Inspector Modal**, and one-click export of filtered results to **JSON / CSV / TXT (Values)**.
397
+ * **SARIF 2.1.0 Output:** Standards-compliant `ANALYSIS_REPORT.sarif` integrating directly with GitHub Code Scanning, GitLab SAST, and VS Code SARIF Viewer.
398
+ * **10 Built-in Locales (Zero-Code Extensibility):**
399
+ `en` (English), `ar` (العربية — RTL), `zh` (简体中文), `es` (Español), `fr` (Français), `ru` (Русский), `pt` (Português), `de` (Deutsch), `ja` (日本語), `tr` (Türkçe).
400
+
401
+ ---
402
+
403
+ ## Standalone Single-Artifact Tools
404
+
405
+ Operate directly on individual external files without needing a full APK pipeline:
406
+
407
+ | Command | Target Example | Behavior |
408
+ | :--- | :--- | :--- |
409
+ | `dexsect decode <xml>` | `AndroidManifest.xml` | Pure-Python decoder converts Binary Android XML (AXML) to UTF-8 XML (`-o out.xml` or stdout) |
410
+ | `dexsect decode <apk>` | `app.xapk` | Runs Apktool recursive decode & bundle extraction only |
411
+ | `dexsect decompile <dex>` | `classes2.dex` | Decompiles standalone `.dex` (or `.apk`) via JADX |
412
+ | `dexsect fingerprint <target>` | `app.apk` or `./decoded` | Inspects frameworks, Hermes version & packers directly from ZIP or unpacked dir |
413
+ | `dexsect framework <file>` | `index.android.bundle` | Auto-detects Plain JS vs Hermes bytecode and beautifies/decompiles/disassembles it |
414
+ | `dexsect framework <file>` | `libapp.so` / `global-metadata.dat` | Extracts Dart packages/strings/SDK version or Unity namespaces/symbols |
415
+ | `dexsect native <so>` | `libnative.so` or `./lib/` | Parses ELF32/64 headers (`SHT` + `PT_DYNAMIC`), `DT_NEEDED`, `BuildID`, hardening flags, demangled `Java_*` JNI & strings |
416
+ | `dexsect doctor` | — | Audits installed core tools, optional unpackers, OS family & available locales |
417
+
418
+ ---
419
+
420
+ ## CLI Reference & Built-in Help
421
+
422
+ ```text
423
+ dexsect [command] [target] [options]
424
+
425
+ Unpack & Pipeline Commands:
426
+ unpack (run) Full customizable unpack pipeline (default when passing a target directly)
427
+ decode Decode APK/Bundle via Apktool OR decode binary AndroidManifest.xml
428
+ decompile Decompile APK or standalone .dex file to Java/Kotlin via JADX
429
+ fingerprint Detect runtime stack, hybrid frameworks, Hermes version & packers
430
+ framework Unpack standalone Flutter / React Native / Unity / Web / Xamarin artifacts
431
+ native Unpack ELF32/64 metadata, DT_NEEDED, exports/imports, JNI & strings
432
+ map Regenerate UNPACK_MAP.txt and UNPACK_MAP.md from a workspace
433
+
434
+ Inspection, Investigation & Reporting Commands:
435
+ inspect Run 153-item catalog inspection + optional --rules into findings.db
436
+ query Filter, summarize (--summary), extract & export findings
437
+ search Fast FTS5 or regex search across findings or deep strings
438
+ trace Correlate a class, URL, library, permission, or JNI symbol across all layers
439
+ diff Compare two workspaces (Terminal, Markdown, JSON, or interactive HTML)
440
+ report Generate responsive HTML (10 languages), Markdown, JSON & SARIF 2.1.0 reports
441
+ pack Export workspace as portable .zip or .tar.gz archive (--minimal supported)
442
+ explain Explain any Catalog ID (domain, reliability, sources & query example)
443
+ runs List all recorded DexSect workspaces across runs
444
+ catalog Browse the official 153-item Extraction Catalog
445
+
446
+ Guides & Diagnostics:
447
+ help [topic] Detailed CLI guides (topics: query, phases, standalone, diff, rules, examples)
448
+ doctor Inspect installed system tools, locales & environment health
449
+ ```
450
+
451
+ Run `dexsect --help`, `dexsect -help`, or `dexsect help <topic>` anytime in your terminal.
452
+
453
+ ---
454
+
455
+ ## Workspace Directory Layout
456
+
457
+ ```text
458
+ dexsect_runs/01_com.example.app_1.0.0-20261204/
459
+ ├── workspace.json # Central state, paths & analysis_hash (Schema 3.0)
460
+ ├── 00_Bundle_Extracted/ # Extracted split APKs from .xapk/.apks/.apkm
461
+ ├── 01_Main_APK/decoded/ # Decoded main APK (AndroidManifest.xml, res, smali, assets, lib)
462
+ ├── 02_Split_APKs/ # Decoded split APKs
463
+ ├── 03_Embedded_APKs/ # Recursively decoded embedded APKs (without sequential prefix)
464
+ ├── 04_Java_Src/ # Decompiled Java/Kotlin sources (JADX + embedded_dex/ + jadx_failed_items.json)
465
+ ├── 05_Frameworks/ # Unpacked Flutter / RN / Unity / Web / Xamarin + sourcemaps_src/
466
+ ├── 06_Native_Libs/ # ELF metadata, demangled JNI exports, symbols & strings per .so
467
+ ├── 07_Logs/ # session.log, errors.log, errors.json, tasks/*.log
468
+ ├── 08_Inventory/ # apks.tsv, files.tsv, bundle_manifest.json
469
+ ├── 09_Reports/ # UNPACK_MAP.txt/.md + ANALYSIS_REPORT.html/.md/.json/.sarif
470
+ └── 10_Analysis/ # findings.db (SQLite + FTS5) & inspection_summary.json
471
+ ```
472
+
473
+ ---
474
+
475
+ ## Framework & Binary Support Matrix
476
+
477
+ | Runtime / Target | Built-in Capabilities (Zero External Python Deps) | Optional Tool Integration |
478
+ | :--- | :--- | :--- |
479
+ | **Native (Java / Kotlin)** | Apktool decode (`--no-res` fallback), JADX decompile + Per-DEX fallback + Smali gap fallback, AXML decoder (`ResourceMap`), v1/v2/v3 cert parser (ASN.1 DER), ELF32/64 (`SHT` + `PT_DYNAMIC`) & JNI demangler | `apktool`, `jadx`, `keytool`/`openssl`, `readelf` |
480
+ | **Flutter** | `flutter_assets` index, `package:*.dart` extraction, Dart SDK version hints, `libapp.so` UTF-8/UTF-16LE strings | `blutter` |
481
+ | **React Native (JS)** | Linear JS pretty-printer + **`.js.map` SourceMap reconstruction** | `js-beautify` |
482
+ | **React Native (Hermes)** | HBC magic & version extraction + string table extraction | `hbc-decompiler`, `hbc-disassembler` (`hermes-dec`), `hbctool` |
483
+ | **Unity (IL2CPP)** | `global-metadata.dat` encryption & version check, C# namespaces & strings | `Il2CppDumper` |
484
+ | **Unity (Mono) / Xamarin** | `.dll` custom vs system inventory & UTF-16LE/UTF-8 metadata extraction | `ilspycmd` |
485
+ | **Cordova / Ionic / Capacitor** | Pure-Python JS formatting across `www/` & `public/`, **`.js.map` SourceMap reconstruction** | `js-beautify` |
486
+
487
+ ---
488
+
489
+ ## Configuration, Security & Extensibility
490
+
491
+ ### User Configuration (`~/.config/dexsect/config.json` or `%APPDATA%\dexsect\config.json`)
492
+ ```json
493
+ {
494
+ "runs_dir": "~/dexsect_runs",
495
+ "jobs": 4,
496
+ "jadx_jobs": 2,
497
+ "java_xmx": "1536m",
498
+ "timeout_sec": 1800,
499
+ "tool_paths": {
500
+ "blutter": "/path/to/blutter/blutter.py",
501
+ "Il2CppDumper": "/usr/local/bin/Il2CppDumper"
502
+ }
503
+ }
504
+ ```
505
+
506
+ ### Security, Contributing & API
507
+ * **Security Policy:** See [SECURITY.md](https://github.com/moAbdulqader/dexsect/blob/main/SECURITY.md) for threat model details and responsible vulnerability disclosure.
508
+ * **Developer & Plugin API:** See [docs/API.md](https://github.com/moAbdulqader/dexsect/blob/main/docs/API.md) for programmatic `WorkspaceState`, `FindingsDB`, `BaseInspector`, and `BaseAnalysisPlugin` usage.
509
+ * **Contributing & Changelog:** See [CONTRIBUTING.md](https://github.com/moAbdulqader/dexsect/blob/main/CONTRIBUTING.md), [CODE_OF_CONDUCT.md](https://github.com/moAbdulqader/dexsect/blob/main/CODE_OF_CONDUCT.md), and [CHANGELOG.md](https://github.com/moAbdulqader/dexsect/blob/main/CHANGELOG.md).
510
+
511
+ ---
512
+
513
+ ## Testing & Verification
514
+
515
+ Run the automated unit, regression, and malformed-byte parser stress tests:
516
+ ```bash
517
+ python3 -m unittest discover -s tests -v
518
+ ```
519
+
520
+ Or with `pytest` coverage and `ruff` linting (after `pip install -e ".[dev]"`):
521
+ ```bash
522
+ ruff check src tests
523
+ pytest --cov=dexsect --cov-report=term-missing -v
524
+ ```
525
+
526
+ GitHub Actions CI verifies every commit across **Ubuntu (Python 3.10–3.13)**, **macOS (Python 3.12)**, and **Windows (Python 3.12)**.
527
+
528
+ ---
529
+
530
+ ## License
531
+
532
+ MIT License — see [LICENSE](https://github.com/moAbdulqader/dexsect/blob/main/LICENSE).