noobpk / frida-android-hook

A tool that helps you work with frida easily for Android platform
MIT License
456 stars 73 forks source link

ModuleNotFoundError: No module named 'frida' #35

Closed brunoaduarte closed 1 year ago

brunoaduarte commented 1 year ago
frida-android-hook> pip3 install -r requirements.txt
Requirement already satisfied: requests==2.28.1 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (2.28.1)
Requirement already satisfied: frida==16.0.2 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (16.0.2)
Requirement already satisfied: colorlog==6.7.0 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 3)) (6.7.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from requests==2.28.1->-r requirements.txt (line 1)) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from requests==2.28.1->-r requirements.txt (line 1)) (2022.9.24)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from requests==2.28.1->-r requirements.txt (line 1)) (1.26.12)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from requests==2.28.1->-r requirements.txt (line 1)) (2.1.1)
Requirement already satisfied: setuptools in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from frida==16.0.2->-r requirements.txt (line 2)) (58.1.0)
Requirement already satisfied: colorama in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from colorlog==6.7.0->-r requirements.txt (line 3)) (0.4.6)

frida-android-hook> frida --version
16.0.2

frida-android-hook> python3.exe .\setup.py
[+] Build executable for Windows success.

frida-android-hook> cd .\frida-android-hook\
frida-android-hook> python3 .\androidhook.py --fs-start
Traceback (most recent call last):
  File "E:\frida-android-hook\frida-android-hook\core\hook.py", line 1, in <module>
    import frida
ModuleNotFoundError: No module named 'frida'

Same error occurs with frida==15.1.17

brunoaduarte commented 1 year ago

Nevermind, I forced it to execute python instead of python3 and it worked

    # if(which('python3') is not None):
    #     command = shlex.split("python3 " +"core/hook.py")
    # else:
    #     command = shlex.split("python " +"core/hook.py")
    command = shlex.split("python " +"core/hook.py")

btw

frida-android-hook> python --version
Python 3.10.3
frida-android-hook> python3 --version
Python 3.10.8