2

Is there any way to use an existing IDB from the IDA command line interface ?

I went through the list of command line switches here but there isn't any related switches.

As I am currently scripting IDA to do some processing based on the same file, I realised I could save some time by reusing the existing IDB, instead of repeatedly deleting and creating another new IDB per iteration. ( -c causes this behavior )

My current command: idaw.exe -c -A -SC:\someScript.py

2 Answers 2

2

My current command: idaw.exe -c -A -SC:\someScript.py

Remove the -c and add the existing IDB file's path:

idaw.exe -A -SC:\someScript.py C:\existingIdb.idb

0
0

when i need to get some function info on an existing idb i use this see if it helps

>cat idc\dumpfun.idc
#include <idc.idc>
static main () {    
        auto fun,ref,funname,fullstr,instr,fpi,fpo;
        Batch(1);
        fun = MinEA();
        fpi = fopen("input.txt","rb");
        instr = readstr(fpi);
        fclose(fpi);
        fpo = fopen("outtext.txt","wb");
        while (fun != -1) {
                fun = NextFunction(fun);
                ref = RfirstB(fun);
                funname = GetFunctionName(fun);
                if( strstr(instr,funname) != -1) {
                        fullstr = form("%x %x %s\n",fun,ref,funname);
                        writestr(fpo,fullstr);    
                }
        }
        fclose(fpo);
        Exit(0);    
}
>echo VirtualQuery > input.txt    
>cat input.txt
VirtualQuery    
>del outtext.txt    
>idag   -Sdumpfun.idc idag.idb    
>cat outtext.txt
5706b8 567b5f VirtualQuery
ffffffff ffffffff

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.