frida.get_usb_device() can not works at first time.
まだ誰も着手していません。
評価
調査の方向性
Python 3.9 と Frida 14.0.0 で初回呼び出し時の失敗を再現し、トレースバックをもとに frida/init.py の get_usb_device と get_device_matching メソッド、および frida/core.py:get_device_matching を調査します。完了の条件は、初回の frida.get_usb_device() 呼び出しで、再試行や sleep を必要とせずに USB デバイスが見つかることです。
索引モデルが issue の本文から書いたものです。
説明
Please check the error logs as follow: (frida --version 14.0.0)
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import frida
>>> frida.get_usb_device()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Bytedance\AppData\Local\Programs\Python\Python39\lib\site-packages\frida\__init__.py", line 82, in get_usb_device
return get_device_matching(lambda d: d.type == 'usb', timeout, **kwargs)
File "C:\Users\Bytedance\AppData\Local\Programs\Python\Python39\lib\site-packages\frida\__init__.py", line 90, in get_device_matching
return get_device_manager().get_device_matching(predicate, timeout, **kwargs)
File "C:\Users\Bytedance\AppData\Local\Programs\Python\Python39\lib\site-packages\frida\core.py", line 26, in wrapper
return f(*args, **kwargs)
File "C:\Users\Bytedance\AppData\Local\Programs\Python\Python39\lib\site-packages\frida\core.py", line 58, in get_device_matching
return Device(self._impl.get_device_matching(lambda d: predicate(Device(d)), raw_timeout))
frida.InvalidArgumentError: device not found
>>> frida.get_usb_device()
Device(id="89EX0A89A", name="Pixel 3", type='usb')
As you saw it, went I call frida.get_usb_device() first time it will get an error. But if you try to call it second time, it's OK!
So I try to solve this problem as follow and it works:
try:
device = frida.get_usb_device()
except BaseException:
time.sleep(3)
device = frida.get_usb_device()
- 主要言語
- Python
- スター
- 873
- フォーク
- 173
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
frida/frida-python のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
frida/frida-python#265 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
frida/frida-python#262 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
frida/frida-python#247 · コメント 2 件 · リアクション 2 件 ·
-
After a long period of hooking applications on Ubuntu, Python and JavaScript are unable to interact. オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
frida/frida-python#246 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
frida/frida-python#243 ·
frida/frida-python の issue をすべて見る
似ている issue
-
area: harness bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Human-Agent-Society/reef#625 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
learningequality/kolibri#15351 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·