From 1a2670ac976087e8a11c60fad02a6d12dd90079e Mon Sep 17 00:00:00 2001 From: Arusekk Date: Wed, 2 Dec 2020 21:53:50 +0100 Subject: [PATCH 1/2] Add cpython 3.9 constant opcodes to safeeval Closes #1734 --- pwnlib/util/safeeval.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pwnlib/util/safeeval.py b/pwnlib/util/safeeval.py index ae257916d..d697629f0 100644 --- a/pwnlib/util/safeeval.py +++ b/pwnlib/util/safeeval.py @@ -3,7 +3,9 @@ _const_codes = [ 'POP_TOP','ROT_TWO','ROT_THREE','ROT_FOUR','DUP_TOP', 'BUILD_LIST','BUILD_MAP','BUILD_TUPLE','BUILD_SET', - 'LOAD_CONST','RETURN_VALUE','STORE_SUBSCR', 'STORE_MAP' + 'BUILD_CONST_KEY_MAP', 'BUILD_STRING', + 'LOAD_CONST','RETURN_VALUE','STORE_SUBSCR', 'STORE_MAP', + 'LIST_TO_TUPLE', 'LIST_EXTEND', 'SET_UPDATE', 'DICT_UPDATE', 'DICT_MERGE', ] _expr_codes = _const_codes + [ From 162ee6e288d3160f4c7b011c653e7e65322dfb1f Mon Sep 17 00:00:00 2001 From: Arusekk Date: Wed, 2 Dec 2020 22:01:41 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a44e15392..5281d12a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,9 +60,11 @@ The table below shows which release corresponds to each branch, and what date th - [#1261][1261] Misc `run_in_new_terminal` improvements (notably gdb terminated by default) - [#1695][1695] Allow using GDB Python API +- [#1735][1735] Python 3.9 support in safeeval [1261]: https://github.com/Gallopsled/pwntools/pull/1261 [1695]: https://github.com/Gallopsled/pwntools/pull/1695 +[1735]: https://github.com/Gallopsled/pwntools/pull/1735 ## 4.4.0 (`beta`)