summaryrefslogtreecommitdiff
path: root/plugins/pychrysa
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-11-12 20:19:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-11-12 20:19:25 (GMT)
commit0194351c3401df90ab8f7cffb0d40968fb4c31ad (patch)
treeeacc2d17769cf91685cdbe3c33ea789fb81fa01b /plugins/pychrysa
parent771f21b9d5dd2b394359304a660418bbc84befda (diff)
Provided a way to wait for analysis endings without signals.
Diffstat (limited to 'plugins/pychrysa')
-rw-r--r--plugins/pychrysa/analysis/binary.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/plugins/pychrysa/analysis/binary.c b/plugins/pychrysa/analysis/binary.c
index 687565a..6be767c 100644
--- a/plugins/pychrysa/analysis/binary.c
+++ b/plugins/pychrysa/analysis/binary.c
@@ -48,6 +48,9 @@ static PyObject *py_loaded_binary_get_name(PyObject *, void *);
/* Lance l'analyse d'un élément binaire chargé. */
static PyObject *py_loaded_binary_analyse(PyObject *, PyObject *);
+/* Lance l'analyse d'un binaire chargé et attend sa conclusion. */
+static PyObject *py_loaded_binary_analyse_and_wait(PyObject *, PyObject *);
+
/* Fournit le format de fichier reconnu dans le contenu binaire. */
static PyObject *py_loaded_binary_get_format(PyObject *, void *);
@@ -161,6 +164,32 @@ static PyObject *py_loaded_binary_analyse(PyObject *self, PyObject *args)
/******************************************************************************
* *
+* Paramètres : self = contenu binaire à manipuler. *
+* args = non utilisé ici. *
+* *
+* Description : Lance l'analyse d'un binaire chargé et attend sa conclusion. *
+* *
+* Retour : Rien (None). *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_loaded_binary_analyse_and_wait(PyObject *self, PyObject *args)
+{
+ GLoadedBinary *binary; /* Version GLib du format */
+
+ binary = G_LOADED_BINARY(pygobject_get(self));
+
+ g_loaded_binary_analyse_and_wait(binary);
+
+ Py_RETURN_NONE;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : self = objet Python concerné par l'appel. *
* closure = non utilisé ici. *
* *
@@ -273,6 +302,12 @@ PyTypeObject *get_python_loaded_binary_type(void)
"analyse(/)\n--\n\nStart the analysis of the loaded binary and " \
"send a \"disassembly-done\" signal when done."
},
+ {
+ "analyse_and_wait", py_loaded_binary_analyse_and_wait,
+ METH_NOARGS,
+ "analyse_and_wait(/)\n--\n\nRun the analysis of the loaded binary and " \
+ "wait for its completion."
+ },
{ NULL }
};