Open motebaya opened 1 year ago
Hey, sorry to hear that you couldn't make it work for Python 2.7. Currently, I'm not planning on adding support for 2.7 but some things that you could try: dump the code object through sys._getframe, and reverse engineer the pytransform.dll
to remove the bootstrap restrict mode, it will likely look different to the 3.x dll's. run.py
should look very similar though.
Hey, sorry to hear that you couldn't make it work for Python 2.7. Currently, I'm not planning on adding support for 2.7 but some things that you could try: dump the code object through sys._getframe, and reverse engineer the
pytransform.dll
to remove the bootstrap restrict mode, it will likely look different to the 3.x dll's.run.py
should look very similar though.
i also ever try it to edit Cpython 2.7 source for dumping marshal to file,.. but that' don't have any effect.. and when i trying with python3+ it's working,.. so i think the both of that python version have some different. yahhh and i don't know where their difference 🤦
and u say using sys._getframe
to dump decrypted opcode in memory.. , example i have file with one function and the function have one required argument to call it..
so i'm trying to call again the function from file code.py
with inject dll method,. .. and my question., where i can get decrypted opcode after call it?
Using sys._getframe
you will get the encrypted code objects (only the ones that are running at the point of injecting will be decrypted), but using the bypass restrict mode you'll still be able to run it just fine
If you ended up getting this working I would appreciate the code. I'm currently trying the same thing as you and running into this issue.
Can u make it this for python 2.7 ? i'm trying to modify method 1 with change non existing function, e.g Signature/Parameter class. on python2.7 don't have it .. i change using funcsigs also add apply_defaults to funcsigs module ...
but still not working ,show error when call function
find_first_opcode
this code: