Skip to content

unable to get processes in older Python versions #184

Open

Description

@le91688

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 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions