Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source_files is null #10

Open
Dustyposa opened this issue Aug 6, 2019 · 8 comments
Open

source_files is null #10

Dustyposa opened this issue Aug 6, 2019 · 8 comments

Comments

@Dustyposa
Copy link

Hello, when i run pyz file, course an error.

$ python python_exe_unpack.py -p out00-PYZ.pyz
[*] On Python 3.7
Traceback (most recent call last):
  File "python_exe_unpack.py", line 381, in <module>
    main()
  File "python_exe_unpack.py", line 374, in main
    magic_prepend.prepend(prepend_file)
  File "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_unpack.py", line 85, in decompile_pyc
    return uncompyle6.main.main(dir_decompiled, dir_decompiled, pyc_files, None, output_file)
  File "D:\ProgramData\Anaconda3\lib\site-packages\uncompyle6\main.py", line 190, in main
    for source_path in source_files:
TypeError: 'NoneType' object is not iterable

How can i solve it?

@delrius-euphoria
Copy link

Any work arounds yet?

@Dustyposa
Copy link
Author

Not yet

@delrius-euphoria
Copy link

Just dont bother, do it manually. I did it manually.

@Kannansowmyan
Copy link

Just dont bother, do it manually. I did it manually.

Hi, Can you let me know how to do that. I try inserting using hex editior but getting error
ImportError: Ill-formed bytecode file d:\Personal\Python\python-exe-unpacker-master\unpacked\main.exe\Main.pyc
<class 'ValueError'>; read length must be non-negative or -1

@delrius-euphoria
Copy link

delrius-euphoria commented Jan 12, 2021

@kannansowayan What did you try? I dont have the code I used, but I used python for this, something simple.

with open('main','rb') as file:

and so on. Its not anything much complicated, though create a backup and also change from main.pyc to main to open with python.

@Kannansowmyan
Copy link

@kannansowayan What did you try? I dont have the code I used, but I used python for this, something simple.

with open('main','rb') as file:

and so on. Its not anything much complicated, though create a backup and also change from main.pyc to main to open with python.

Thanks for the response. I am using uncompyle6 to decompile the file (extracted as part of single .exe file). I had extracted it only as main, but when i try to decompile it gave error, so i added extension .pyc manually. Also based on suggestions in various forums, i tried inserting bytes but still getting one error or other.

I see you are reading the file simple, post that how do you decompile do you use dis or any other library to move from bytecode to actual source?

@delrius-euphoria
Copy link

I used uncompyle6. And then proceeded.

@ZM-J
Copy link

ZM-J commented Jan 29, 2021

Got the same issue when I tried to decrypt an encrypted file.

[*] Encrypted pyc file is found. Decrypt it? [y/n]y
[-] Exception occured while trying to get the encryption key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants