目录
1、ImportError: No module named google.protobuf
2、ImportError: No module named OpenSSL
drozer安装使用的前提是要下载drozer电脑版及apk、安装jdk、python27、adb
一、JDK卸载、下载、安装及配置
1、JDK卸载
jdk是我们JAVA开发必须的环境,但我们在使用电脑的过程中不同的软件依赖的jdk版本不一样,就要需要来回的卸载再安装jdk。那如何干净的卸载掉jdk呢?
开始---设置---应用
找到jdk的两个程序:java 8 update 191和java SE Development Kit8 update 191,点击---卸载,即可卸载干净
2、openjdk下载
官网上JDK的版本都太高,找了openjdk,选择低版本的jdk安装
下载地址
点击左边的zip包,即可下载,zip包为免安装版,解压缩后,直接配置环境变量即可
3、JDK环境变量配置
我的电脑---右击属性---高级系统设置---环境变量---新建
变量名:JAVA_HOME
变量值:D:\software\jdk8u382-b05
新建变量名:ClassPath
变量值:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
Path编辑---新建
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin
cmd命令,java -version,响应如下,即证明安装配置成功
二、python27安装配置
python官网,选择需要的版本,下载即可
我是习惯性安装在C盘,如下
path里添加环境变量
C:\Python27
C:\Python27\Scripts
三、adb下载及配置
adb下载路径:ADB Download - Get the latest version of ADB and fastboot
下载后,解压缩,剪切到python路径下
path里添加环境变量
C:\Python27\Scripts\adb
四、drozer下载安装及使用
1、drozer下载
https://github.com/WithSecureLabs/drozer/releases
点进去drozer对应的版本,下载drozer电脑端和apk
注意,电脑上的drozer版本的手机上的agent.apk版本要一致
2、PC端drozer安装
drozer安装的时候,配置安装路径为C:\Python27,其余选项均默认即可安装成功
3、客户端drozer安装
将drozer.apk拖到模拟器即可自动安装
点击该软件,打开页面如下
点击Disabled,变为Enabled
执行命令adb connect 127.0.0.1:62001,可将drozer指向模拟器
C:\Users>adb connect 127.0.0.1:62001
adb server version (36) doesn't match this client (41); killing...
* daemon started successfully
connected to 127.0.0.1:62001
依次运行如下命令,当命令窗口跟客户端展示如下,即表示pc端和客户端的drozer联动了,可执行drozer命令了
adb forward tcp:31415 tcp:31415
drozer.bat console connect
C:\Users>adb forward tcp:31415 tcp:31415
31415
C:\Users>drozer.bat console connect
C:\Python27\lib\site-packages\OpenSSL\crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography import utils, x509
:0: UserWarning: You do not have a working installation of the service_identity module: 'No module named service_identity'. Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied. Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected.
Selecting b4a44cb7ea0e5962 (samsung SM-N976N 7.1.2)
.. ..:.
..o.. .r..
..a.. . ....... . ..nd
ro..idsnemesisand..pr
.otectorandroidsneme.
.,sisandprotectorandroids+.
..nemesisandprotectorandroidsn:.
.emesisandprotectorandroidsnemes..
..isandp,..,rotectorandro,..,idsnem.
.isisandp..rotectorandroid..snemisis.
,andprotectorandroidsnemisisandprotec.
.torandroidsnemesisandprotectorandroid.
.snemisisandprotectorandroidsnemesisan:
.dprotectorandroidsnemesisandprotector.
drozer Console (v2.4.4)
dz>
四、drozer报错排查解决
1、ImportError: No module named google.protobuf
报没有google.protobuf,那安就完了
pip install google.protobuf
可你又报我pip版本太低,我的老天鹅啊,你要整死我么
那就升级pip的版本
参考另一个朋友的,升级到了指定的版本
pip install --upgrade pip==<desired_version>
可升级到指定版本,你又提示我,要最新版本,o(╥﹏╥)o
为了用你,没办法,继续升级
pip install --upgrade pip
升级到最新版本
升级完了,那继续安装google.protobuf,还是报错呀,咋个情况捏
寻摸了一圈儿,才发现,该分别安装
pip install google
pip install protobuf
over
2、ImportError: No module named OpenSSL
报没有OpenSSL,那我就安装呗
可是一直找不到资源
那我就用国内的源呗
阿里 https://mirrors.aliyun.com/pypi/simple
豆瓣 http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple
中国科学技术大学 https://pypi.mirrors.ustc.edu.cn/simple
华中理工大学 http://pypi.hustunique.com/simple
山东理工大学 http://pypi.sdutlinux.org/simple
网易 https://mirrors.163.com/pypi/simple/
腾讯 https://mirrors.cloud.tencent.com/pypi/simple
分别运行以下命令
pip install OpenSSL -i https://mirrors.aliyun.com/pypi/simple
pip install OpenSSL -i http://pypi.douban.com/simple/
pip install OpenSSL -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install OpenSSL -i https://pypi.mirrors.ustc.edu.cn/simple
pip install OpenSSL -i http://pypi.hustunique.com/simple
pip install OpenSSL -i http://pypi.sdutlinux.org/simple
pip install OpenSSL -i https://mirrors.163.com/pypi/simple/ --trusted-host mirrors.163.com
pip install OpenSSL -i https://mirrors.cloud.tencent.com/pypi/simple --trusted-host mirrors.cloud.tencent.com
可还是没安装上呢,怪了哦
再次求助度娘,才发现,竟然是要安装pyOpenSSL,小朋友,你是不是有很多的问号,我不李姐
pip install pyOpenSSL
不过好在,安装成功了,开整,干活儿