mirror of
https://github.com/frida/frida-python.git
synced 2026-11-11 10:01:27 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e3728b457 | ||
|
|
83fdc4d0af | ||
|
|
01b4662207 | ||
|
|
df7635122f | ||
|
|
726fc2e8d3 | ||
|
|
f240d70be2 | ||
|
|
254c16c5fe | ||
|
|
c1c5db7632 | ||
|
|
d34ce2d9f4 | ||
|
|
5fbd498d96 | ||
|
|
7480f5d919 | ||
|
|
bca04adce4 | ||
|
|
a9c2672611 | ||
|
|
abe0be49f0 | ||
|
|
a3c832be83 | ||
|
|
6580a0492b |
No files matched your search
@@ -627,6 +627,12 @@ class Script(Object):
|
||||
"""
|
||||
...
|
||||
|
||||
def interrupt(self) -> None:
|
||||
"""
|
||||
Interrupt any JavaScript currently executing in the script.
|
||||
"""
|
||||
...
|
||||
|
||||
def post(self, message: str, data: Optional[Union[str, bytes]] = None) -> None:
|
||||
"""
|
||||
Post a JSON-encoded message to the script.
|
||||
@@ -639,6 +645,12 @@ class Script(Object):
|
||||
"""
|
||||
...
|
||||
|
||||
def terminate(self) -> None:
|
||||
"""
|
||||
Interrupt execution and unload the script.
|
||||
"""
|
||||
...
|
||||
|
||||
def enable_debugger(self, port: Optional[int]) -> None:
|
||||
"""
|
||||
Enable the Node.js compatible script debugger
|
||||
|
||||
@@ -492,7 +492,9 @@ static FridaPortalOptions * PySession_parse_portal_options (const gchar * certif
|
||||
static PyObject * PyScript_new_take_handle (FridaScript * handle);
|
||||
static PyObject * PyScript_is_destroyed (PyScript * self);
|
||||
static PyObject * PyScript_load (PyScript * self);
|
||||
static PyObject * PyScript_interrupt (PyScript * self);
|
||||
static PyObject * PyScript_unload (PyScript * self);
|
||||
static PyObject * PyScript_terminate (PyScript * self);
|
||||
static PyObject * PyScript_eternalize (PyScript * self);
|
||||
static PyObject * PyScript_post (PyScript * self, PyObject * args, PyObject * kw);
|
||||
static PyObject * PyScript_enable_debugger (PyScript * self, PyObject * args, PyObject * kw);
|
||||
@@ -740,7 +742,9 @@ static PyMethodDef PyScript_methods[] =
|
||||
{
|
||||
{ "is_destroyed", (PyCFunction) PyScript_is_destroyed, METH_NOARGS, "Query whether the script has been destroyed." },
|
||||
{ "load", (PyCFunction) PyScript_load, METH_NOARGS, "Load the script." },
|
||||
{ "interrupt", (PyCFunction) PyScript_interrupt, METH_NOARGS, "Interrupt any JavaScript currently executing in the script." },
|
||||
{ "unload", (PyCFunction) PyScript_unload, METH_NOARGS, "Unload the script." },
|
||||
{ "terminate", (PyCFunction) PyScript_terminate, METH_NOARGS, "Interrupt execution and unload the script." },
|
||||
{ "eternalize", (PyCFunction) PyScript_eternalize, METH_NOARGS, "Eternalize the script." },
|
||||
{ "post", (PyCFunction) PyScript_post, METH_VARARGS | METH_KEYWORDS, "Post a JSON-encoded message to the script." },
|
||||
{ "enable_debugger", (PyCFunction) PyScript_enable_debugger, METH_VARARGS | METH_KEYWORDS, "Enable the Node.js compatible script debugger." },
|
||||
@@ -4412,6 +4416,20 @@ PyScript_load (PyScript * self)
|
||||
PyFrida_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
PyScript_interrupt (PyScript * self)
|
||||
{
|
||||
GError * error = NULL;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
frida_script_interrupt_sync (PY_GOBJECT_HANDLE (self), g_cancellable_get_current (), &error);
|
||||
Py_END_ALLOW_THREADS
|
||||
if (error != NULL)
|
||||
return PyFrida_raise (error);
|
||||
|
||||
PyFrida_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
PyScript_unload (PyScript * self)
|
||||
{
|
||||
@@ -4426,6 +4444,20 @@ PyScript_unload (PyScript * self)
|
||||
PyFrida_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
PyScript_terminate (PyScript * self)
|
||||
{
|
||||
GError * error = NULL;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
frida_script_terminate_sync (PY_GOBJECT_HANDLE (self), g_cancellable_get_current (), &error);
|
||||
Py_END_ALLOW_THREADS
|
||||
if (error != NULL)
|
||||
return PyFrida_raise (error);
|
||||
|
||||
PyFrida_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
PyScript_eternalize (PyScript * self)
|
||||
{
|
||||
|
||||
@@ -309,6 +309,15 @@ class Script:
|
||||
|
||||
self._impl.load()
|
||||
|
||||
@cancellable
|
||||
def interrupt(self) -> None:
|
||||
"""
|
||||
Interrupt any JavaScript currently executing in the script, leaving it
|
||||
loaded and able to run again
|
||||
"""
|
||||
|
||||
self._impl.interrupt()
|
||||
|
||||
@cancellable
|
||||
def unload(self) -> None:
|
||||
"""
|
||||
@@ -317,6 +326,15 @@ class Script:
|
||||
|
||||
self._impl.unload()
|
||||
|
||||
@cancellable
|
||||
def terminate(self) -> None:
|
||||
"""
|
||||
Interrupt execution and unload the script, even if it is stuck in a
|
||||
long-running or infinite operation
|
||||
"""
|
||||
|
||||
self._impl.terminate()
|
||||
|
||||
@cancellable
|
||||
def eternalize(self) -> None:
|
||||
"""
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[wrap-git]
|
||||
url = https://github.com/frida/frida-core.git
|
||||
revision = 17.12.0
|
||||
revision = 17.15.3
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
|
||||
Reference in new issue
Block a user