diff options
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/binary.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 15be43e..f5ff3fb 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -365,17 +365,56 @@ static void g_openida_binary_init(GOpenidaBinary *binary) GOpenidaBinary *g_openida_binary_new_from_file(const char *filename) { GOpenidaBinary *result; /* Adresse à retourner */ + GPluginModule **pglist; /* Liste de greffons */ + size_t pgcount; /* Taille de cette liste */ + size_t i; /* Boucle de parcours */ + + + char *file = strdup(filename); result = g_object_new(G_TYPE_OPENIDA_BINARY, NULL); + + + + printf("%s\n", filename); + + + + pglist = get_all_plugins_for_action(PGA_FORMAT_MATCHER, &pgcount); + + if (pgcount > 0) + { + printf("===>>>> FOUND :: %d\n", pgcount); + + + /* + for (i = 0; i < pgcount; i++) + g_plugin_module_execute_action_on_binary(pglist[i], binary, PGA_CODE_PROCESS); + */ + free(pglist); + + } + + + + + + + + + log_variadic_message(LMT_PROCESS, _("Opening '%s' file..."), filename); result->filename = strdup(filename); + /* result->bin_data = map_binary_file(filename, &result->bin_length); if (result->bin_data == NULL) goto lbf_error; + */ - result->format = G_EXE_FORMAT(load_new_format(FMT_EXEC, result->bin_data, result->bin_length)); + result->format = G_EXE_FORMAT(load_new_format(FMT_EXEC, file, + &result->bin_data, &result->bin_length)); if (result->format == NULL) { log_simple_message(LMT_INFO, _("Unknown binary format")); |