ios命令开发环境

1.写测试代码。

#include<stdlib.h>
#include<stdio.h>
int main(int argc,char*  argv[]){
    printf("testios\n");
        return 1;
}

2.编译。
xcrun -sdk iphoneos clang -arch arm64 main.c -o testhook
3.签名我这里直接用自己的(做逆向时不要用自己的防被吊销)
file testhook
$testhook: Mach-O 64-bit executable arm64
4.查找证书。

haidragondeMacBook-Air:~ haidragon$ file testhook 
testhook: Mach-O 64-bit executable arm64
haidragondeMacBook-Air:~ haidragon$ security find-identity -v -p codesigning
  1) 3EBAD7EE1C26691217CF3D1E4485E6C44D15E52A "xxxxxxxxxxxxxxxxx"
  2) E6EBDA70B2F2FD24AC69657B4ACE009E17C66BFB "xxxxxxxxxxxxxxxxx"
     2 valid identities found
haidragondeMacBook-Air:~ haidragon$ codesign --force --verify --verbose --sign  "xxxxxxxxxxxxxxxxx" ./testhook 

ios命令开发环境

5.端口转发。
iproxy 4567 22
发到手机上 ssh -p 4567 [email protected]
修改成777 运行。

iPhone:/var root# chmod 777 ./testhook 
iPhone:/var root# ./testhook 
testios
iPhone:/var root# 

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...