PyProtect-v3 3.2.1__tar.gz → 3.2.2__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.
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/PKG-INFO +1 -1
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/PyProtect_v3.egg-info/PKG-INFO +1 -1
- pyprotect_v3-3.2.2/pyprotect/_version.py +1 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyprotect/engine.c +12 -2
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyprotect/obfuscator.py +0 -16
- pyprotect_v3-3.2.1/pyprotect/_version.py +0 -1
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/MANIFEST.in +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/PyProtect_v3.egg-info/SOURCES.txt +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/PyProtect_v3.egg-info/dependency_links.txt +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/PyProtect_v3.egg-info/entry_points.txt +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/PyProtect_v3.egg-info/requires.txt +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/PyProtect_v3.egg-info/top_level.txt +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/README.md +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyproject.toml +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyprotect/__init__.py +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyprotect/__main__.py +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyprotect/anti_debug.py +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyprotect/crypto.py +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyprotect/engine.py +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/pyprotect/hooks.py +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/setup.cfg +0 -0
- {pyprotect_v3-3.2.1 → pyprotect_v3-3.2.2}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.2.2"
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
#include <openssl/err.h>
|
|
45
45
|
#endif
|
|
46
46
|
|
|
47
|
+
/* Suppress unused-parameter warnings for standard module functions */
|
|
48
|
+
#ifdef __GNUC__
|
|
49
|
+
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
|
50
|
+
#endif
|
|
51
|
+
|
|
47
52
|
#include <zlib.h>
|
|
48
53
|
|
|
49
54
|
/* Constants */
|
|
@@ -65,9 +70,11 @@ static const unsigned char EMBEDDED_KEY[32] = {
|
|
|
65
70
|
|
|
66
71
|
/* ------------------------------------------------------------------ */
|
|
67
72
|
/* Embedded AES-256-GCM implementation (public domain) */
|
|
68
|
-
/*
|
|
73
|
+
/* Only compiled when OpenSSL is not available */
|
|
69
74
|
/* ------------------------------------------------------------------ */
|
|
70
75
|
|
|
76
|
+
#if defined(USE_EMBEDDED_AES)
|
|
77
|
+
|
|
71
78
|
static const uint8_t aes_sbox[256] = {
|
|
72
79
|
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
|
|
73
80
|
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
|
|
@@ -252,6 +259,8 @@ static int aes_gcm_decrypt(const uint8_t *key, int key_len,
|
|
|
252
259
|
return (int)ct_len;
|
|
253
260
|
}
|
|
254
261
|
|
|
262
|
+
#endif /* USE_EMBEDDED_AES */
|
|
263
|
+
|
|
255
264
|
/* ------------------------------------------------------------------ */
|
|
256
265
|
/* Anti-debug */
|
|
257
266
|
/* ------------------------------------------------------------------ */
|
|
@@ -798,7 +807,8 @@ static PyMethodDef EngineMethods[] = {
|
|
|
798
807
|
static struct PyModuleDef enginemodule = {
|
|
799
808
|
PyModuleDef_HEAD_INIT, "engine_c",
|
|
800
809
|
"pyprotect-v4 engine - frame hook, anti-tamper, anti-dump",
|
|
801
|
-
-1, EngineMethods
|
|
810
|
+
-1, EngineMethods,
|
|
811
|
+
NULL, NULL, NULL, NULL
|
|
802
812
|
};
|
|
803
813
|
|
|
804
814
|
PyMODINIT_FUNC PyInit_engine_c(void) {
|
|
@@ -10,7 +10,6 @@ import marshal
|
|
|
10
10
|
import types
|
|
11
11
|
import random
|
|
12
12
|
import string
|
|
13
|
-
import shutil
|
|
14
13
|
import ast
|
|
15
14
|
import base64
|
|
16
15
|
|
|
@@ -392,9 +391,6 @@ class Obfuscator:
|
|
|
392
391
|
with open(out_path, "w", encoding="utf-8") as f:
|
|
393
392
|
f.write(bootstrap_source)
|
|
394
393
|
|
|
395
|
-
# Copy engine if available
|
|
396
|
-
self._copy_engine(output_dir)
|
|
397
|
-
|
|
398
394
|
print(f"[+] Generated multi-module bootstrap: {out_path}")
|
|
399
395
|
print(f"[!] Run: python {out_path}")
|
|
400
396
|
print(f"[!] Or import it from another script")
|
|
@@ -426,15 +422,3 @@ class Obfuscator:
|
|
|
426
422
|
os.chmod(stub_path, 0o755)
|
|
427
423
|
|
|
428
424
|
return stub_path
|
|
429
|
-
|
|
430
|
-
def _copy_engine(self, output_dir: str):
|
|
431
|
-
"""Copy compiled C extension next to output if available."""
|
|
432
|
-
engine_dir = os.path.dirname(os.path.abspath(__file__))
|
|
433
|
-
for fname in os.listdir(engine_dir):
|
|
434
|
-
if fname.startswith("engine_c") and (
|
|
435
|
-
fname.endswith(".so") or fname.endswith(".pyd") or fname.endswith(".dll")
|
|
436
|
-
):
|
|
437
|
-
try:
|
|
438
|
-
shutil.copy2(os.path.join(engine_dir, fname), os.path.join(output_dir, fname))
|
|
439
|
-
except (shutil.Error, OSError):
|
|
440
|
-
pass
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.2.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|