Custom agent with Java bridge
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java, javascript, python
调研方向
首先使用 frida-python 的 session.create_script 和 script.load 调用,结合 frida_java_bridge.js 以及 issue 中展示的独立脚本源,复现该示例。调查在不拼接源代码的情况下,加载 bridge 是否能够保留 Java.perform 的行为。完成标准是:自定义 agent 在 bridge 单独加载的情况下能够正常工作,并且用户脚本中的错误仍保留有用的行号。
由索引模型根据 Issue 内容生成。
描述
Hi,
So with Frida 17, runtime bridges, such as the Java runtime bridge, must be added manually to a custom agent script.
This works for me when concatenating the bridge code with whatever other Frida script I want to load, and then calling script.load from python.
The problem is that it's harder to debug bugs in a Frida script, when the error message points to line ~13'000, because the buggy Frida script was appended to the bridge script. Is there a way to load the bridge script separately?
The following script shows the problem:
import frida
import os
import time
process = "SOME APP"
device = frida.get_usb_device()
pid = device.get_process(process).pid
session = device.attach(pid)
with open('/home/user/frida_java_bridge.js', 'r') as bridgefile:
bridge_source = bridgefile.read()
script1_source = """
console.log('hello form script1')
"""
script2_source = """
console.log('hello form script2a');
Java.perform(function() {console.log('inside Java runtime')});
console.log('hello form script2b');
"""
bridge= session.create_script(bridge_source)
script1 = session.create_script(script1_source)
script2 = session.create_script(script2_source)
print("one by one:")
bridge.load()
script1.load()
script2.load()
print("concatenated:")
script3 = session.create_script(bridge_source + script2_source)
script3.load()
output:
one by one:
hello form script1
hello form script2a
concatenated:
hello form script2a
inside Java runtime
hello form script2b
- 主要语言
- Python
- 星标
- 873
- 派生
- 173
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
frida/frida-python 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
frida/frida-python#262 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
frida/frida-python#247 · 2 条评论 · 2 个 reaction ·
-
After a long period of hooking applications on Ubuntu, Python and JavaScript are unable to interact. 未关闭
难度 4/5 3-5 天 新手友好度 25/100
frida/frida-python#246 ·
-
难度 4/5 3-5 天 新手友好度 20/100
frida/frida-python#243 ·
-
难度 2/5 1-3 小时 新手友好度 42/100
frida/frida-python#242 · 1 条评论 ·
查看 frida/frida-python 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·