mirror of
https://github.com/frida/frida-python.git
synced 2026-11-07 09:35:57 -10:00
Reformat with black 26.3.1
This commit is contained in:
1 parent
8bc4415f34
commit
a9caf62a0c
7 files changed
+11
-19
No files matched your search
@@ -42,8 +42,7 @@ class Application:
|
||||
print("✔ enable_child_gating()")
|
||||
session.enable_child_gating()
|
||||
print("✔ create_script()")
|
||||
script = session.create_script(
|
||||
"""\
|
||||
script = session.create_script("""\
|
||||
Interceptor.attach(Module.getGlobalExportByName('open'), {
|
||||
onEnter(args) {
|
||||
send({
|
||||
@@ -52,8 +51,7 @@ Interceptor.attach(Module.getGlobalExportByName('open'), {
|
||||
});
|
||||
}
|
||||
});
|
||||
"""
|
||||
)
|
||||
""")
|
||||
script.on("message", lambda message, data: self._reactor.schedule(lambda: self._on_message(pid, message)))
|
||||
print("✔ load()")
|
||||
script.load()
|
||||
|
||||
@@ -15,7 +15,7 @@ def on_uninjected(id):
|
||||
print("on_uninjected id=%u" % id)
|
||||
|
||||
|
||||
(target, library_path) = sys.argv[1:]
|
||||
target, library_path = sys.argv[1:]
|
||||
|
||||
device = frida.get_local_device()
|
||||
device.on("uninjected", on_uninjected)
|
||||
|
||||
@@ -15,7 +15,7 @@ def on_uninjected(id):
|
||||
print("on_uninjected id=%u" % id)
|
||||
|
||||
|
||||
(target, library_path) = sys.argv[1:]
|
||||
target, library_path = sys.argv[1:]
|
||||
|
||||
device = frida.get_local_device()
|
||||
device.on("uninjected", on_uninjected)
|
||||
|
||||
+2
-4
@@ -1,8 +1,7 @@
|
||||
import frida
|
||||
|
||||
session = frida.attach("Twitter")
|
||||
script = session.create_script(
|
||||
"""\
|
||||
script = session.create_script("""\
|
||||
rpc.exports = {
|
||||
hello: function () {
|
||||
return 'Hello';
|
||||
@@ -11,8 +10,7 @@ rpc.exports = {
|
||||
oops;
|
||||
}
|
||||
};
|
||||
"""
|
||||
)
|
||||
""")
|
||||
script.load()
|
||||
api = script.exports_sync
|
||||
print("api.hello() =>", api.hello())
|
||||
|
||||
@@ -22,8 +22,7 @@ class Application:
|
||||
self._session = session
|
||||
session.on("detached", lambda *args: self._reactor.schedule(lambda: self._on_detached(*args)))
|
||||
|
||||
script = session.create_script(
|
||||
"""
|
||||
script = session.create_script("""
|
||||
let _puts = null;
|
||||
|
||||
Interceptor.attach(DebugSymbol.getFunctionByName('f'), {
|
||||
@@ -48,8 +47,7 @@ function puts(s) {
|
||||
}
|
||||
_puts(Memory.allocUtf8String(s));
|
||||
}
|
||||
"""
|
||||
)
|
||||
""")
|
||||
self._script = script
|
||||
script.on("message", lambda *args: self._reactor.schedule(lambda: self._on_message(*args)))
|
||||
script.load()
|
||||
|
||||
@@ -29,8 +29,7 @@ class Application:
|
||||
session = self._device.attach(pid)
|
||||
session.on("detached", lambda reason: self._reactor.schedule(lambda: self._on_detached(pid, session, reason)))
|
||||
print("✔ create_script()")
|
||||
script = session.create_script(
|
||||
"""\
|
||||
script = session.create_script("""\
|
||||
const puts = new NativeFunction(Module.getGlobalExportByName('puts'), 'int', ['pointer']);
|
||||
puts(Memory.allocUtf8String('Hello from Frida agent'));
|
||||
Interceptor.attach(Module.getGlobalExportByName('open'), {
|
||||
@@ -41,8 +40,7 @@ Interceptor.attach(Module.getGlobalExportByName('open'), {
|
||||
});
|
||||
}
|
||||
});
|
||||
"""
|
||||
)
|
||||
""")
|
||||
script.on("message", lambda message, data: self._reactor.schedule(lambda: self._on_message(pid, message)))
|
||||
print("✔ load()")
|
||||
script.load()
|
||||
|
||||
+1
-1
@@ -1318,7 +1318,7 @@ class EndpointParameters:
|
||||
_filter_missing_kwargs(kwargs)
|
||||
|
||||
if authentication is not None:
|
||||
(auth_scheme, auth_data) = authentication
|
||||
auth_scheme, auth_data = authentication
|
||||
if auth_scheme == "token":
|
||||
kwargs["auth_token"] = auth_data
|
||||
elif auth_scheme == "callback":
|
||||
|
||||
Reference in new issue
Block a user