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

Certain types of files in a pyinstaller bundle/binary cause Invalid ELF image: Magic number does not match #288

Closed
Azathothas opened this issue Sep 3, 2024 · 2 comments

Comments

@Azathothas
Copy link

Hi, if the final pyinstaller binary bundle includes files like :

LICENSE
.conf
#and probably more

staticx will refuse and error out with: Invalid ELF image: Magic number does not match
Running with debug doesn't provide extra information, it's always like this:

---snipped---
DEBUG:root:Extracting to /tmp/staticx-pyi-i4ywqjfy/yaml/_yaml.cpython-312-x86_64-linux-gnu.so
DEBUG:root:Extracting to /tmp/staticx-pyi-i4ywqjfy/zstandard/_cffi.cpython-312-x86_64-linux-gnu.so
DEBUG:root:Extracting to /tmp/staticx-pyi-i4ywqjfy/zstandard/backend_c.cpython-312-x86_64-linux-gnu.so
staticx: /tmp/staticx-pyi-i4ywqjfy/nxc/data/nxc.conf: Invalid ELF image: Magic number does not match
#Fails here

I believe this is related to these issues:
#281
#268

I believe either maintaining a whitelist/blacklist or a more thorough check of the filetype should help.

@Azathothas
Copy link
Author

Just realized, that this may be fixed by #277

@Azathothas
Copy link
Author

Yes, it works. Thank you.

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

1 participant