IDAPython project for Hex-Ray's IDA Pro
Go to file
elias.bachaalany@gmail.com 223e4a5268 Applied patches from Hex-Rays:
- added MakeYword
- wrap obsolete IDA API functions too, so that old scripts continue to work
- added debugger trace related functions in idc.py
BUGFIX: IDAPython would fail with a cryptic error message if there was no free space on the current disk
BUGFIX: site-packages directory was missing from sys.path
BUGFIX: functions for working with additional lines (LineA/LineB etc) were broken
BUGFIX: GetFixup* functions from idc.py were broken
BUGFIX: IDA could not start if another python27.dll was present in PATH and importing site.py for that Python installation failed
BUGFIX: SaveBase() was broken
BUGFIX: IDAPython would fail with a cryptic error message if there was no free space on the current disk
BUGFIX: IDAPython: site-packages directory was missing from sys.path
BUGFIX: IDAPython: functions for working with additional lines (LineA/LineB etc) were broken
BUGFIX: IDAPython: GetFixup* functions from idc.py were broken
BUGFIX: IDAPython: IDA could not start if another python27.dll was present in PATH and importing site.py for that Python installation failed
BUGFIX: IDAPython: SaveBase() was broken
BUGFIX: Dbg/Idp hooks automatically unhook when hook object is not referenced anymore

note: these patches are already applied in IDAPython that comes with IDA Pro 6.4
2013-03-06 07:44:10 +00:00
docs Initial SVN commit of version 0.9.54 sources. 2007-10-20 07:03:51 +00:00
examples - IDA Pro 6.3 support 2012-06-24 20:49:11 +00:00
python Applied patches from Hex-Rays: 2013-03-06 07:44:10 +00:00
pywraps Applied patches from Hex-Rays: 2013-03-06 07:44:10 +00:00
Scripts IDAPython 1.5.3 2011-10-14 14:24:38 +00:00
swig Applied patches from Hex-Rays: 2013-03-06 07:44:10 +00:00
tools - IDA Pro 6.3 support 2012-06-24 20:49:11 +00:00
AUTHORS.txt IDAPython 1.5.3 2011-10-14 14:24:38 +00:00
basetsd.h Initial SVN commit of version 0.9.54 sources. 2007-10-20 07:03:51 +00:00
build.py - IDA Pro 6.3 support 2012-06-24 20:49:11 +00:00
BUILDING.txt IDAPython 1.5.3 2011-10-14 14:24:38 +00:00
CHANGES.txt - IDA Pro 6.3 support 2012-06-24 20:49:11 +00:00
COPYING.txt IDAPython 1.4.0 - IDA Pro 5.7 support 2010-06-28 12:36:40 +00:00
python.cfg - IDA Pro 6.3 support 2012-06-24 20:49:11 +00:00
python.cpp Applied patches from Hex-Rays: 2013-03-06 07:44:10 +00:00
pywraps.hpp Applied patches from Hex-Rays: 2013-03-06 07:44:10 +00:00
README.txt IDAPython 1.5.3 2011-10-14 14:24:38 +00:00
STATUS.txt IDAPython 1.4.0 - IDA Pro 5.7 support 2010-06-28 12:36:40 +00:00

------------------------------------------------------
IDAPython - Python plugin for Interactive Disassembler
------------------------------------------------------

What is IDAPython?
------------------

IDAPython is an IDA plugin which makes it possible to write scripts
for IDA in the Python programming language. IDAPython provides full
access to both the IDA API and any installed Python module.

Check the scripts in the examples directory to get an quick glimpse.


Availability
------------

Latest stable versions of IDAPython are available from
  http://code.google.com/p/idapython/downloads/list

Development builds are available from
  http://code.google.com/p/idapython/


Resources
---------

The full function cross-reference is readable online at
  http://www.hex-rays.com/idapro/idapython_docs/

Bugs and enhancement requests should be submitted to
  http://code.google.com/p/idapython/issues/list

Mailing list for the project is hosted by Google Groups at
  http://groups.google.com/group/idapython


Installation from binaries
--------------------------

1. Install 2.6 or 2.7 from http://www.python.org/
2. Copy the whole "python" directory to %IDADIR%
3. Copy the contents of the "plugins" directory to the %IDADIR%\plugins\
4. Copy "python.cfg" to %IDADIR%\cfg

Usage
-----

 - Run script: File / Script file (Alt-F7)
 - Execute Python statement(s) (Ctrl-F3)
 - Run previously executed script again: View / Recent Scripts (Alt+F9)


* Batch mode execution:

Start IDA with the following command line options:

 -A -OIDAPython:yourscript.py file_to_work_on
or
-Syourscript.py
or
-S"yourscript.py arg1 arg2 arg3"

(Please see http://www.hexblog.com/?p=128)

If you want fully unattended execution mode, make sure your script
exits with a qexit() call.

By default scripts run after the database is opened. Extended option
format is:

  -OIDAPython:[N;]script.py

Where N can be:
  0: run script after opening database (default)
  1: run script when UI is ready
  2: run script immediately on plugin load (shortly after IDA starts and before processor modules and loaders)

* User init file

You can place your custom settings to a file called 'idapythonrc.py'
that should be placed to

${HOME}/.idapro/

or

%AppData%\Hex-Rays\IDA Pro

The user init file is read and executed at the end of the init process.

Please note that IDAPython can be configured with "python.cfg" file.

* Invoking Python from IDC

The IDAPython plugin exposes a new IDC function "RunPythonStatement(string idc_code)" that allows execution
of Python code from IDC

* Invoking IDC from Python

It is possible to use the idc.Eval() to evaluate IDC expressions from Python

* Making Python the default language

By default, IDA will use IDC to evaluate expressions. It is possible to change the default language to use
Python instead of IDC.

In order to do that, please use the following IDC code:

RunPlugin("python", 3)

To disable Python language and revert back to IDC:
RunPlugin("python", 4)