以前写IDA的plugin比较烦,都要手工设置很多东西,比较烦。具体设置方式可以见IDA PLUG-IN WRITING IN C/C++,3. Setting up a Build Environment
以VS为例,设置过程如下:
1 Go to File->New->Project… (Ctrl-Shift-N)
2 Expand the Visual C++ folder, followed by the Win32 sub-folder, and then select the
Win32 Project icon. Name the project whatever you like and click OK.
3 The Win32 Application Wizard should then appear, click the Application Settings
link on the left and make sure Windows Application is selected, and then tick the
Empty Project checkbox. Click Finish.
4 In the Solutions Explorer on the right hand side, right click on the Source Files
folder and go to Add->New Item...
5 Select C++ File (.cpp) under the Templates section and name the file appropriately.
Click Add. Repeat this step for any other files you want to add to the project.
6 Go to Project->projectname Properties...
7 Change the following settings (some have been put there to reduce the size of the
resulting plug-in, as VS seems to bloat the output file massively):
Configuration drop down in the top left: Select Release
Configuration Properties->General: Change Configuration Type to
Dynamic Library (.dll)
C/C++->General: Set Detect 64-bit Portability Issues checks to No
C/C++->General: Set Debug Information Format to Disabled
C/C++->General: Add the SDK include path to the Additional Include
Directories field. e.g. C:\IDA\SDK\Include
C/C++->Preprocessor: Add __NT__;__IDP__ to Preprocessor Definitions
C/C++->Code Generation: Turn off Buffer Security Check, set Basic
Runtime Checks to Default and set Runtime Library to Multi-threaded
C/C++->Advanced: Calling Convention is __stdcall
Linker->General: Change Output File from a .exe to a .plw in the IDA plugins
directory
Linker->General: Add the path to your libvc.wXX to Additional Library
Directories. e.g. C:\IDA\SDK\libvc.w32
Linker->Input: Add ida.lib to Aditional Dependencies
Linker->Debugging: No to Generate Debug Info
Linker->Command Line: Add /EXPORT:PLUGIN
Build Events->Post-Build Event: Set Command-line to your idag.exe to start
IDA after each successful build (Optional)
Click OK
8 Go to Build->Configuration Manager… and change the drop-down in the
Configuration column for your plug-in project from Debug to Release. Click OK
9 Begin to write plugin
够烦吧!
现在好了,最近发现一款IDA Pro plugin wizard的工具,安装一下,就能在VS里很方便的编写IDA的Plugin了,而且你设置好IDA的安装目录之后,编译好的plugin还会自动复制到你的IDA安装目录的plugins目录里,哈哈,实在是方便啊:-)
这个东东你可以去http://jeru.ringzero.net/?page_id=4下载。