summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-09-22 07:26:29 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-09-22 07:26:29 (GMT)
commite5d10374c2aa3cedd679f34fb61457bd0b1c1d53 (patch)
tree72a50bbc989d95d4c869f3b47dffb2dccca41571 /plugins
parent78c0975c334111a4d3ed6c5890d995287e6e5419 (diff)
Provided a way to load known flat formats.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pychrysalide/analysis/loading.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/plugins/pychrysalide/analysis/loading.c b/plugins/pychrysalide/analysis/loading.c
index 44930cd..f785a53 100644
--- a/plugins/pychrysalide/analysis/loading.c
+++ b/plugins/pychrysalide/analysis/loading.c
@@ -44,6 +44,9 @@
/* Ajoute un nouveau contenu découvert au crédit d'un groupe. */
static PyObject *py_content_explorer_populate_group(PyObject *, PyObject *);
+/* Note un contenu chargé pour future intégration guidée. */
+static PyObject *py_content_explorer_note_detected(PyObject *, PyObject *);
+
/* ------------------- RESOLUTION DE CONTENUS BINAIRES EN CHARGES ------------------- */
@@ -96,6 +99,43 @@ static PyObject *py_content_explorer_populate_group(PyObject *self, PyObject *ar
}
+/******************************************************************************
+* *
+* Paramètres : self = classe représentant un binaire. *
+* args = arguments fournis à l'appel. *
+* *
+* Description : Note un contenu chargé pour future intégration guidée. *
+* *
+* Retour : None. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_content_explorer_note_detected(PyObject *self, PyObject *args)
+{
+ PyObject *result; /* Valeur à retourner */
+ unsigned long long wid; /* Identifiant de groupe */
+ PyObject *loaded_obj; /* Contenu chargé en Python */
+ int ret; /* Bilan de lecture des args. */
+ GContentExplorer *explorer; /* Explorateur à manipuler */
+ GLoadedContent *loaded; /* Contenu chargé au final */
+
+ ret = PyArg_ParseTuple(args, "KO!", &wid, get_python_loaded_content_type(), &loaded_obj);
+ if (!ret) Py_RETURN_NONE;
+
+ explorer = G_CONTENT_EXPLORER(pygobject_get(self));
+ loaded = G_LOADED_CONTENT(pygobject_get(loaded_obj));
+
+ g_content_explorer_note_detected(explorer, wid, loaded);
+
+ result = Py_None;
+ Py_INCREF(result);
+
+ return result;
+
+}
+
/******************************************************************************
* *
@@ -117,6 +157,11 @@ PyTypeObject *get_python_content_explorer_type(void)
METH_VARARGS,
"populate_group($self, wid, content, /)\n--\n\nPush a new binary content into the list to explore."
},
+ {
+ "note_detected", py_content_explorer_note_detected,
+ METH_VARARGS,
+ "note_detected($self, wid, loaded, /)\n--\n\nMark a loaded content as one final candidate."
+ },
{ NULL }
};