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

Alpine dependencies #1105

Open
nnewram opened this issue May 16, 2024 · 2 comments
Open

Alpine dependencies #1105

nnewram opened this issue May 16, 2024 · 2 comments

Comments

@nnewram
Copy link

nnewram commented May 16, 2024

gef/gef.py

Line 11079 in 18c1f7c

for constant in ("python3", "readelf", "nm", "file", "ps"):

If installing in Alpine which does not have file by default you get error message:

Traceback (most recent call last):
  File "/root/.gef-2023.06.py", line 11070, in <module>
    reset()
  File "/root/.gef-2023.06.py", line 191, in reset
    gef.setup()
  File "/root/.gef-2023.06.py", line 11001, in setup
    self.reinitialize_managers()
  File "/root/.gef-2023.06.py", line 10996, in reinitialize_managers
    self.session = GefSessionManager()
                   ^^^^^^^^^^^^^^^^^^^
  File "/root/.gef-2023.06.py", line 10602, in __init__
    self.constants[constant] = which(constant)
                               ^^^^^^^^^^^^^^^
  File "/root/.gef-2023.06.py", line 1843, in which
    raise FileNotFoundError(f"Missing file `{program}`")
FileNotFoundError: Missing file `file`

Which is a bit cryptic. For Alpine users: in order to use gef you need file, e.g. apk add file

Might be nice with a better error message here?

@hugsy
Copy link
Owner

hugsy commented May 16, 2024

Hi,

Might be nice with a better error message here?

I'm not sure what "better" means. It clearly states the fact a required binary dependency cannot be found. This is all described in the docs. GEF is a Python tool, agnostic of all Linux variants and we cannot (and aren't going to) spend time making it specific to each distro specificities if that's the kind of improvement you were hoping.

If it's not, please explain how.

@Grazfather
Copy link
Collaborator

I don't think we should add special handling for file. I am with hugsy. There has to be some base set of utilities that are needed. I think FileNotFoundError: Missing file file is plenty clear.

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

3 participants