IDA is the well known disassembler and code analyzer. So, why don't get rid about their capabilities for radare?
This doesn't mean that radare and ida will depend, but coexistance with other species is good, so I have written a little IDC script to dump the IDA database in radare commands to fill an RDB database. This way you can debug apps with radare using the information provided by IDA (code blocks, xrefs, function names, comments, ...) Obviously this is only the beggining. I want to make radare autosufficient, so be able to generate the same info done by IDA, etc.. but this will make me easier to design a better database format (SQL?) for storing program information (traces, comments, ...) and write some perl/java goodies to get rid of all this stuff to completely replace with free software the functionalities provided by bindiff and binnavy...so they are wonderful tools, but..srsly internally are easy as shit to implement. I have done some bindiffes and program flow graphos (a year ago or so) and they are already available in radare since then, but i want to integrate all these stuff getting rid of the java/arm/x86 internal disasembler of radare and make an active code analysis tool (debugging and analysis). If humans don't disturb me and I have time to not to sleep ..i can have an initial code bindiff utility for radare. Feel free to discuss about your random ideas!! This is a mailing list!! not a broadcasting channel! The fun thing is attached. --pancake -------------- next part -------------- /* * ida2rad.idc * =========== * * Exports an ida database in a format to be handled by radare. * * author: pancake <@youterm.com> * * MOARNFO: * * http://www.informit.com/articles/article.aspx?p=353553&seqNum=9&rl=1 * * TODO: * * Add stack frame related information (stack size, and so) as comments * */ #include <idc.idc> static main() { auto fd; auto i, func, ref; auto ord,ea; fd = fopen("d:\\output.txt", "w"); if (!fd) { Message("Cannot open 'output.txt'.\n"); Exit(1); } // Walk entrypoints for ( i=0; ; i++ ) { ord = GetEntryOrdinal(i); if ( ord == 0 ) break; ea = GetEntryPoint(ord); fprintf(fd, "f %s @ 0x%08lX\n", Name(ea), ea); } // Walk Labels //ea = ScreenEA(); ea = MinEA(); // Loop from start to end in the current segment for (func=SegStart(ea); func != BADADDR && func < SegEnd(ea); func=NextFunction(func)) { // If the current address is function process it if (GetFunctionFlags(func) != -1) { fprintf(fd, "f %s @ 0x%08lX\n", GetFunctionName(func), func); // Find all code references to func for (ref=RfirstB(func); ref != BADADDR; ref=RnextB(func, ref)) { //fprintf(fd, "; xref from %08lX (%s)\n", ref, GetFunctionName(ref)); fprintf(fd, "C xref from 0x%08lX (%s) @ 0x%08lX\n", ref, GetFunctionName(ref), func); Message("xref++\n"); //Message(" called from %s(0x%x)\n", GetFunctionName(ref), ref); } } } // eof fclose(fd); Message("d:\\output.txt file generated.\n"); } _______________________________________________ radare mailing list [email protected] https://lists.nopcode.org/mailman/listinfo/radare
