pykevlar 2.0.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.
Potentially problematic release.
This version of pykevlar might be problematic. Click here for more details.
- pykevlar-2.0.0/LICENSE +12 -0
- pykevlar-2.0.0/PKG-INFO +118 -0
- pykevlar-2.0.0/README.md +82 -0
- pykevlar-2.0.0/pyproject.toml +73 -0
- pykevlar-2.0.0/setup.cfg +4 -0
- pykevlar-2.0.0/src/pykevlar/__init__.py +6 -0
- pykevlar-2.0.0/src/pykevlar/__main__.py +4 -0
- pykevlar-2.0.0/src/pykevlar/_cli.py +90 -0
- pykevlar-2.0.0/src/pykevlar.egg-info/PKG-INFO +118 -0
- pykevlar-2.0.0/src/pykevlar.egg-info/SOURCES.txt +11 -0
- pykevlar-2.0.0/src/pykevlar.egg-info/dependency_links.txt +1 -0
- pykevlar-2.0.0/src/pykevlar.egg-info/entry_points.txt +2 -0
- pykevlar-2.0.0/src/pykevlar.egg-info/top_level.txt +1 -0
pykevlar-2.0.0/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
PyKevlar Software Distribution License
|
|
2
|
+
Copyright (c) 2026 PyKevlar Labs (https://pykevlar.com). All rights reserved.
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to install, redistribute, and use the
|
|
5
|
+
`pykevlar` CLI launcher package and its Basic (`--no-armor`) standalone Python bundler,
|
|
6
|
+
`bench`, `hdinfo`, `cache`, and `verify` commands for personal and commercial software builds.
|
|
7
|
+
|
|
8
|
+
Anti-reverse-engineering, bytecode encryption, native C transpilation (`--enable-bcc`),
|
|
9
|
+
Anti-LLM stealth (`--anti-llm`), and customer runtime key generation require an active
|
|
10
|
+
PyKevlar Pro or Team subscription from https://pykevlar.com.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
|
pykevlar-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pykevlar
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: 28.8x faster Python obfuscator, Anti-LLM/anti-decompiler shield (stops pyinstxtractor, PyLingual, pycdc, GhidraMCP & Frida), hardware licenser, and standalone single-binary compiler.
|
|
5
|
+
Author-email: PyKevlar Labs <licenses@pykevlar.com>
|
|
6
|
+
License-Expression: LicenseRef-PyKevlar
|
|
7
|
+
Project-URL: Homepage, https://pykevlar.com/
|
|
8
|
+
Project-URL: Documentation, https://pykevlar.com/docs
|
|
9
|
+
Project-URL: PyArmor Alternative & Benchmarks, https://pykevlar.com/pyarmor-alternative
|
|
10
|
+
Project-URL: Anti-Reverse-Engineering Matrix, https://pykevlar.com/security
|
|
11
|
+
Project-URL: Claude Code & Codex Integration, https://pykevlar.com/agents
|
|
12
|
+
Project-URL: License & Multi-Device Portal, https://pykevlar.com/portal
|
|
13
|
+
Project-URL: Engineering Blog, https://pykevlar.com/blog
|
|
14
|
+
Keywords: python-obfuscator,pyarmor,pyarmor-alternative,pyinstaller,nuitka,cython,anti-reverse-engineering,anti-decompiler,pyinstxtractor,pylingual,bytecode-encryption,hardware-licensing,standalone-binary,code-protection,anti-debugging
|
|
15
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
16
|
+
Classifier: Environment :: Console
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Programming Language :: C
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
|
+
Classifier: Programming Language :: Rust
|
|
28
|
+
Classifier: Topic :: Security :: Cryptography
|
|
29
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
30
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
31
|
+
Classifier: Topic :: System :: Software Distribution
|
|
32
|
+
Requires-Python: >=3.9
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# PyKevlar — Python Obfuscator, Anti-Decompiler & Single-Binary Compiler
|
|
38
|
+
|
|
39
|
+
**[Official Website](https://pykevlar.com/)** · **[PyArmor Comparison & Benchmarks](https://pykevlar.com/pyarmor-alternative)** · **[Anti-Reverse-Engineering Threat Matrix](https://pykevlar.com/security)** · **[Production Docs](https://pykevlar.com/docs)** · **[Claude Code & Codex (`/llms.txt`)](https://pykevlar.com/agents)** · **[License Portal](https://pykevlar.com/portal)**
|
|
40
|
+
|
|
41
|
+
**PyKevlar** (`pykevlar`) is a 15-core parallel Rust + Native C Python release compiler, hardware-locked licensing engine, and anti-reverse-engineering suite for **Python 3.12–3.14**.
|
|
42
|
+
|
|
43
|
+
Standard PyInstaller executables unpack in under five seconds using `pyinstxtractor` and neural decompilers like `PyLingual` or `pycdc`. PyKevlar replaces fragile two-step `PyArmor + PyInstaller` scripts with a **single native binary** that compiles **28.8× faster** (31.0s → **1.08s** cold build on 802 modules) with **zero runtime Python dependencies**.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Install
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install pykevlar
|
|
51
|
+
# or via uv:
|
|
52
|
+
uv tool install pykevlar
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Verify installation:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pykevlar --version
|
|
59
|
+
pykevlar hdinfo
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## How PyKevlar Stops Modern Python Reverse Engineering
|
|
65
|
+
|
|
66
|
+
| Reverse-Engineering Tool / Attack Vector | Plain PyInstaller | PyKevlar (Pro & Team) |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| **`pyinstxtractor` / `binwalk` archive extraction** | Extracts all `.pyc` files in ~2s | **Blocked** — `SPZ2` stream-encrypted container eliminates `MEI` & `zlib` magic headers |
|
|
69
|
+
| **`PyLingual` / `pycdc` / `uncompyle6` bytecode decompilers** | Recovers ~99% readable `.py` source | **Blocked** — per-function ChaCha20-Poly1305 Vectorcall Vaults; zero plaintext bytecode at rest |
|
|
70
|
+
| **`GhidraMCP` / `REA` / `IDA` autonomous LLM agents** | Summarizes symbols & C control flow | **Defeated** — `--anti-llm` CREAM AST identifier stripping, 64-bit MBA predicates & crypto honey-keys |
|
|
71
|
+
| **`Frida` / `sys.settrace` / Python 3.12+ PEP 669 `sys.monitoring`** | Dumps decrypted frames at runtime | **Blocked** — C-level vectorcall dispatch & active PEP 669 / debugger / `LD_PRELOAD` traps |
|
|
72
|
+
| **Unlicensed server copying & expired on-prem trials** | Unlimited copy-paste execution | **Enforced** — 198-byte ChaCha20-Poly1305 `pyarmor.rkey` bound to hardware UUID & UTC expiry |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Quickstart Commands
|
|
77
|
+
|
|
78
|
+
### 1. Free Standalone Bundler (`Basic — $0`)
|
|
79
|
+
Use PyKevlar as an ultra-fast single-binary replacement for `PyInstaller` (plain packaging without code obfuscation):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pykevlar build main.py --no-armor -F -O dist
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 2. Full Anti-Reverse-Engineering + Native C Compilation (`Pro — $39/yr` · `Team — $79/yr`)
|
|
86
|
+
Activate your multi-device subscription key once (works offline on flights & air-gapped networks via Ed25519 signatures):
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pykevlar register "PKA1-..."
|
|
90
|
+
|
|
91
|
+
# Seal Python modules inside ChaCha20 vaults + transpile hot functions to stripped C + Anti-LLM stealth:
|
|
92
|
+
pykevlar build main.py \
|
|
93
|
+
--protect apps \
|
|
94
|
+
--enable-bcc \
|
|
95
|
+
--anti-llm \
|
|
96
|
+
--outer \
|
|
97
|
+
-F -O dist
|
|
98
|
+
|
|
99
|
+
# Mint a per-customer hardware-bound, 365-day runtime key in 6ms (zero binary rebuilds):
|
|
100
|
+
pykevlar key -O dist -b spa-dev-a7256ca34bcac081 -e +365d
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 3. Zero-Docker macOS → Linux Cross-Compilation (`Team — $79/yr`)
|
|
104
|
+
Compile production `linux-x86_64` or `linux-arm64` ELF64 single binaries directly from an Apple Silicon MacBook:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pykevlar build main.py --target linux-x86_64 --enable-bcc --anti-llm -F -O dist-linux
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Plans & Licensing
|
|
113
|
+
|
|
114
|
+
- **Basic ($0 Free)**: Unprotected standalone binary bundling (`--no-armor`), `bench`, `hdinfo`, `cache`, `verify`. *(All anti-reverse-engineering & code obfuscation features require an active Pro or Team subscription.)*
|
|
115
|
+
- **Pro ($39/yr)**: Full 7-layer anti-reverse-engineering, ChaCha20 vaults, `--enable-bcc` C transpiler, `--anti-llm`, customer `--outer` hardware/expiry `rkey` licensing, and **3 developer build devices** (expandable anytime in the [License Portal](https://pykevlar.com/portal)).
|
|
116
|
+
- **Team ($79/yr)**: Everything in Pro + **25 build devices**, unlimited CI/CD & Docker runners (`PYKEVLAR_LICENSE`), zero-Docker macOS → Linux cross-compilation, and 15-core Next.js chunk obfuscation (`pykevlar frontend`).
|
|
117
|
+
|
|
118
|
+
Learn more and get started at **[https://pykevlar.com](https://pykevlar.com/)**.
|
pykevlar-2.0.0/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# PyKevlar — Python Obfuscator, Anti-Decompiler & Single-Binary Compiler
|
|
2
|
+
|
|
3
|
+
**[Official Website](https://pykevlar.com/)** · **[PyArmor Comparison & Benchmarks](https://pykevlar.com/pyarmor-alternative)** · **[Anti-Reverse-Engineering Threat Matrix](https://pykevlar.com/security)** · **[Production Docs](https://pykevlar.com/docs)** · **[Claude Code & Codex (`/llms.txt`)](https://pykevlar.com/agents)** · **[License Portal](https://pykevlar.com/portal)**
|
|
4
|
+
|
|
5
|
+
**PyKevlar** (`pykevlar`) is a 15-core parallel Rust + Native C Python release compiler, hardware-locked licensing engine, and anti-reverse-engineering suite for **Python 3.12–3.14**.
|
|
6
|
+
|
|
7
|
+
Standard PyInstaller executables unpack in under five seconds using `pyinstxtractor` and neural decompilers like `PyLingual` or `pycdc`. PyKevlar replaces fragile two-step `PyArmor + PyInstaller` scripts with a **single native binary** that compiles **28.8× faster** (31.0s → **1.08s** cold build on 802 modules) with **zero runtime Python dependencies**.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install pykevlar
|
|
15
|
+
# or via uv:
|
|
16
|
+
uv tool install pykevlar
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Verify installation:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pykevlar --version
|
|
23
|
+
pykevlar hdinfo
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## How PyKevlar Stops Modern Python Reverse Engineering
|
|
29
|
+
|
|
30
|
+
| Reverse-Engineering Tool / Attack Vector | Plain PyInstaller | PyKevlar (Pro & Team) |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| **`pyinstxtractor` / `binwalk` archive extraction** | Extracts all `.pyc` files in ~2s | **Blocked** — `SPZ2` stream-encrypted container eliminates `MEI` & `zlib` magic headers |
|
|
33
|
+
| **`PyLingual` / `pycdc` / `uncompyle6` bytecode decompilers** | Recovers ~99% readable `.py` source | **Blocked** — per-function ChaCha20-Poly1305 Vectorcall Vaults; zero plaintext bytecode at rest |
|
|
34
|
+
| **`GhidraMCP` / `REA` / `IDA` autonomous LLM agents** | Summarizes symbols & C control flow | **Defeated** — `--anti-llm` CREAM AST identifier stripping, 64-bit MBA predicates & crypto honey-keys |
|
|
35
|
+
| **`Frida` / `sys.settrace` / Python 3.12+ PEP 669 `sys.monitoring`** | Dumps decrypted frames at runtime | **Blocked** — C-level vectorcall dispatch & active PEP 669 / debugger / `LD_PRELOAD` traps |
|
|
36
|
+
| **Unlicensed server copying & expired on-prem trials** | Unlimited copy-paste execution | **Enforced** — 198-byte ChaCha20-Poly1305 `pyarmor.rkey` bound to hardware UUID & UTC expiry |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Quickstart Commands
|
|
41
|
+
|
|
42
|
+
### 1. Free Standalone Bundler (`Basic — $0`)
|
|
43
|
+
Use PyKevlar as an ultra-fast single-binary replacement for `PyInstaller` (plain packaging without code obfuscation):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pykevlar build main.py --no-armor -F -O dist
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. Full Anti-Reverse-Engineering + Native C Compilation (`Pro — $39/yr` · `Team — $79/yr`)
|
|
50
|
+
Activate your multi-device subscription key once (works offline on flights & air-gapped networks via Ed25519 signatures):
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pykevlar register "PKA1-..."
|
|
54
|
+
|
|
55
|
+
# Seal Python modules inside ChaCha20 vaults + transpile hot functions to stripped C + Anti-LLM stealth:
|
|
56
|
+
pykevlar build main.py \
|
|
57
|
+
--protect apps \
|
|
58
|
+
--enable-bcc \
|
|
59
|
+
--anti-llm \
|
|
60
|
+
--outer \
|
|
61
|
+
-F -O dist
|
|
62
|
+
|
|
63
|
+
# Mint a per-customer hardware-bound, 365-day runtime key in 6ms (zero binary rebuilds):
|
|
64
|
+
pykevlar key -O dist -b spa-dev-a7256ca34bcac081 -e +365d
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 3. Zero-Docker macOS → Linux Cross-Compilation (`Team — $79/yr`)
|
|
68
|
+
Compile production `linux-x86_64` or `linux-arm64` ELF64 single binaries directly from an Apple Silicon MacBook:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pykevlar build main.py --target linux-x86_64 --enable-bcc --anti-llm -F -O dist-linux
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Plans & Licensing
|
|
77
|
+
|
|
78
|
+
- **Basic ($0 Free)**: Unprotected standalone binary bundling (`--no-armor`), `bench`, `hdinfo`, `cache`, `verify`. *(All anti-reverse-engineering & code obfuscation features require an active Pro or Team subscription.)*
|
|
79
|
+
- **Pro ($39/yr)**: Full 7-layer anti-reverse-engineering, ChaCha20 vaults, `--enable-bcc` C transpiler, `--anti-llm`, customer `--outer` hardware/expiry `rkey` licensing, and **3 developer build devices** (expandable anytime in the [License Portal](https://pykevlar.com/portal)).
|
|
80
|
+
- **Team ($79/yr)**: Everything in Pro + **25 build devices**, unlimited CI/CD & Docker runners (`PYKEVLAR_LICENSE`), zero-Docker macOS → Linux cross-compilation, and 15-core Next.js chunk obfuscation (`pykevlar frontend`).
|
|
81
|
+
|
|
82
|
+
Learn more and get started at **[https://pykevlar.com](https://pykevlar.com/)**.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pykevlar"
|
|
7
|
+
version = "2.0.0"
|
|
8
|
+
description = "28.8x faster Python obfuscator, Anti-LLM/anti-decompiler shield (stops pyinstxtractor, PyLingual, pycdc, GhidraMCP & Frida), hardware licenser, and standalone single-binary compiler."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "LicenseRef-PyKevlar"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "PyKevlar Labs", email = "licenses@pykevlar.com" }
|
|
15
|
+
]
|
|
16
|
+
keywords = [
|
|
17
|
+
"python-obfuscator",
|
|
18
|
+
"pyarmor",
|
|
19
|
+
"pyarmor-alternative",
|
|
20
|
+
"pyinstaller",
|
|
21
|
+
"nuitka",
|
|
22
|
+
"cython",
|
|
23
|
+
"anti-reverse-engineering",
|
|
24
|
+
"anti-decompiler",
|
|
25
|
+
"pyinstxtractor",
|
|
26
|
+
"pylingual",
|
|
27
|
+
"bytecode-encryption",
|
|
28
|
+
"hardware-licensing",
|
|
29
|
+
"standalone-binary",
|
|
30
|
+
"code-protection",
|
|
31
|
+
"anti-debugging"
|
|
32
|
+
]
|
|
33
|
+
classifiers = [
|
|
34
|
+
"Development Status :: 5 - Production/Stable",
|
|
35
|
+
"Environment :: Console",
|
|
36
|
+
"Intended Audience :: Developers",
|
|
37
|
+
"Operating System :: MacOS :: MacOS X",
|
|
38
|
+
"Operating System :: POSIX :: Linux",
|
|
39
|
+
"Programming Language :: C",
|
|
40
|
+
"Programming Language :: Python :: 3",
|
|
41
|
+
"Programming Language :: Python :: 3.10",
|
|
42
|
+
"Programming Language :: Python :: 3.11",
|
|
43
|
+
"Programming Language :: Python :: 3.12",
|
|
44
|
+
"Programming Language :: Python :: 3.13",
|
|
45
|
+
"Programming Language :: Python :: 3.14",
|
|
46
|
+
"Programming Language :: Rust",
|
|
47
|
+
"Topic :: Security :: Cryptography",
|
|
48
|
+
"Topic :: Software Development :: Build Tools",
|
|
49
|
+
"Topic :: Software Development :: Compilers",
|
|
50
|
+
"Topic :: System :: Software Distribution"
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[project.urls]
|
|
54
|
+
Homepage = "https://pykevlar.com/"
|
|
55
|
+
Documentation = "https://pykevlar.com/docs"
|
|
56
|
+
"PyArmor Alternative & Benchmarks" = "https://pykevlar.com/pyarmor-alternative"
|
|
57
|
+
"Anti-Reverse-Engineering Matrix" = "https://pykevlar.com/security"
|
|
58
|
+
"Claude Code & Codex Integration" = "https://pykevlar.com/agents"
|
|
59
|
+
"License & Multi-Device Portal" = "https://pykevlar.com/portal"
|
|
60
|
+
"Engineering Blog" = "https://pykevlar.com/blog"
|
|
61
|
+
|
|
62
|
+
[project.scripts]
|
|
63
|
+
pykevlar = "pykevlar._cli:main"
|
|
64
|
+
|
|
65
|
+
[tool.setuptools]
|
|
66
|
+
package-dir = {"" = "src"}
|
|
67
|
+
include-package-data = true
|
|
68
|
+
|
|
69
|
+
[tool.setuptools.packages.find]
|
|
70
|
+
where = ["src"]
|
|
71
|
+
|
|
72
|
+
[tool.setuptools.package-data]
|
|
73
|
+
pykevlar = ["bin/*"]
|
pykevlar-2.0.0/setup.cfg
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Native binary locator and sdist fallback fetcher for the standalone Rust+C `pykevlar` CLI."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import hashlib
|
|
6
|
+
import io
|
|
7
|
+
import os
|
|
8
|
+
import platform
|
|
9
|
+
import stat
|
|
10
|
+
import sys
|
|
11
|
+
import tarfile
|
|
12
|
+
import urllib.request
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
VERSION = "2.0.0"
|
|
16
|
+
RELEASE_BASE = os.environ.get("PYKEVLAR_RELEASE_CDN", "https://releases.pykevlar.com/latest")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _detect_target_triple() -> str:
|
|
20
|
+
sys_name = platform.system().lower()
|
|
21
|
+
machine = platform.machine().lower()
|
|
22
|
+
if sys_name == "darwin" and machine in ("arm64", "aarch64"):
|
|
23
|
+
return "aarch64-apple-darwin"
|
|
24
|
+
if sys_name == "darwin" and machine in ("x86_64", "amd64"):
|
|
25
|
+
return "x86_64-apple-darwin"
|
|
26
|
+
if sys_name == "linux" and machine in ("x86_64", "amd64"):
|
|
27
|
+
return "x86_64-unknown-linux-gnu"
|
|
28
|
+
if sys_name == "linux" and machine in ("arm64", "aarch64"):
|
|
29
|
+
return "aarch64-unknown-linux-gnu"
|
|
30
|
+
raise RuntimeError(
|
|
31
|
+
f"Unsupported platform ({sys_name}/{machine}). Visit https://pykevlar.com/docs for supported targets."
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _ensure_executable(path: Path) -> Path:
|
|
36
|
+
mode = path.stat().st_mode
|
|
37
|
+
if not (mode & stat.S_IXUSR):
|
|
38
|
+
path.chmod(mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
|
39
|
+
return path
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _download_verified_binary() -> Path:
|
|
43
|
+
triple = _detect_target_triple()
|
|
44
|
+
cache_dir = Path(os.environ.get("PYKEVLAR_CACHE_DIR", Path.home() / ".cache" / "pykevlar" / f"v{VERSION}" / triple))
|
|
45
|
+
bin_path = cache_dir / "pykevlar"
|
|
46
|
+
if bin_path.is_file():
|
|
47
|
+
return _ensure_executable(bin_path)
|
|
48
|
+
|
|
49
|
+
tar_name = f"pykevlar-{triple}.tar.gz"
|
|
50
|
+
tar_url = f"{RELEASE_BASE}/{tar_name}"
|
|
51
|
+
sha_url = f"{tar_url}.sha256"
|
|
52
|
+
|
|
53
|
+
sys.stderr.write(f"[pykevlar] Fetching native binary {tar_name} from {RELEASE_BASE}...\n")
|
|
54
|
+
with urllib.request.urlopen(sha_url, timeout=20) as r:
|
|
55
|
+
expected_sha = r.read().decode("utf-8").strip().split()[0].lower()
|
|
56
|
+
with urllib.request.urlopen(tar_url, timeout=60) as r:
|
|
57
|
+
tar_bytes = r.read()
|
|
58
|
+
|
|
59
|
+
actual_sha = hashlib.sha256(tar_bytes).hexdigest().lower()
|
|
60
|
+
if actual_sha != expected_sha:
|
|
61
|
+
raise RuntimeError(f"SHA-256 mismatch for {tar_url}: expected {expected_sha}, got {actual_sha}")
|
|
62
|
+
|
|
63
|
+
cache_dir.mkdir(parents=True, exist_ok=True)
|
|
64
|
+
with tarfile.open(fileobj=io.BytesIO(tar_bytes), mode="r:gz") as tf:
|
|
65
|
+
for member in tf.getmembers():
|
|
66
|
+
if Path(member.name).name == "pykevlar" and member.isfile():
|
|
67
|
+
extracted = tf.extractfile(member)
|
|
68
|
+
if extracted is None:
|
|
69
|
+
continue
|
|
70
|
+
tmp_path = cache_dir / "pykevlar.tmp"
|
|
71
|
+
tmp_path.write_bytes(extracted.read())
|
|
72
|
+
_ensure_executable(tmp_path)
|
|
73
|
+
tmp_path.replace(bin_path)
|
|
74
|
+
return bin_path
|
|
75
|
+
|
|
76
|
+
raise RuntimeError(f"Archive {tar_name} did not contain `pykevlar` binary")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def get_binary_path() -> Path:
|
|
80
|
+
bundled = Path(__file__).resolve().parent / "bin" / "pykevlar"
|
|
81
|
+
if bundled.is_file():
|
|
82
|
+
return _ensure_executable(bundled)
|
|
83
|
+
return _download_verified_binary()
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def main(argv: list[str] | None = None) -> int:
|
|
87
|
+
bin_path = get_binary_path()
|
|
88
|
+
args = sys.argv[1:] if argv is None else list(argv)
|
|
89
|
+
os.execv(str(bin_path), [str(bin_path), *args])
|
|
90
|
+
return 0
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pykevlar
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: 28.8x faster Python obfuscator, Anti-LLM/anti-decompiler shield (stops pyinstxtractor, PyLingual, pycdc, GhidraMCP & Frida), hardware licenser, and standalone single-binary compiler.
|
|
5
|
+
Author-email: PyKevlar Labs <licenses@pykevlar.com>
|
|
6
|
+
License-Expression: LicenseRef-PyKevlar
|
|
7
|
+
Project-URL: Homepage, https://pykevlar.com/
|
|
8
|
+
Project-URL: Documentation, https://pykevlar.com/docs
|
|
9
|
+
Project-URL: PyArmor Alternative & Benchmarks, https://pykevlar.com/pyarmor-alternative
|
|
10
|
+
Project-URL: Anti-Reverse-Engineering Matrix, https://pykevlar.com/security
|
|
11
|
+
Project-URL: Claude Code & Codex Integration, https://pykevlar.com/agents
|
|
12
|
+
Project-URL: License & Multi-Device Portal, https://pykevlar.com/portal
|
|
13
|
+
Project-URL: Engineering Blog, https://pykevlar.com/blog
|
|
14
|
+
Keywords: python-obfuscator,pyarmor,pyarmor-alternative,pyinstaller,nuitka,cython,anti-reverse-engineering,anti-decompiler,pyinstxtractor,pylingual,bytecode-encryption,hardware-licensing,standalone-binary,code-protection,anti-debugging
|
|
15
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
16
|
+
Classifier: Environment :: Console
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Programming Language :: C
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
|
+
Classifier: Programming Language :: Rust
|
|
28
|
+
Classifier: Topic :: Security :: Cryptography
|
|
29
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
30
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
31
|
+
Classifier: Topic :: System :: Software Distribution
|
|
32
|
+
Requires-Python: >=3.9
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# PyKevlar — Python Obfuscator, Anti-Decompiler & Single-Binary Compiler
|
|
38
|
+
|
|
39
|
+
**[Official Website](https://pykevlar.com/)** · **[PyArmor Comparison & Benchmarks](https://pykevlar.com/pyarmor-alternative)** · **[Anti-Reverse-Engineering Threat Matrix](https://pykevlar.com/security)** · **[Production Docs](https://pykevlar.com/docs)** · **[Claude Code & Codex (`/llms.txt`)](https://pykevlar.com/agents)** · **[License Portal](https://pykevlar.com/portal)**
|
|
40
|
+
|
|
41
|
+
**PyKevlar** (`pykevlar`) is a 15-core parallel Rust + Native C Python release compiler, hardware-locked licensing engine, and anti-reverse-engineering suite for **Python 3.12–3.14**.
|
|
42
|
+
|
|
43
|
+
Standard PyInstaller executables unpack in under five seconds using `pyinstxtractor` and neural decompilers like `PyLingual` or `pycdc`. PyKevlar replaces fragile two-step `PyArmor + PyInstaller` scripts with a **single native binary** that compiles **28.8× faster** (31.0s → **1.08s** cold build on 802 modules) with **zero runtime Python dependencies**.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Install
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install pykevlar
|
|
51
|
+
# or via uv:
|
|
52
|
+
uv tool install pykevlar
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Verify installation:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pykevlar --version
|
|
59
|
+
pykevlar hdinfo
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## How PyKevlar Stops Modern Python Reverse Engineering
|
|
65
|
+
|
|
66
|
+
| Reverse-Engineering Tool / Attack Vector | Plain PyInstaller | PyKevlar (Pro & Team) |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| **`pyinstxtractor` / `binwalk` archive extraction** | Extracts all `.pyc` files in ~2s | **Blocked** — `SPZ2` stream-encrypted container eliminates `MEI` & `zlib` magic headers |
|
|
69
|
+
| **`PyLingual` / `pycdc` / `uncompyle6` bytecode decompilers** | Recovers ~99% readable `.py` source | **Blocked** — per-function ChaCha20-Poly1305 Vectorcall Vaults; zero plaintext bytecode at rest |
|
|
70
|
+
| **`GhidraMCP` / `REA` / `IDA` autonomous LLM agents** | Summarizes symbols & C control flow | **Defeated** — `--anti-llm` CREAM AST identifier stripping, 64-bit MBA predicates & crypto honey-keys |
|
|
71
|
+
| **`Frida` / `sys.settrace` / Python 3.12+ PEP 669 `sys.monitoring`** | Dumps decrypted frames at runtime | **Blocked** — C-level vectorcall dispatch & active PEP 669 / debugger / `LD_PRELOAD` traps |
|
|
72
|
+
| **Unlicensed server copying & expired on-prem trials** | Unlimited copy-paste execution | **Enforced** — 198-byte ChaCha20-Poly1305 `pyarmor.rkey` bound to hardware UUID & UTC expiry |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Quickstart Commands
|
|
77
|
+
|
|
78
|
+
### 1. Free Standalone Bundler (`Basic — $0`)
|
|
79
|
+
Use PyKevlar as an ultra-fast single-binary replacement for `PyInstaller` (plain packaging without code obfuscation):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pykevlar build main.py --no-armor -F -O dist
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 2. Full Anti-Reverse-Engineering + Native C Compilation (`Pro — $39/yr` · `Team — $79/yr`)
|
|
86
|
+
Activate your multi-device subscription key once (works offline on flights & air-gapped networks via Ed25519 signatures):
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pykevlar register "PKA1-..."
|
|
90
|
+
|
|
91
|
+
# Seal Python modules inside ChaCha20 vaults + transpile hot functions to stripped C + Anti-LLM stealth:
|
|
92
|
+
pykevlar build main.py \
|
|
93
|
+
--protect apps \
|
|
94
|
+
--enable-bcc \
|
|
95
|
+
--anti-llm \
|
|
96
|
+
--outer \
|
|
97
|
+
-F -O dist
|
|
98
|
+
|
|
99
|
+
# Mint a per-customer hardware-bound, 365-day runtime key in 6ms (zero binary rebuilds):
|
|
100
|
+
pykevlar key -O dist -b spa-dev-a7256ca34bcac081 -e +365d
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 3. Zero-Docker macOS → Linux Cross-Compilation (`Team — $79/yr`)
|
|
104
|
+
Compile production `linux-x86_64` or `linux-arm64` ELF64 single binaries directly from an Apple Silicon MacBook:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pykevlar build main.py --target linux-x86_64 --enable-bcc --anti-llm -F -O dist-linux
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Plans & Licensing
|
|
113
|
+
|
|
114
|
+
- **Basic ($0 Free)**: Unprotected standalone binary bundling (`--no-armor`), `bench`, `hdinfo`, `cache`, `verify`. *(All anti-reverse-engineering & code obfuscation features require an active Pro or Team subscription.)*
|
|
115
|
+
- **Pro ($39/yr)**: Full 7-layer anti-reverse-engineering, ChaCha20 vaults, `--enable-bcc` C transpiler, `--anti-llm`, customer `--outer` hardware/expiry `rkey` licensing, and **3 developer build devices** (expandable anytime in the [License Portal](https://pykevlar.com/portal)).
|
|
116
|
+
- **Team ($79/yr)**: Everything in Pro + **25 build devices**, unlimited CI/CD & Docker runners (`PYKEVLAR_LICENSE`), zero-Docker macOS → Linux cross-compilation, and 15-core Next.js chunk obfuscation (`pykevlar frontend`).
|
|
117
|
+
|
|
118
|
+
Learn more and get started at **[https://pykevlar.com](https://pykevlar.com/)**.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/pykevlar/__init__.py
|
|
5
|
+
src/pykevlar/__main__.py
|
|
6
|
+
src/pykevlar/_cli.py
|
|
7
|
+
src/pykevlar.egg-info/PKG-INFO
|
|
8
|
+
src/pykevlar.egg-info/SOURCES.txt
|
|
9
|
+
src/pykevlar.egg-info/dependency_links.txt
|
|
10
|
+
src/pykevlar.egg-info/entry_points.txt
|
|
11
|
+
src/pykevlar.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pykevlar
|