frida-python
frida-python copied to clipboard
unable to get processes in older Python versions
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