You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when I ran it I experienced some issues decompiling .pyc files written in python 2.7
First issue I had was with the temp .pyc file that is created in order to prepend the "magic bytes", which generated this output :
Traceback (most recent call last): File "python-exe-unpacker-master\python_exe_unpack.py", line 381, in <module> main() File "python-exe-unpacker-master\python_exe_unpack.py", line 374, in main magic_prepend.prepend(prepend_file) File "python-exe-unpacker-master\python_exe_unpack.py", line 339, in prepend os.remove(edited_pyc.name) WindowsError: [Error 32]
The workaround for me was to replace line 339 in by 'pass' which seemed to solve the issue with the only downside of leaving the temp file in the temp directory. This issue might just come from the way temp files are dealt with in windows.
Second issue, which I think might come from using python 2.7 gives the following output
Traceback (most recent call last): File "python-exe-unpacker-master\python_exe_unpack.py", line 381, in main() File "python-exe-unpacker-master\python_exe_unpack.py", line 374, in main magic_prepend.prepend(prepend_file) File "python-exe-unpacker-master\python_exe_unpack.py", line 325, in prepend (total, okay, failed, verify_failed) = PythonExectable.decompile_pyc(None, [edited_pyc.name], edited_py_name) File "python-exe-unpacker-master\python_exe_unpack.py", line 85, in decompile_pyc return uncompyle6.main.main(dir_decompiled, dir_decompiled, pyc_files, None, output_file) File "C:\Users\Stage\AppData\Roaming\Python\Python27\site-packages\uncompyle6\main.py", line 112, in main infile = os.path.join(in_base, filename) File "C:\Users\Stage\Anaconda3\envs\decompyle\lib\ntpath.py", line 65, in join result_drive, result_path = splitdrive(path) File "C:\Users\Stage\Anaconda3\envs\decompyle\lib\ntpath.py", line 115, in splitdrive if len(p) > 1: TypeError: object of type 'NoneType' has no len()
The workaround for me was to replace None by an empty string '' on line 325 of the main executable.
Hope this helps someone.
The text was updated successfully, but these errors were encountered:
Hi, thanks for the very useful code.
However, when I ran it I experienced some issues decompiling .pyc files written in python 2.7
First issue I had was with the temp .pyc file that is created in order to prepend the "magic bytes", which generated this output :
Traceback (most recent call last): File "python-exe-unpacker-master\python_exe_unpack.py", line 381, in <module> main() File "python-exe-unpacker-master\python_exe_unpack.py", line 374, in main magic_prepend.prepend(prepend_file) File "python-exe-unpacker-master\python_exe_unpack.py", line 339, in prepend os.remove(edited_pyc.name) WindowsError: [Error 32]
The workaround for me was to replace line 339 in by 'pass' which seemed to solve the issue with the only downside of leaving the temp file in the temp directory. This issue might just come from the way temp files are dealt with in windows.
Second issue, which I think might come from using python 2.7 gives the following output
Traceback (most recent call last): File "python-exe-unpacker-master\python_exe_unpack.py", line 381, in main() File "python-exe-unpacker-master\python_exe_unpack.py", line 374, in main magic_prepend.prepend(prepend_file) File "python-exe-unpacker-master\python_exe_unpack.py", line 325, in prepend (total, okay, failed, verify_failed) = PythonExectable.decompile_pyc(None, [edited_pyc.name], edited_py_name) File "python-exe-unpacker-master\python_exe_unpack.py", line 85, in decompile_pyc return uncompyle6.main.main(dir_decompiled, dir_decompiled, pyc_files, None, output_file) File "C:\Users\Stage\AppData\Roaming\Python\Python27\site-packages\uncompyle6\main.py", line 112, in main infile = os.path.join(in_base, filename) File "C:\Users\Stage\Anaconda3\envs\decompyle\lib\ntpath.py", line 65, in join result_drive, result_path = splitdrive(path) File "C:\Users\Stage\Anaconda3\envs\decompyle\lib\ntpath.py", line 115, in splitdrive if len(p) > 1: TypeError: object of type 'NoneType' has no len()
The workaround for me was to replace
None
by an empty string '' on line 325 of the main executable.Hope this helps someone.
The text was updated successfully, but these errors were encountered: