Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

After a long period of hooking applications on Ubuntu, Python and JavaScript are unable to interact.

未关闭
#246 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, python, ubuntu, unity

调研方向

首先,使用提供的主入口点、Python 消息处理器和 JavaScript handleGetCount 函数,在 Ubuntu 上通过 Python 3.10.12 和 Frida 16.4.7 重现长时间运行的案例。检查该故障是否影响脚本消息、recv 调用或两者;确定了可重现的原因并在没有静默失败的情况下恢复通信,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Long-term hooking in Ubuntu causes the Python script to be unable to print logs from Frida and receive remote calls from Frida.
The scenario involves hooking into an IL2CPP Unity game on Ubuntu, but after running for a while, the aforementioned problem occurs. Python continues to run, and Frida is also hooking into the application normally, but there is no interaction between the two.

main

if __name__ == '__main__':
    manager = frida.get_device_manager()
    device = manager.get_local_device()
    pid = device.spawn(['my-application'])
    process = device.attach(pid)
    script = process.create_script(test_js)
    script.on('message', on_message)

    t1 = Thread(target=reportMatch)
    t1.start()
    print('[*] Running')
    script.load()
    device.resume(pid)
    sys.stdin.read()

python handle send function

if message['type'] == 'send':
        data = "{0}".format(message['payload'])
        if message['payload']["type"] == "sendCount":
            playersCount = message['payload']['count']
            print(playersCount)

js handle handleGetCount function

recv("getPlayersCount", handleGetCount);

    function handleGetCount() {
        recv("getPlayersCount", handleGetCount);
       //some function to get count
        send(new countData(count + "/" + maxCount));

    }

There is continuous interaction between them; Python calls a method in JavaScript every 5 seconds to retrieve some content, so there is no long period of inactivity. However, the situation mentioned above still occurs where it seems like Python and Frida have lost connection, yet they are both running normally without any exceptions. It is hoped that this issue can be resolved.
python version:3.10.12
frida version:16.4.7

The hook is for a local application, not a remote call, so theoretically, there should be no network-related reasons.
I'm looking forward to resolving this issue. If necessary, you can provide your email address to me, and I can provide more information. This issue is really troubling me~

主要语言
Python
星标
873
派生
173
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

frida/frida-python 的其他 Issue

查看 frida/frida-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。