result = e.symbols[symb] KeyError: b‘system‘ [How to Solve]


Traceback (most recent call last):
  File "", line 16, in <module>
  File "/usr/local/lib/python3.8/dist-packages/pwnlib/", line 582, in lookup
    result = e.symbols[symb]
KeyError: b'system'

This is a problem that python3 is incompatible with dynelf modules. The biggest difference between python3 and python2 (PWN) is that the bytes and STR types are not common. Therefore, for scripts that can run in python2, the problem of type conversion must be considered in python3. This is also the reason for the error reporting in dynelf


vim /usr/local/lib/python3.8/dist-packages/pwnlib/

Find the file, find the error line, and modify the source code

result = e.symbols[symb]


result = e.symbols[symb.decode()]


Read More: