python-xdis
python-xdis copied to clipboard
Python cross-version bytecode library and disassembler
Hi, I'm currently trying to extract the bytecode, edit a few strings and assemble it back to a .pyc file. Pydisasm without any flags work just fine but as soon...
This is my attempt at implementing the fix to the issue discussed in https://github.com/rocky/python-xdis/issues/58 It does seem to work but there are four things I would like to discuss: 1....
In [stackoverflow](https://stackoverflow.com/questions/17737579/how-can-i-create-a-pyc-file-from-a-function), there is the code: ``` import xdis from xdis import PYTHON3 from xdis.magics import magics from xdis.marsh import dumps from struct import pack import time def write_pycfile(pyc_file, code_list,...
Right now xdis needs to be update every time a new Python release comes out. This is by design because we do want to have this program be a reference...
Part of a more general things to validate bytecode. Some discussion is in https://github.com/rocky/python-uncompyle6/issues/320 See also rocky/python-xdis#59
Continuing the discussion from here: https://github.com/rocky/python-uncompyle6/issues/312 @rocky directed me to post here instead. It's possible to easily fool a lot of decompilers by renaming variables to names containing whitespace. For...
Although we want `has_stdarg` in the underlying bytecode instruction, in in `std.Instruction()` it shouldn't be passed as a parameter but computed based on the opc, e.g. `has_arg = opname >=...
There are a number of standard tests which are interesting and should be added: https://github.com/python/cpython/blob/master/Lib/test/test_dis.py I also have some tests which from my now abandoned backports.dis project which may be...
## Description Request to please issue a release of xdis, particularly since the latest in master can be installed on systems using Python 3.11 and 3.12 ## Priority Believe this...