IDAPerl
a perl interface for IDA
IDAPerl, is a plugin for IDA Pro,
which adds perl scripting support to ida.
you can leave comments on my blog.
source: here or zip archive
binary: idaperl-0.1-200805090919.zip
binary: idaperl-0.2-200805121128.zip
binary: idaperl-0.3-200805121829.zip
binary: idaperl-0.4-200806011131.zip
Author: Willem Jan Hengeveld itsme@xs4all.nl
history
- version 0.1 - initial release
- version 0.2 - simplified interface to IDC, now all IDC functions are implemented,
now works on OSX, and probably other platforms too.
- version 0.3 - fixed memory leak.
- version 0.4 - redirecting stdout/stderr to ida window, added idaperl to several menu's, added 'autorun', options dialog. optionally using new interpreter for each script. syntax errors are now displayed in the ida window
requirements
this plugin is known to work with ida5.2, and activesync perl 5.8.8
other versions have not yet been tested.
make sure perl58.dll is in your searchpath.
install
install idaperl by unzipping the .zip file in your ida directory, it will put the plugin in the plugins subdirectory, and create a 'perl' subdir with perl modules.
be sure to delete old versions from the plugin directory
example
type 'alt-2' to get the idaperl window, and enter for example:
use strict;
use warnings;
use IDC;
sub test123 { Msg("test123 called\n"); }
DelHotkey("Shift-I");
AddHotkey("Shift-I", "test123");
click 'OK'
now type 'shift-I' and you will see 'test123 called' be printed in the ida message window
other ida scripting extensions
also there are a ruby, a python, and an old perl scripting extension.
http://d-dome.net/idapython
http://www.wasm.ru/pub/23/files/perl_src.zip
by redplait, not updated since 2004, for perl5.5, ida4.7
ruby
future plans
issues in version 0.1, which were solved in 0.2
Message
currently does not work, instead use Msg
,
which takes a single string as parameter.
to output formatted strings currently you would have to type:
Msg(sprintf("%08lx: %s\n", 123, 'abc'));
- implement all remaining idc functions
- not every function works, still need to do a lot of testing.
tst.ipl will give you an idea of what functions are known to work.
idc_perl.xs shows what functions have been implemented.
also all macro's defined in idc.idc have been implemented/defined here
issues in version 0.2, which were solved in 0.3
issues in version 0.3, which were solved in 0.4
- now printing to STDOUT, and STDERR ( using 'print', warn, etc. ) is redirected to the ida message log
- optionally support perl threads, by serializing access to ida.
- added 'run perl file', 'reset perl', 'about', 'options' menu entries
- implemented autorun
- added options dialog
- optionally using new interpreter for each manually entered perl script.
- IDA.pm, containing some iteration helpers.
- bugfix: idc function calls no longer destroy regex results like '$1'
- bugfix: now syntax errors are displayed correctly