前言
Charles抓包https时,已经信任了charles的证书,但是还是出现红XX,unkonw的状态,这时候就需要用到ssl插件,这个插件的作用就是一旦加载到iOS或OS X应用程序中,SSL Kill Switch 2在Secure Transport API中修补特定的低级别SSL功能,以覆盖并禁用系统的默认证书验证以及任何类型的自定义证书验证。
实践:
1、打包.deb
ln -s /<path_to_your_theos_folder> theos
wifi:ssl-kill-switch2-master clf$ ln -s /opt/theos theos
make package
wifi:ssl-kill-switch2-master clf$ make package
> Making all for tweak SSLKillSwitch2…
==> Compiling SSLKillSwitch/SSLKillSwitch.m (armv7)…
==> Linking tweak SSLKillSwitch2 (armv7)…
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
==> Compiling SSLKillSwitch/SSLKillSwitch.m (arm64)…
==> Linking tweak SSLKillSwitch2 (arm64)…
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
==> Merging tweak SSLKillSwitch2…
==> Signing SSLKillSwitch2…
> Making stage for tweak SSLKillSwitch2…
ERROR: package name has characters that aren't lowercase alphanums or '-+.'.
make: *** [internal-package] Error 255
错误是control中打包的名字需要小写,修改重新打包
wifi:ssl-kill-switch2-master clf$ make package
> Making all for tweak SSLKillSwitch2…
make[2]: Nothing to be done for `internal-library-compile'.
> Making stage for tweak SSLKillSwitch2…
dm.pl: building package `com:iphoneos-arm' in `./packages/com.nablac0d3.sslkillswitch_0.11-1+debug_iphoneos-arm.deb'
2、手机安装deb
确保手机安装了以下依赖项:
- Debian Packager
- Cydia Substrate
- PreferenceLoader
将刚刚打包好的.deb文件拷贝到手机上,这里我放在/usr/local/bin/路径下。
wifi:~ clf$ ssh root@192.168.2.2
root@192.168.2.2's password:
dpkg -i <package>.deb
iPhone:~ root# dpkg -i /usr/local/bin/com.nablac0d3.sslkillswitch_0.11-1+debug_iphoneos-arm.deb
Selecting previously deselected package com.nablac0d3.sslkillswitch.
(Reading database ... 1174 files and directories currently installed.)
Unpacking com.nablac0d3.sslkillswitch (from .../com.nablac0d3.sslkillswitch_0.11-1+debug_iphoneos-arm.deb) ...
Setting up com.nablac0d3.sslkillswitch (0.11-1+debug) ...
killall -HUP SpringBoard
iPhone:~ root# killall -HUP SpringBoard