I have been reading through the API documentation here and As far as I can tell there are three ways to wait for the analysis to finish.




Looking at the API if get_auto_state() == AU_NONE then Analysis should be completed and if auto_is_ok() == 1 then analysis is completed. Also, from what I read auto_wait() should move forward when analysis is completed . I have tried all of these and none appear to work like I want. And I noticed that these events will be met when the IDA is pausing in part of analysis.

I mean, if there is no way to accomplish this, then I would settle for a way to sort of activate the plugin when run is called normally and then have another part run from an event listener. Both of which appear to be documented poorly.


Arrange your plugin like this:

# your imports
import idc

# wait for auto-analysis to complete
    return yourthing()

###do your thing
def yourthing(): pass

check an example: https://github.com/nadineOzz/polichombr/blob/80805164e85c2d21ffadffdd9ed8e2e4ea36fa9c/skelenox.py

good read: https://hex-rays.com/blog/scriptable-plugins/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.