Svenskithesource / PyArmor-Unpacker

A deobfuscator for PyArmor.
GNU General Public License v3.0
536 stars 75 forks source link

OverflowError: int too big to convert how can fix it ? #46

Open mina250 opened 1 year ago

mina250 commented 1 year ago

Creating dump folder Done, loading the encrypted code object Code object successfully loaded, decrypting and removing pyarmor from it now Traceback (most recent call last): File "C:\Users\mina\Desktop\New folder (4)\PyArmor_Unpacker_Bypass\bypass.py", line 423, in log code = output_code(code) File "C:\Users\mina\Desktop\New folder (4)\PyArmor_Unpacker_Bypass\bypass.py", line 213, in output_code co_consts=tuple(output_code(name) for name in obj.co_consts) File "C:\Users\mina\Desktop\New folder (4)\PyArmor_Unpacker_Bypass\bypass.py", line 213, in co_consts=tuple(output_code(name) for name in obj.co_consts) File "C:\Users\mina\Desktop\New folder (4)\PyArmor_Unpacker_Bypass\bypass.py", line 213, in output_code co_consts=tuple(output_code(name) for name in obj.co_consts) File "C:\Users\mina\Desktop\New folder (4)\PyArmor_Unpacker_Bypass\bypass.py", line 213, in co_consts=tuple(output_code(name) for name in obj.co_consts) File "C:\Users\mina\Desktop\New folder (4)\PyArmor_Unpacker_Bypass\bypass.py", line 225, in output_code obj = handle_armor_enter(obj) File "C:\Users\mina\Desktop\New folder (4)\PyArmor_Unpacker_Bypass\bypass.py", line 232, in handle_armor_enter load_enter_function = b"".join( File "C:\Users\mina\Desktop\New folder (4)\PyArmor_Unpacker_Bypass\bypass.py", line 233, in i.to_bytes(1, byteorder="big") OverflowError: int too big to convert

mina250 commented 1 year ago

method 3

Svenskithesource commented 1 year ago

What python version?

mina250 commented 1 year ago

3.10

mina250 commented 1 year ago

I tried a small program and it worked fine

But the program is very large and does not work. Could this be the cause of the problem?

mina250 commented 1 year ago

C:\Users\x\Desktop\New folder (6)>run.py out.py [+] _pytransform.dll loaded at 0x70a00000 [+] Setting memory permissions [+] Patching bootstrap restrict mode [+] Restoring memory permission [+] All done! Pyarmor bootstrap restrict mode disabled Traceback (most recent call last): File "C:\Users\x\Desktop\New folder (6)\run.py", line 6, in exec(marshal.loads(open("dumped.marshal", "rb").read())) TypeError: _bootstrap_inner() missing 1 required positional argument: 'self'

mina250 commented 1 year ago

from pytransform import pyarmor_runtime pyarmor_runtime() pyarmor(name, file, b'PYARMOR\x00\x00\x03\n\x00o\r\r\n.........

Svenskithesource commented 1 year ago

I tried a small program and it worked fine

But the program is very large and does not work. Could this be the cause of the problem?

Yes that probably is the issue. Can you share the file please? The issue seems that the opcode value exceeds 256 which causes the error. Instead an EXTENDED_ARG should be generated.

mina250 commented 1 year ago

py file https://www.mediafire.com/file/8aumx3zsd1bkw5h/py+file.zip/file

exe file https://www.mediafire.com/file/pi4b4zso3pq93nx/exe_file.zip/file