需求: 想用frida跟踪函数调用
问题:
按照frida官网说的重新签名并链接frida的dylib,打开app,显示Frida: Listening on 127.0.0.1 TCP port 27042
完就一直卡着。是需要做什么attach resume之类的操作么?
安装frida命令行
python 2.7下
pip install --user frida
有报错:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/hz/mlsqptvn0131ks2dh9q6tdxw0000gn/T/pip-build-e3TNxQ/frida/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/hz/mlsqptvn0131ks2dh9q6tdxw0000gn/T/pip-2XYlOY-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/var/folders/hz/mlsqptvn0131ks2dh9q6tdxw0000gn/T/pip-build-e3TNxQ/frida/
官网的教程太简略了。。有详细一点的教程么
Zhang
2017 年8 月 4 日 06:41
2
listening就是说这个时候你可以连接上去了啊
官网说
Looking good. If we now attach() to this process it will cause the app to finish launching. However, if we first spawn([“re.frida.Gadget”]) we will be able to attach() and apply our instrumentation, and the app will not carry on launching until we call resume(). This means we can attach() right away for late instrumentation, or we can spawn() to perform early instrumentation.
但我确实看不出来具体要做什么操作。。
真重要的是命令行安装程序一直报错,跑都跑不了 = =
error都贴出来了
报错前最后一步指令在附件里
error.txt (3.7 KB)
Zhang
2017 年8 月 6 日 08:57
6
zipfile.BadZipfile: File is not a zip file
应该是它们release的问题吧。。。我 记得frida可以自己从源码编译带pypi?
pip install --user --extra-index-url --trusted-host http://pypi.douban.com/simple/ frida
错误提示
Cannot unpack file /private/var/folders/hz/mlsqptvn0131ks2dh9q6tdxw0000gn/T/pip-mVAAu2-unpack/simple (downloaded from /private/var/folders/hz/mlsqptvn0131ks2dh9q6tdxw0000gn/T/pip-ZxBVgG-build, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of /private/var/folders/hz/mlsqptvn0131ks2dh9q6tdxw0000gn/T/pip-ZxBVgG-build
很僵。。。google出来众说纷纭,但都没用。。
Frida安装
一:升级python
1.先安装homebrew(已安装就跳过),在terminal中输入命令:
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )”
2.使用homebrew安装python3,在terminal中输入:
brew install python3
会安装最新版的python
二:开始安装
在terminal中输入:
pip3 install --user frida
好吧,不知道还有个 pip3,换成 pip3 再翻个墙就好了
感谢各位
zarkx
(zarkx)
2018 年4 月 21 日 06:49
14
还是回复一下吧,我也遇到楼主一样的问题,有位大佬说 pypi 被强导致 zip 文件不完整,我想到以前换了镜像的,然后一个个测试发现清华大学和中国科学技术大学的可以,其他的镜像阿里豆瓣那些都直接搜不到frida,折腾好久还是不行,他说找不到文件我就手动下载了一个egg包丢到/Users/lxmac/frida-10.7.7-py2.7-macosx-10.11-intel.egg ,然后在安装直接就成功了,下载地址: https://pypi.org/project/frida/#files