summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-08-06 21:34:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-08-06 21:34:51 (GMT)
commitb070fb755b9e32bfa80e8854606f431d285ca23e (patch)
tree4a5cf3b8e6516cf3b93ac1fc64c1d18008c0f3e2 /src/analysis
parentc4b5b5d4d88dc60caad7a10b22c38cc796fdec08 (diff)
Extended the API to allow obfuscators detections.
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/loaded.c28
-rw-r--r--src/analysis/loaded.h3
-rw-r--r--src/analysis/routine.c2
-rw-r--r--src/analysis/routine.h2
4 files changed, 33 insertions, 2 deletions
diff --git a/src/analysis/loaded.c b/src/analysis/loaded.c
index a035e5e..9b7a2ff 100644
--- a/src/analysis/loaded.c
+++ b/src/analysis/loaded.c
@@ -370,6 +370,34 @@ const char *g_loaded_content_describe(const GLoadedContent *content, bool full)
}
+/******************************************************************************
+* *
+* Paramètres : content = élément chargé à consulter. *
+* version = précise si les versions doivent être recherchées. *
+* count = nombre de types d'obscurcissement trouvés. [OUT] *
+* *
+* Description : Etablit une liste d'obscurcissements présents. *
+* *
+* Retour : Désignations humaines correspondantes à libérer après usage *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+char **g_loaded_content_detect_obfuscators(const GLoadedContent *content, bool version, size_t *count)
+{
+ char **result; /* Liste à retourner */
+
+ result = NULL;
+ *count = 0;
+
+ detect_external_tools(PGA_DETECTION_OBFUSCATORS, content, version, &result, count);
+
+ return result;
+
+}
+
+
/* ---------------------------------------------------------------------------------- */
/* GESTION DYNAMIQUE DES VUES */
diff --git a/src/analysis/loaded.h b/src/analysis/loaded.h
index 71e1ff6..60d1fce 100644
--- a/src/analysis/loaded.h
+++ b/src/analysis/loaded.h
@@ -79,6 +79,9 @@ bool g_loaded_content_analyze_and_wait(GLoadedContent *);
/* Fournit le désignation associée à l'élément chargé. */
const char *g_loaded_content_describe(const GLoadedContent *, bool);
+/* Etablit une liste d'obscurcissements présents. */
+char **g_loaded_content_detect_obfuscators(const GLoadedContent *, bool, size_t *);
+
/* --------------------------- GESTION DYNAMIQUE DES VUES --------------------------- */
diff --git a/src/analysis/routine.c b/src/analysis/routine.c
index 3b47930..edb9cb3 100644
--- a/src/analysis/routine.c
+++ b/src/analysis/routine.c
@@ -491,7 +491,7 @@ size_t g_binary_routine_get_args_count(const GBinRoutine *routine)
* *
******************************************************************************/
-GBinVariable *g_binary_routine_get_arg(GBinRoutine *routine, size_t index)
+GBinVariable *g_binary_routine_get_arg(const GBinRoutine *routine, size_t index)
{
GBinVariable *result; /* Argument à retourner */
diff --git a/src/analysis/routine.h b/src/analysis/routine.h
index e1512a8..1a2cd92 100644
--- a/src/analysis/routine.h
+++ b/src/analysis/routine.h
@@ -105,7 +105,7 @@ void g_binary_routine_add_arg(GBinRoutine *, GBinVariable *);
size_t g_binary_routine_get_args_count(const GBinRoutine *);
/* Fournit un argument d'une routine. */
-GBinVariable *g_binary_routine_get_arg(GBinRoutine *, size_t);
+GBinVariable *g_binary_routine_get_arg(const GBinRoutine *, size_t);
/* Retire un argument d'une routine. */
void g_binary_routine_remove_arg(GBinRoutine *, size_t);