Tag Archives: PWN

[Solved] IDA Start Error: Unexcepted fatal error while intitailizing Python runtime…

When I opened IDA today, It suddenly appeared:

it startled me. What’s going on? Calm down and analyze it. I’m going to open it in the same directory as IDA. See what error reports:

the result can’t be opened, and then I directly open idat64.exe,

there should be a problem with the python path. Open the environment variable and add the following to the user environment variable:

PYTHONHOME  #EVI PATH
C:/Program File/python  #PATH

Then save and open IDA to use

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

problem

Traceback (most recent call last):
  File "ot.py", line 16, in <module>
    sys_addr=d.lookup('system','libc')
  File "/usr/local/lib/python3.8/dist-packages/pwnlib/dynelf.py", 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

Solution:

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

Find the dynelf.py file, find the error line, and modify the source code

result = e.symbols[symb]

by

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

Fixed