IDAPython Scripting Examples

By way of offering a compare and contrast between IDC and IDAPython, the following sections present the same example cases seen previously in the discussion of IDC. Wherever possible we endeavor to make maximum use of Python-specific features to demonstrate some of the efficiencies that can be gained by scripting in Python.

Enumerating Functions

One of the strengths of IDAPython is the way that it uses Python’s powerful datatypes to simplify access to collections of database objects. In Example 15-8, we reimplement the function enumeration script of Example 15-1 in Python. Recall that the purpose of this script is to iterate over every function in a database and print basic information about each function, including ...

Get The IDA Pro Book, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.