summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/scan/rule.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/analysis/scan/rule.c b/src/analysis/scan/rule.c
index 650b824..60842c2 100644
--- a/src/analysis/scan/rule.c
+++ b/src/analysis/scan/rule.c
@@ -817,6 +817,8 @@ void g_scan_rule_output_to_json(const GScanRule *rule, GScanContext *context, co
size_t i; /* Boucle de parcours #1 */
bool sub_tail; /* Saut de la virgule finale ? */
size_t k; /* Boucle de parcours #2 */
+ GBinContent *content; /* Contenu binaire scanné */
+ char *desc; /* Description de ce contenu */
/* Introduction */
@@ -872,6 +874,25 @@ void g_scan_rule_output_to_json(const GScanRule *rule, GScanContext *context, co
write(fd, "],\n", 3);
+ /* Cible du scan */
+
+ for (i = 0; i < (level + 1); i++)
+ write(fd, padding->data, padding->len);
+
+ write(fd, "\"target\": \"", 11);
+
+ content = g_scan_context_get_content(context);
+
+ desc = g_binary_content_describe(content, true);
+
+ write(fd, desc, strlen(desc));
+
+ free(desc);
+
+ g_object_unref(G_OBJECT(content));
+
+ write(fd, "\",\n", 3);
+
/* Affichage des correspondances d'octets */
for (i = 0; i < (level + 1); i++)