summaryrefslogtreecommitdiff
path: root/plugins/apihashing/classics/ror13.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/apihashing/classics/ror13.c')
-rw-r--r--plugins/apihashing/classics/ror13.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/plugins/apihashing/classics/ror13.c b/plugins/apihashing/classics/ror13.c
index 6e063f8..1b2421d 100644
--- a/plugins/apihashing/classics/ror13.c
+++ b/plugins/apihashing/classics/ror13.c
@@ -62,6 +62,9 @@ static uint32_t compute_ror13(const sized_binary_t *);
/* Transforme une séquence d'octets pour motif de recherche. */
static bool g_scan_ror13_modifier_transform(const GScanRor13Modifier *, const sized_binary_t *, size_t, sized_binary_t **, size_t *);
+/* Retrouve l'origine d'une correspondance à partir d'un indice. */
+static char *g_scan_ror13_modifier_get_path(const GScanRor13Modifier *, size_t *);
+
/* ---------------------------------------------------------------------------------- */
@@ -100,6 +103,7 @@ static void g_scan_ror13_modifier_class_init(GScanRor13ModifierClass *klass)
modifier->get_name = (get_scan_modifier_name_fc)g_scan_ror13_modifier_get_name;
modifier->transform = (transform_scan_token_fc)g_scan_ror13_modifier_transform;
+ modifier->get_path = (get_modifier_path)g_scan_ror13_modifier_get_path;
}
@@ -286,3 +290,34 @@ static bool g_scan_ror13_modifier_transform(const GScanRor13Modifier *modifier,
return result;
}
+
+
+/******************************************************************************
+* *
+* Paramètres : modifier = modificateur à consulter. *
+* index = indice de la combinaison ciblée. [OUT] *
+* *
+* Description : Retrouve l'origine d'une correspondance à partir d'un indice.*
+* *
+* Retour : Version humainement lisible de la combinaison. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static char *g_scan_ror13_modifier_get_path(const GScanRor13Modifier *modifier, size_t *index)
+{
+ char *result; /* Combinaison à retourner */
+
+ if (*index > 0)
+ {
+ result = NULL;
+ (*index)--;
+ }
+
+ else
+ result = strdup("rev");
+
+ return result;
+
+}