I decided it was time that there was a proper PyArmor unpacker released. All the ones that currently are public are either outdated, not working at all or only giving partial output. I plan on making this one support the latest version of PyArmor.
Please star the repository if you found it helpful. I'd really appreciate it.
How to use it
There are 3 different methods for unpacking PyArmor, in the methods folder in this repository you will find all the files needed for each method. Below you will find a detailed write-up on how I started all the way to the end product. I hope more people actually understand how it works this way rather than just using the tool.
Known issues
This is a list of all the known issues/missing features.
I don't have enough time to fix them myself so I am heavily relying on contributors.
Issues:
Unsafe way of stopping the second marshal.loads trigger (see write-up)
Async code objects don't get invoked correctly -> programs like discord bots can't be unpacked
~From Python 3.10 and higher the absolute jump indexes have been divided by 2 to save storage, we have to add support for that.~ Fixed by issue #3
In the dumps directory you can find the fully unpacked .pyc file.
(Optional) Use a decompiler to get the Python source back, since currently 3.9.7 is the minimum version you will have to use: https://github.com/zrax/pycdc
Method #3
NOTE: Don't use the static unpacker for anything below version 3.9.7, The marshal.loads audit log was only added in and after 3.9.7.
✅以上内容均来自网友转发或原创,如存在侵权请发送到站方邮件9003554@qq.com处理。
✅The above content is forwarded or original by netizens. If there is infringement, please send the email to the destination 9003554@qq.com handle.