summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-08-03 13:03:26 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-08-03 13:03:26 (GMT)
commitb7c83221f2a60be8ee5d44a7599dbe6869af005f (patch)
tree814e294533920d18f8734baa9aaef47c676e520a /src/analysis/disass
parent7d2b7ca95966c2d687526cd75a96d1ea67d3f503 (diff)
Loaded the permissions used by an APK file.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@255 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/disassembler.c21
-rw-r--r--src/analysis/disass/disassembler.h2
2 files changed, 21 insertions, 2 deletions
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index dc374db..75e411f 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -40,6 +40,7 @@
#include "../../format/format.h"
#include "../../glibext/delayed-int.h"
#include "../../gui/panels/log.h"
+#include "../../plugins/pglist.h"
@@ -379,13 +380,18 @@ static void build_disass_prologue(GCodeBuffer *buffer, const char *filename, con
* *
******************************************************************************/
-GCodeBuffer *disassemble_binary(const GOpenidaBinary *binary, GBinPart **parts, size_t parts_count, GArchInstruction **instrs)
+GCodeBuffer *disassemble_binary(GOpenidaBinary *binary, GBinPart **parts, size_t parts_count, GArchInstruction **instrs)
{
GCodeBuffer *result; /* Tampon constitué à renvoyer */
const uint8_t *data; /* Données binaires brutes */
off_t length; /* Quantité de ces données */
GDelayedDisassembly *disass; /* Désassemblage à mener */
GWorkQueue *queue; /* Gestionnaire de différés */
+ GPluginModule **pglist; /* Liste de greffons */
+ size_t pgcount; /* Taille de cette liste */
+ size_t i; /* Boucle de parcours */
+
+ /* Déroulement de l'opération principale */
result = g_code_buffer_new();
@@ -403,6 +409,19 @@ GCodeBuffer *disassemble_binary(const GOpenidaBinary *binary, GBinPart **parts,
g_object_unref(G_OBJECT(disass));
+ /* Actions post-désassemblage */
+
+ pglist = get_all_plugins_for_action(PGA_DISASS_PROCESS, &pgcount);
+
+ if (pgcount > 0)
+ {
+ for (i = 0; i < pgcount; i++)
+ g_plugin_module_execute_action_on_binary(pglist[i], binary, PGA_DISASS_PROCESS);
+
+ free(pglist);
+
+ }
+
return result;
}
diff --git a/src/analysis/disass/disassembler.h b/src/analysis/disass/disassembler.h
index 2a0f72a..54da069 100644
--- a/src/analysis/disass/disassembler.h
+++ b/src/analysis/disass/disassembler.h
@@ -31,7 +31,7 @@
/* Procède à la décompilation des routines d'un fichier donné. */
-GCodeBuffer *disassemble_binary(const GOpenidaBinary *, GBinPart **parts, size_t parts_count, GArchInstruction **);
+GCodeBuffer *disassemble_binary(GOpenidaBinary *, GBinPart **parts, size_t parts_count, GArchInstruction **);