Hook初探,先写一个程序(02hooklsk/Hook),运行到越狱手机上,由于没有加密,不用砸壳。然后用theos 创建hook项目,便携式hook程序,用make package &install命令安装到手机上
项目代码:http://git.oschina.net/lishangkai/reverseproject
在终端运行命令创建Tweak工程
cd /Users/shangkai/JOB/reverseproject/02Hooklsk
/opt/theos/bin/nic.pl
之后选择11,只需要写项目名称,其他不写也行
Project Name (required):
thoes :make package &install命令
localhost:hookdemo shangkai$ make package
>Making all for tweak HOOKDemo…
==>Preprocessing Tweak.xm…
==>Compiling Tweak.xm (armv7)…
==>Linking tweak HOOKDemo (armv7)…
==>Preprocessing Tweak.xm…
==>Compiling Tweak.xm (arm64)…
==>Linking tweak HOOKDemo (arm64)…
==>Merging tweak HOOKDemo…
==>Signing HOOKDemo…
>Making stage for tweak HOOKDemo…
dpkg-deb:building package 'com.yourcompany.hookdemo' in './packages/com.yourcompany.hookdemo_0.0.1-1+debug_iphoneos-arm.deb'.
localhost:hookdemo shangkai$ make install
==>Installing…
root@192.168.1.47's password:
(Reading database ... 1323 files and directories currently installed.)
Preparing to unpack /tmp/_theos_install.deb ...
Unpacking com.yourcompany.hookdemo (0.0.1-1+debug) ...
Setting up com.yourcompany.hookdemo (0.0.1-1+debug) ...
install.exec "killall -9 SpringBoard"
root@192.168.1.47's password:
随后hook简书,按照前人的文章。虽然没有成功,但是在前人的基础上,先上传了自己的半成品 04hookjianshu,现在不太会,今后再改吧
待续
网友评论