-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Do not store files in /tmp or pyinstaller can not work #2086
Comments
Supporting pyinstaller is tricky and I don't see the use case for bundling pwntools together with python into an exploit binary. Out of curiosity I played around with it following the basic pyinstaller tutorial and came up with this
or expressed as package hook: hook-pwnlib.py: hiddenimports = [
"pwnlib.atexception",
"pwnlib.pep237",
"pwnlib.useragents",
"pwnlib.update",
]
datas = [
("pwnlib/shellcraft/templates", "pwnlib/shellcraft/templates"),
("pwnlib/data", "pwnlib/data"),
] when placing that file into import os
def get_hook_dirs():
return [os.path.dirname(__file__)] and telling setuptools about the entrypoint in pyproject.toml: [project.entry-points.pyinstaller40]
hook-dirs = "pwnlib.internal.pyinstaller:get_hook_dirs" allows to package basic exploits with
It appears to ignore the |
This allows to create single-file exploits without the need to have python installed. You still need to have external binutils for asm/disasm. Closes Gallopsled#2086
I can not import pwntools and then use my python program with pyinstaller.
Update Pwntools First
I even tried with pwntools from source.
Debug Output
The text was updated successfully, but these errors were encountered: