-
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
Import from elftools is failing #1189
Comments
Due to ENUM_P_TYPE not in /usr/lib/pythonXX/site-packages/elftools/elf/enums.py, but ENUM_P_TYPE_BASE in it, so there is a solution that change the ENUM_P_TYPE to ENUM_P_TYPE_BASE in /usr/lib/pythonXX/site-packages/pwnlib/elf/elf.py. (Just 2 places: line 54 and line 1749) tips: This solution can solve some friends' problem, but in some cases, will bring other problem. Another solution for solve the whole problem is to reduce your pyelftools version to 0.24. |
I am still having the same issue. I have changed ENUM_P_TYPE to ENUM_P_TYPE_BASE on line 54 and line 1749 in elf.py. I assume I have to recompile the elf.py after these changes? However, I am getting some permission errors when trying to recompile. Any thoughts? FIX: I had to change permission on my elf.pyc file so that it would recompile. Now it is working properly. |
Fixed with |
When installing the newest version of pwntools in a fresh venv, "from pwn import *" failing in a python console:
I guess the new version of elftools may be the problem ( https://pypi.org/project/pyelftools/0.25/ )
The text was updated successfully, but these errors were encountered: