我的demo:CycriptTest , 工程里面写几个方法就够了, 主要是用来测试方法的响应 , 最好写几个可以触发的那种方法
1.直接运行我(你)的工程2.生成ipa,重签名 ,安装到手机上
class-dump -H YourIPA -o Header
我使用的是我自己工程下面的LoginViewControllerLogify.pl脚本在你安装theos的时候就自带了所以:/opt/theos/bin/logify.pl LoginViewController.h >Tweak.xm____________________________________________________localhost:~ DH$ cd /Users/DH/Desktop/CycriptTest localhost:CycriptTest DH$ /opt/theos/bin/logify.pl /Users/DH/Desktop/CycriptTest/Header/LoginViewController.h >Tweak.xmlocalhost:CycriptTest DH$
.
.
localhost:CycriptTest DH$ /opt/theos/bin/nic.plNIC 2.0 - New Instance Creator------------------------------ [1.] iphone/activator_event [2.] iphone/application_modern [3.] iphone/cydget [4.] iphone/flipswitch_switch [5.] iphone/framework [6.] iphone/ios7_notification_center_widget [7.] iphone/library [8.] iphone/notification_center_widget [9.] iphone/preference_bundle_modern [10.] iphone/tool [11.] iphone/tweak [12.] iphone/xpc_serviceChoose a Template (required): 11Project Name (required): TrackFunctionPackage Name [com.yourcompany.trackfunction]: com.coralsec Author/Maintainer Name [小伍]: 小xiaowu[iphone/tweak] MobileSubstrate Bundle filter [com.apple.springboard]: com.coralsec.cycriptest[iphone/tweak] List of applications to terminate upon installation (space-separated, '-' for none) [SpringBoard]: CycriptTestInstantiating iphone/tweak in trackfunction/...Done.localhost:CycriptTest DH$ 最后一个我写的是我工程的可执行文件的名字, 为了是在安装了插件之后能直接关闭, 要不还要自己手动关闭重新打开
用我们刚才生成的Tweak 替换刚才创建的theos项目的Tweak.xm
记得在MakeFile中添加THEOS_DEVICE_IP = 192.168.1.24ding_FRAMEWORKS=UIKit Foundation直接在有MakeFile界面的文件夹下 make package install
==> Error: /Applications/Xcode.app/Contents/Developer/usr/bin/make install requires that you set THEOS_DEVICE_IP in your environment.
显然是没指定设备ip
localhost:trackfunction DH$ export THEOS_DEVICE_IP=192.168.1.24
ssh: connect to host 192.168.1.24 port 22: Host is downmake: *** [internal-install] Error 255
又有错误了, 没发现进程, 找不到CycriptTest
No matching processes were foundmake: *** [after-install] Error 1
, 把CycriptTest 打开就好了, 或者把MakeFile里面的kill -9 那段话都删掉
触发界面的方法就会看到log信息了如果发现没有成功, 点击方法没有输出log检查一下几点1.hook的函数是否正确2.hook的类是否写正确3.如果还不行 ,就去文件系统/Library/MobileSubstrate/DynamicLibraries中找到 之前便携过的dylid删掉
联系客服