I overcame recent issues with a redefinition and finished my Plugin.
In short this plugin uses Hex-Rays Decompiler to decompile a given file, analyzes properties of the pseudocode and then appends the results to a .csv
Now I tried to use this in batch mode, but was stumped as the following happened:
Cmd input to call IDA:
idaw -A -c -Srecompile.idc input_file
The recompile.idc
file:
#include <idc.idc>
static main() {
Wait();
Message("Hello world from IDC!\n");
RunPlugin("REcompile vs Hexrays",0);
//Exit(0);
}
I obviously need to Wait()
for Auto-Analysis. Exit()
is commented since it's for use when this is all fixed.
Now i do get the following output on execution:
The initial autoanalysis has been finished.
Hello world from IDC!
LoadLibrary(C:\Program Files (x86)\IDA\plugins\REcompile vs Hexrays.plw) error: Das angegebene Modul wurde nicht gefunden.
C:\Program Files (x86)\IDA\plugins\REcompile vs Hexrays.plw: can't load file
Hex-Rays Decompiler plugin has been loaded (v1.6.0.111005)
Hex-rays version 1.6.0.111005 has been detected, REcompile vs Hexrays ready to use
As you can see the script is executed before the plugins are loaded. I assume this is the reason why I get the LoadLibrary
Error.
If you have any other input or experience with plugin batch execution i'd be happy to hear from you.
Greetings, Viktor