diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/disass/disassembler.c | 33 | ||||
-rw-r--r-- | src/plugins/plugin-def.h | 34 |
2 files changed, 63 insertions, 4 deletions
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c index 1227e84..7b6c63e 100644 --- a/src/analysis/disass/disassembler.c +++ b/src/analysis/disass/disassembler.c @@ -227,6 +227,11 @@ static void g_delayed_disassembly_process(GDelayedDisassembly *disass, GtkExtSta g_arch_processor_set_disassembled_instructions(proc, *disass->instrs); + // plugins ////////////////////////// + process_disassembly_event(PGA_DISASSEMBLY_RAW, disass->binary); + + + /* *disass->instrs = disassemble_binary_parts(disass->binary, disass->parts, disass->count, statusbar, id); @@ -262,6 +267,10 @@ static void g_delayed_disassembly_process(GDelayedDisassembly *disass, GtkExtSta + // plugins ////////////////////////// + process_disassembly_event(PGA_DISASSEMBLY_HOOKED_LINK, disass->binary); + + //gtk_extended_status_bar_remove(statusbar, id); @@ -296,6 +305,10 @@ static void g_delayed_disassembly_process(GDelayedDisassembly *disass, GtkExtSta + // plugins ////////////////////////// + process_disassembly_event(PGA_DISASSEMBLY_HOOKED_POST, disass->binary); + + /** * TODO : établir les couvertures de fonctions, @@ -323,6 +336,12 @@ static void g_delayed_disassembly_process(GDelayedDisassembly *disass, GtkExtSta + // plugins ////////////////////////// + process_disassembly_event(PGA_DISASSEMBLY_LIMITED, disass->binary); + + + + /* Troisième étape */ id = gtk_extended_status_bar_push(statusbar, _("Detecting loops..."), true); @@ -333,6 +352,10 @@ static void g_delayed_disassembly_process(GDelayedDisassembly *disass, GtkExtSta /// + // plugins ////////////////////////// + process_disassembly_event(PGA_DISASSEMBLY_LOOPS, disass->binary); + + /* Quatrième étape */ @@ -358,6 +381,11 @@ G_BIN_FORMAT(g_loaded_binary_get_format(disass->binary) + // plugins ////////////////////////// + process_disassembly_event(PGA_DISASSEMBLY_LINKED, disass->binary); + + + @@ -376,6 +404,9 @@ G_BIN_FORMAT(g_loaded_binary_get_format(disass->binary) //run_plugins_on_binary(disass->binary, PGA_BINARY_GROUPED, true); + process_disassembly_event(PGA_DISASSEMBLY_GROUPED, disass->binary); + + @@ -392,6 +423,8 @@ G_BIN_FORMAT(g_loaded_binary_get_format(disass->binary) //run_plugins_on_binary(disass->binary, PGA_BINARY_GROUPED, true); + process_disassembly_event(PGA_DISASSEMBLY_RANKED, disass->binary); + /* Septième étape */ diff --git a/src/plugins/plugin-def.h b/src/plugins/plugin-def.h index d7a37e4..68f9942 100644 --- a/src/plugins/plugin-def.h +++ b/src/plugins/plugin-def.h @@ -117,7 +117,7 @@ typedef enum _PluginAction */ /* Détection et chargement */ - PGA_FORMAT_MATCHER = DPC_BINARY_PROCESSING | DPS_FORMAT | DEFINE_PLUGIN_ACTION(0), + PGA_FORMAT_MATCHER = DPC_BINARY_PROCESSING | DPS_FORMAT | DEFINE_PLUGIN_ACTION(0), /* Accompagnement du chargement (fin) */ PGA_FORMAT_LOADER_LAST = DPC_BINARY_PROCESSING | DPS_FORMAT | DEFINE_PLUGIN_ACTION(1), @@ -127,10 +127,36 @@ typedef enum _PluginAction */ /* Désassemblage démarré */ - PGA_DISASSEMBLY_STARTED = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(0), + PGA_DISASSEMBLY_STARTED = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(0), + + /* Instructions toutes jutes désassemblées */ + PGA_DISASSEMBLY_RAW = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(1), + + /* Crochets de type 'link' exécutés */ + PGA_DISASSEMBLY_HOOKED_LINK = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(2), + + /* Crochets de type 'post' exécutés */ + PGA_DISASSEMBLY_HOOKED_POST = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(3), + + /* Limites de routines définies */ + PGA_DISASSEMBLY_LIMITED = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(4), + + /* Détection d'éventuelles boucles effectuée */ + PGA_DISASSEMBLY_LOOPS = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(5), + + /* Liaisons entre instructions mises en place */ + PGA_DISASSEMBLY_LINKED = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(6), + + /* Instructions regroupées en blocs basiques */ + PGA_DISASSEMBLY_GROUPED = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(7), + + /* Définitions de profondeurs d'exécution */ + PGA_DISASSEMBLY_RANKED = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(8), /* Désassemblage fini */ - PGA_DISASSEMBLY_ENDED = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(1), + PGA_DISASSEMBLY_ENDED = DPC_BINARY_PROCESSING | DPS_DISASSEMBLY | DEFINE_PLUGIN_ACTION(9), + + @@ -161,7 +187,7 @@ typedef enum _PluginAction /* MAJ !! */ -#define PGA_COUNT 6 +#define PGA_COUNT 16 |