Skip to content

IDA blocking while python commands are executed #12

@fmagin

Description

@fmagin

I am aware that this is an issue with regular Python in IDA too, so I am assuming this is an issue with IDA itself,but it might be possible to work around it with the IPython hooking capabilities.

When running any command in the Python shell the IDA GUI is not usable until the command terminates. At least in my case when using angr it happens fairly often that I accidentally run commands which will take basically forever (state exploration without proper limits).

My idea was to find some way to set a timeout on any executed cell in IPython by leveraging the hooking points[0] or code transformations[1] IPython provides.

The ways to implement timeouts in Python[2] seem to be either by using multiprocessing or signal handling, the latter of which is not available on non-UNIX systems. I haven't found a way yet to do this properly via multi processing (or maybe multi threading?) but any input would be appreciated.

[0] https://ipython.readthedocs.io/en/5.x/api/generated/IPython.core.hooks.html
[1] https://ipython.readthedocs.io/en/5.x/config/inputtransforms.html
[2] https://stackoverflow.com/questions/492519/timeout-on-a-function-call

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions