Commit graph

251 commits

Author SHA1 Message Date
Eloïse Brocas
6ad9d4b2cd
Merge branch 'master' into dev 2026-05-26 17:16:54 +02:00
Eloïse Brocas
3359033d91
add RERAISE support for python 3.9
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-05-26 16:30:07 +02:00
daiche330-png
413fbd83c9 Support Python 3.11 exception table try/except flow 2026-04-06 09:30:16 +09:00
daiche330-png
0b1f7cf070 Handle Python 3.11 exception opcodes in AST builder 2026-04-05 22:13:27 +09:00
Eloïse Brocas
81082bb2e8
decompilation: support unpacking for all node types
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:14 +01:00
Eloïse Brocas
bd288c8d9b
list_extend opcode: support calls of function inside list extension
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:14 +01:00
Eloïse Brocas
d35347e569
add support of jump_if_not_exc_match and reraise
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:14 +01:00
Eloïse Brocas
c27bdd1659
create a dedicated object for exception blocks
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:13 +01:00
Eloïse Brocas
31b84750cb
add load_assert_error support
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:13 +01:00
Eloïse Brocas
8006f941c0
add unpack_ex opcode support 2026-03-06 17:03:13 +01:00
Eloïse Brocas
b14e4f7fcc
add DICT_MERGE and CALL_FUNCTION_EX operand support
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
2026-03-06 17:03:12 +01:00
Eloïse Brocas
b965c94ca6
add MAP_ADD operand support 2026-03-06 17:03:07 +01:00
Eloïse Brocas
b6349bea68
add support of dict comprehension 2025-12-16 14:37:02 +01:00
Eloïse Brocas
271e14f46c
add LIST_TO_TUPLE operand support 2025-12-12 17:48:28 +01:00
Sahil Jain
4ea662d802
Merge branch 'master' into try 2025-08-31 02:40:50 +00:00
Michael Hansen
577720302e Add basic protection aginst circular references in pycdas and pycdc.
This fixes the last case of fuzzer errors detected by #572.
2025-08-28 16:42:03 -07:00
Michael Hansen
0e7be40367 Add some extra guards against null dereference and empty std::stack pops
Fixes segfault cases of #572
2025-08-28 15:36:35 -07:00
Sahil Jain
6568907236
Resolve comments on PR 2025-07-14 11:51:40 +05:30
Sahil Jain
8c9e56046c
Support new opcodes 2025-07-13 21:40:59 +05:30
Sahil Jain
8b0ea9450e
Fix RAISE_VARARGS bug 2025-07-04 19:16:04 +05:30
Michael Hansen
e64ea4bdec
Merge branch 'master' into new-opcodes 2025-07-02 07:56:28 -07:00
Sahil Jain
6e0089e01c
Update 2025-07-01 22:52:59 +05:30
Sahil Jain
5fe61462a2
Support COPY opcde 2025-07-01 09:25:49 +05:30
Sahil Jain
ad5f39db56
Support SLICE opcodes 2025-07-01 09:24:53 +05:30
Sahil Jain
97ec04789d
Add JUMP_BACKWARD + CACHE comments 2025-07-01 09:22:57 +05:30
Sahil Jain
6dae4e801f
Remove COPY opcode 2025-07-01 09:22:57 +05:30
Sahil Jain
040732920b
Add comment 2025-07-01 09:22:57 +05:30
Sahil Jain
a93fd14672
Add new loop tests 2025-07-01 09:22:57 +05:30
Sahil Jain
a4a6a24f3e
Support END_FOR opcode 2025-07-01 09:22:56 +05:30
samy kamkar
bbc19885f4 show INVALID opcode properly if < 0 2024-10-12 13:45:16 -07:00
Michael Hansen
b939aeb87c Update operand documentation for new opcodes and oparg changes.
Also extends the disassembly oparg decoding for new 3.13 additions.
2024-08-07 15:44:36 -07:00
Michael Hansen
48d1bfa59f Fix a null dereference.
Fixes #486
2024-08-06 08:21:12 -07:00
Michael Hansen
0b45b5fa07 Fix FORMAT_VALUE for values that have both a conversion and a format_spec.
Also output the conversion and flags in disassembly.
2024-08-01 13:28:43 -07:00
easyz
6ad3ceb67e
Add support for swap bytecode and simple WITH_EXCEPT_START bytecode support. (#488)
* Modify .gitignore

* Added support for SWAP and WITH_EXCEPT_START, WITH_EXCEPT_START is simply added on top of SETUP_WITH_A so that it works properly.

* Resolve the warning about comparing size_t and int.

* Revert "Resolve the warning about comparing size_t and int."

This reverts commit 54dfe36629.

* Reapply "Resolve the warning about comparing size_t and int."

This reverts commit d21d1681ed.

* Modify decompyle_test.sh

* Modify .gitignore

* Fix the logic error by placing the assignment inside the tuple

* Re-adding test files

* Fixing redundant brackets

* Add support for swap bytecode and simple WITH_EXCEPT_START bytecode support.

* Clean up some formatting issues

---------

Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2024-06-23 11:59:30 -07:00
Alex
8367a8e0ab Return back a fix for Centos6/7 compilation issues not related to shadow ones 2024-03-12 22:58:43 +02:00
Alex
68a697dfc1 Revert "Fix for Centos6/7 compilation issues"
This reverts commit f80b662f77.
2024-03-12 22:38:03 +02:00
Alex
f80b662f77 Fix for Centos6/7 compilation issues 2024-03-08 14:27:36 +02:00
Michael Hansen
1f30136e21 Merge branch 'master' of github.com:ncaklovic/pycdc 2024-02-28 15:43:58 -08:00
Michael Hansen
8e48bf2194
Merge pull request #462 from greenozon/master
Aligning some opcodes for Python 3.11, 3.12: LOAD_GLOBAL, LOAD_ATTR
2024-02-28 15:40:02 -08:00
ncaklovic
32c1ca10bb
Update ASTree.cpp
Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2024-02-28 12:34:32 +01:00
Alex
035f963f3d Aligning some opcodes for Python 3.11, 3.12: LOAD_GLOBAL, LOAD_ATTR 2024-02-27 23:12:03 +02:00
MrDakik
e8be65b2f3 add support for WITH_CLEANUP_START,WITH_CLEANUP_FINISH 2024-02-27 10:54:07 +02:00
MrDakik
00d4b02d1e Added support for LOAD_CLASSDEREF
The opcode itself is exactly the same as `LOAD_DEREF`
1) The problem is when the class is a closure (e.g. defined inside a function body) then there is a `BUILD_TUPLE` after the `LOAD_BUILD_CLASS` which makes problems.
2) There is another problem which makes the `code->name()` of the class to be part of the function locals. (e.g. `func.<locals>.my_class` instead of `my_class`) which makes the check `srcString->isEqual(code->name().cast<PycObject>())` be invalid.
2024-02-26 16:52:31 +02:00
Michael Hansen
787090e0a5 Merge github.com:kako57/pycdc 2024-02-14 21:31:17 -08:00
Nenad Čaklović
5f225caf52 LOAD_ATTR operand changes in 3.12 2024-01-05 21:32:53 +01:00
Nenad Čaklović
830dd13228 COMPARE_OP operand changes in 3.12 2024-01-04 23:49:07 +01:00
Michael Hansen
9c00554efb Add basic support for some Instrumented opcodes which should match their
non-instrumented versions.
2023-11-18 17:59:24 -08:00
Jack
5936412a6f
fix #396 Unsupported Node type: 27 (#397)
* fix #396 Unsupported Node type: 27

* Add test file

* Modify a little comment

* Modify the test pyc file name

* Delete redundant pyc files

* retest

* Add newline at EOF

---------

Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2023-11-11 10:22:49 -08:00
Michael Hansen
9b384ad1fa Add basic bytecode and disassembly support for Python 3.12 2023-11-09 12:17:03 -08:00
TheHellTower
b32f231e33 Add GEN_START support (#392)
* Apparently should be enough ?

* Add `GEN_START` test

* Add `GEN_START` test compiled

* Add `GEN_START` test tokenized

* Smaller test since only POP is needed.

* Smaller test since only POP is needed.

* Smaller test since only POP is needed.

* dos2unix
2023-10-20 13:43:14 -07:00