diff options
Diffstat (limited to 'plugins/ropgadgets/finder.c')
-rw-r--r-- | plugins/ropgadgets/finder.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/ropgadgets/finder.c b/plugins/ropgadgets/finder.c index 4d48296..6a2283c 100644 --- a/plugins/ropgadgets/finder.c +++ b/plugins/ropgadgets/finder.c @@ -28,6 +28,7 @@ #include <core/processors.h> +#include <format/format.h> #include <i18n.h> @@ -40,7 +41,7 @@ /* Données utiles à transmettre */ typedef struct _search_domain { - GBinFormat *format; /* Format du fichier binaire */ + GExeFormat *format; /* Format du fichier binaire */ GBinContent *content; /* Contenu associé récupéré */ GArchProcessor *proc; /* Processeur idéal en place */ GProcContext *ctx; /* Contexte de désassemblage */ @@ -86,7 +87,7 @@ static GArchInstruction *disassemble_instruction_in_domain(const search_domain * ctx = domain->ctx; /* TODO : copie */ - result = g_arch_processor_disassemble(domain->proc, ctx, domain->content, pos, G_EXE_FORMAT(domain->format)); + result = g_arch_processor_disassemble(domain->proc, ctx, domain->content, pos, domain->format); if (result != NULL) { @@ -317,7 +318,7 @@ static GArchInstruction **list_all_gadgets_in_domain(const search_domain *domain * * ******************************************************************************/ -found_rop_list *list_all_gadgets(GBinFormat *format, unsigned int max_depth, update_search_progress_cb update, GObject *data, size_t *count) +found_rop_list *list_all_gadgets(GExeFormat *format, unsigned int max_depth, update_search_progress_cb update, GObject *data, size_t *count) { found_rop_list *result; /* Liste de listes à renvoyer */ const char *target; /* Sous-traitance requise */ @@ -331,12 +332,12 @@ found_rop_list *list_all_gadgets(GBinFormat *format, unsigned int max_depth, upd g_object_ref(G_OBJECT(format)); domain.format = format; - domain.content = g_binary_format_get_content(format); + domain.content = g_binary_format_get_content(G_BIN_FORMAT(format)); - target = g_exe_format_get_target_machine(G_EXE_FORMAT(format)); + target = g_exe_format_get_target_machine(format); domain.proc = get_arch_processor_for_type(target); - domain.exe_ranges = g_exe_format_get_x_ranges(G_EXE_FORMAT(format), &domain.exe_count); + domain.exe_ranges = g_exe_format_get_x_ranges(format, &domain.exe_count); /* Récupération des différents contextes */ |