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

unable to get processes in older Python versions

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

还没有人认领这个 Issue。

评估

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

调研方向

从 frida/core.py 中的 enumerate_processes()、get_process() 和 attach() 开始,然后将它们在 Python 3.6/3.7 下的行为与正常工作的 Python 3.8 设置进行比较。使用 frida-ps -U 和报告的进程名称来复现不一致;当进程查找返回预期进程,并且 attach 对同一个正在运行的目标不再失败时,即表示完成。

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

描述

enumerate_processes() / attach / processed that end up calling get_process() fail to get all processes when using python3.6 / 3.7

  File "/usr/local/lib/python3.6/dist-packages/frida-15.0.12-py3.6-linux-x86_64.egg/frida/core.py", line 26, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/frida-15.0.12-py3.6-linux-x86_64.egg/frida/core.py", line 165, in attach
    return Session(self._impl.attach(self._pid_of(target), *args, **kwargs))
  File "/usr/local/lib/python3.6/dist-packages/frida-15.0.12-py3.6-linux-x86_64.egg/frida/core.py", line 193, in _pid_of
    return self.get_process(target).pid
  File "/usr/local/lib/python3.6/dist-packages/frida-15.0.12-py3.6-linux-x86_64.egg/frida/core.py", line 26, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/frida-15.0.12-py3.6-linux-x86_64.egg/frida/core.py", line 121, in get_process
    raise _frida.ProcessNotFoundError("unable to find process with name '%s'" % process_name)

When i switch to python 3.8.1 and run the same script, it works flawlessly

I ensured the process was actually running via frida-ps -U | grep <myproc> (uses my system default python of 3.8) and verifying with ps -ef via shell and its indeed running

What seems to be happening, is some apps are being returned to Frida's process list with their application name instead of package name for the same pid . example ( instead of com.z.foo , it shows as Foo)

Attempts to connect to Foo instead of com.z.foo fail with

frida.ServerNotRunningError: unable to connect to remote frida-server: Connection closed 
主要语言
Python
星标
873
派生
173
PR 合并指标
30 天内没有已合并 PR

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

frida/frida-python 的其他 Issue

查看 frida/frida-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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