Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

threading with idapython

Tags:

python

ida

I am writing a plugin for IDA by idapython. When I try to use threading, the IDA program fails.

For example, when I try to run the code:

import thread  
def run():  
    print "start thread"  
print "start"  
thread.start_new_thread(run, ())  
print "end"

the word "start" is printed in the IDA python console, and then IDA fails.

What can I do?

like image 648
ציון נחאיסי Avatar asked Jul 04 '26 00:07

ציון נחאיסי


1 Answers

Try upgrading your IDA / IDAPython. Using IDA 6.1 and the IDAPython that came with it, the above code works for me.

That said, you really can't access the database from multiple python threads in this version. See idaapi.execute_sync for more info.

like image 144
FrequentGuest Avatar answered Jul 06 '26 13:07

FrequentGuest



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!