commit: ca2c7ff1a203c8bd0a6e45d7513b9f51fbe22c06
parent a04d22c23b517acb946fe9b388d85602a0214dec
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 14 Oct 2025 23:51:26 +0200
Add support for python3.13 and python3.14 pyc files
Diffstat:
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
@@ -22,7 +22,7 @@ Signify public keys at <https://distfiles.hacktivis.me/releases/signify/>
### tests
- `ar`
- C Compiler
-- [deblob-test](https://hacktivis.me/git/deblob-test/) either as submodule or tarball version 0.11
+- [deblob-test](https://hacktivis.me/git/deblob-test/) either as submodule or tarball version 0.12
### linting
Those are only needed during development.
diff --git a/deblob.1 b/deblob.1
@@ -94,7 +94,7 @@ Java Class files and Archives (JAR)
.It
Mach-O executables
.It
-Python 2.7 & 3.8/3.9/3.10/3.11/3.12 bytecode files, typically
+Python 2.7, and 3.8 to 3.14 bytecode files, typically
.Sq *.pyc
.It
Python pickle files, used to serialize Python objects
diff --git a/main.ha b/main.ha
@@ -34,11 +34,13 @@ const magic: [_](str, []u8) = [
// Python *.pyc bytecode magic numbers (defined in importlib/_bootstrap_external.py)
("Python pyc 2.7", [0x03, 0xF3, '\r', '\n']), // (62211i little-endian)
- ("Python pyc 3.8", [0x55, 0x0D, '\r', '\n']), // (3413i litte-endian)
- ("Python pyc 3.9", [0x61, 0x0D, '\r', '\n']), // (3425i litte-endian)
- ("Python pyc 3.10", [0x6F, 0x0D, '\r', '\n']), // (3439i litte-endian)
- ("Python pyc 3.11", [0xA7, 0x0D, '\r', '\n']), // (3495i litte-endian)
- ("Python pyc 3.12", [0xCB, 0x0D, '\r', '\n']), // (3531i litte-endian)
+ ("Python pyc 3.8", [0x55, 0x0D, '\r', '\n']), // (3413i little-endian)
+ ("Python pyc 3.9", [0x61, 0x0D, '\r', '\n']), // (3425i little-endian)
+ ("Python pyc 3.10", [0x6F, 0x0D, '\r', '\n']), // (3439i little-endian)
+ ("Python pyc 3.11", [0xA7, 0x0D, '\r', '\n']), // (3495i little-endian)
+ ("Python pyc 3.12", [0xCB, 0x0D, '\r', '\n']), // (3531i little-endian)
+ ("Python pyc 3.13", [0xF3, 0x0D, '\r', '\n']), // (3571i little-endian)
+ ("Python pyc 3.14", [0x2B, 0x0E, '\r', '\n']), // (3627i little-endian)
// Python pickle object data, similarly to Perl Storage it's dangerous enough to cause code execution
("Python Pickle v2", [0x80, 0x02]), // Protocol 2 + start of frame
("Python Pickle v3", [0x80, 0x03]), // Protocol 3 + start of frame