Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to get processes in older Python versions #184

Open
le91688 opened this issue Aug 3, 2021 · 0 comments
Open

unable to get processes in older Python versions #184

le91688 opened this issue Aug 3, 2021 · 0 comments

Comments

@le91688
Copy link

le91688 commented Aug 3, 2021

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 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant