frida.TransportError:连接已关闭

问题描述 投票:0回答:1

我运行了 Python

1.py
我收到以下错误:

Traceback (most recent call last):
File "1.py", line 5, in 
pid = device.spawn(["com.example.a11x256.frida_test"])
File "/usr/local/lib/python2.7/dist-packages/frida/core.py", line 98, in spawn
return self._impl.spawn(program, argv, envp, env, cwd, stdio, aux_options)
frida.TransportError: the connection is closed

我在下面提到了 adb devices 的结果:

List of devices attached
emulator-5554   device
192.168.56.101:5555 device

弗里达-PS-你将在下面

PID Name 
55 adbd
6051 android.process.acore
5968 android.process.media
5877 com.android.browser
5472 com.android.deskclock
6025 com.android.dialer
4386 com.android.inputmethod.latin
4440 com.android.launcher
4423 com.android.phone
6134 com.android.sharedstoragebackup
4529 com.android.smspush
4236 com.android.systemui
5926 com.android.vending
5709 com.example.a11x256.frida_test
6076 com.google.android.gm
4681 com.google.android.gms
.
.
.

frida 工作正常,但在使用 Python 进行自动化时遇到一些问题 我的 Python 是 2.7,当我将 python3 与 1.py 一起使用时,出现以下错误 回溯(最近一次调用最后一次): 文件“1.py”,第 2 行,位于 进口弗里达 ModuleNotFoundError:没有名为“frida”的模块

我的1.py文件也在下面

#python code
import frida
import time
device = frida.get_usb_device(1)
pid = device.spawn(["com.example.a11x256.frida_test"])
device.resume(pid)
time.sleep(1) #Without it Java.perform silently fails
session = device.attach(pid)
script = session.create_script(open("s1.js").read())
script.load()

#prevent the python script from terminating
raw_input()

有什么解决办法吗?

android python malware frida
1个回答
0
投票

重新启动设备上的 frida 服务器似乎可以解决该问题。

© www.soinside.com 2019 - 2024. All rights reserved.