Пример #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     rconfig = new RConfig();
     UpdateGUI();
     CheckR2path();
     r2pw = new R2PIPE_WRAPPER(rconfig, this);
     //add controls
     r2pw.add_control("output", txtOutput);
     r2pw.add_control("dissasembly", webBrowser1);
     r2pw.add_control("strings_listview", lstStrings);
     r2pw.add_control("functions_listview", listView1);
     r2pw.add_control("imports_listview", lstImports);
     r2pw.add_control("sections_listview", lstSections);
     r2pw.add_control("hexview", webBrowser2);
     r2pw.add_control("r2help", webBrowser3);
     //add and assign "decorators"
     r2pw.add_decorator("num2hex", num2hex, new List <string>()
     {
         "offset", "vaddr", "paddr", "plt"
     });
     r2pw.add_decorator("dec_b64", dec_b64, new List <string>()
     {
         "string"
     });
     //add menu options and function callbacks
     r2pw.add_menucmd("&View", "Functions", "aaa;aflj", mainMenu);
     r2pw.add_menucmd("&View", "File info", "iIj", mainMenu);
     r2pw.add_menucmd("&View", "File version", "iV", mainMenu);
     r2pw.add_menucmd("&View", "Strings", "izj", mainMenu);
     r2pw.add_menucmd("&View", "Strings", "izj", mainMenu);
     r2pw.add_menucmd("&View", "Libraries", "ilj", mainMenu);
     r2pw.add_menucmd("&View", "Symbols", "isj", mainMenu);
     r2pw.add_menucmd("&View", "Relocs", "irj", mainMenu);
     r2pw.add_menucmd("&View", "Entropy", "p=", mainMenu);
     r2pw.add_menucmd("&View", "Entry Point", "pdfj @ entry0", mainMenu);
     r2pw.add_menucmd("&View", "List all RBin plugins loaded", "iL", mainMenu);
     r2pw.add_menucmd("r2", "Strings", "i?", mainMenu);
     r2pw.add_menucmd("r2", "Print help", "p?", mainMenu);
     r2pw.add_menucmd("r2", "Version", "?V", mainMenu);
     //add menu function callbacks
     r2pw.add_menufcn("&Gui", "Update gui", "*", UpdateGUI, mainMenu);
     r2pw.add_menufcn("&Gui", "Enum registry vars", "*", dumpGuiVars, mainMenu);
     r2pw.add_menufcn("Recent", "", rconfig.lastFileName, LoadFile, mainMenu);
     //add shell options
     r2pw.add_shellopt("radare2", guiPrompt_callback);
     r2pw.add_shellopt("javascript", guiPrompt_callback);
     //new auto-generated tabs
     r2pw.add_control_tab("version ( ?V )", "#todo");
     r2pw.add_control_tab("xrefs ( axtj )", "#todo");
     //load some example file
     //LoadFile(@"c:\windows\SysWOW64\notepad.exe");
     LoadFile("-");
 }