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

Avoid __file__ / PyOxidizer support #1366

Open
jayvdb opened this issue Nov 13, 2019 · 1 comment
Open

Avoid __file__ / PyOxidizer support #1366

jayvdb opened this issue Nov 13, 2019 · 1 comment
Milestone

Comments

@jayvdb
Copy link

jayvdb commented Nov 13, 2019

PyOxidizer breaks on pwntools as it doesnt provide __file__ See indygreg/PyOxidizer#69 for more info about why, but the tl;dr version is __file__ is an optional attribute and should not be relied upon.

Currently the startup looks like

>>> import pwnlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pwnlib", line 43, in <module>
  File "importlib", line 127, in import_module
  File "pwnlib.args", line 62, in <module>
  File "pwnlib.term", line 6, in <module>
  File "pwnlib.term.completer", line 7, in <module>
  File "pwnlib.term.readline", line 9, in <module>
  File "pwnlib.term.text", line 126, in <module>
  File "pwnlib.term.text", line 27, in __init__
NameError: name '__file__' is not defined

It looks like many of the cases of __file__ being used here are optional, and could be omitted if not present.

@Arusekk
Copy link
Member

Arusekk commented Dec 4, 2019

Would you mind submitting a pull request for this?

@Arusekk Arusekk added this to the 5.0.0 milestone Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants