Search code examples
pythonida

IDA pro Imports


i have been delving into ida Pro for the last couple of weeks to get a bit of a background.

Something that has been bugging me for a long time though is the seemingly lack of support for pulling out the imported functions.

All i want is a script that can copy the entire imports window and paste into a text file, but I am having serious trouble finding anything in the API's that can help me do this. It should be very simple, yet I find it impossible. I have managed to find things to pull out the library's from this window, but nothing to pull out everything.

any help or direction would be much appreciated.


Solution

  • I agree with the assertion that you should use Ctrl+Ins or dumpbin.

    However, what you ask has been solved already by the IDAPython project and I suggest you head over and look at their examples (here and here), especially this one.

    The relevant idaapi functions are:

    • idaapi.get_import_module_qty
    • idaapi.enum_import_names