越狱简单,不写,越狱后,进行一些运行时操作。
项目代码:http://git.oschina.net/lishangkai/reverseproject
这是一些用到的软件或语言:
Openssh:连接手机(在cydia中搜索下载即可)
iproxy:修改映射
Cycript:一款脚本语言,是混合了objective-c与javascript语法的一个工具,让开发者在命令行下和应用交互,在运行时查看和修改应用
手机cydia搜索即可安装
电脑安装教程
一些命令:
ssh 登录
ssh root@192.168.x.x
密码alpine
ssh root@iPhone ip 终端卡住,啥反应都没有。解决办法如下
1、卸载open ssh
2、添加源: http://cydia.ichitaso.com/,cydia中搜索Dropbear并安装(已经失效,请查找其他dropbear安装方法参考)
3、重新安装open ssh
然后重试ssh root@iPhone ip,就可以了
要是还不行,参考这篇文章(//www.greatytc.com/p/91e0c22a6ea7),我是用这个办法连上的:
USB连接:先安装brew($ ruby -e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)")
再安装usbmuxd,$ brew install usbmuxd
再键入$ iproxy 2222 22
waiting for connection
(不要关闭这个终端)
新建终端,$ssh -p 2222 root@localhost
Cycript
lishangkaide-iPhone:~ root# cycript -p SpringBoard
cy# UIApp
cy# alert =[[UIAlertView alloc]initWithTitle:'di yi ge ni xiang' message:'di y ci lai ni xiang' delegate: nil cancelButtonTitle:'OK' otherButtonTitles:nil]
#">"
cy#[alert show]
cy#[#0x17ea7980 show]
cy# var shot =[SBScreenShotter sharedInstance]
#""
cy#[shot saveScreenshot:YES]
cy# UIApp
#""
cy# #0x16d3ff00.keyWindow#";layer = >"
cy# sb = #0x16fde9f0
#";layer = >"
cy# sb.alpha = 0.5
0.5
cy# sb.hidden = YES
true
cy# sb.hidden = NO
false
cy# sb.backgroundColor =[UIColor redColor]
lishangkaide-iPhone4:~ root#ps aux查看进程
lishangkaide-iPhone4:~ root#ps -e
lishangkaide-iPhone4:~ root# cycript -p 1288
cy# UIApp
cy# #0x16575230.keyWindow
#";layer = >"
cy# #0x16575230.keyWindow.rootViewController
#""
cy# #0x165f8770.visibleViewControllew
#""
cy# #0x16584ce0.view
#">"
cy# view = #0x16555f60
#">"
cy# *view
{isa:UIView,_layer:#"",_gestureInfo:null,_gestureRecognizers:null,_subviewCache:@[#">",#">",#">",#">"],_charge:0,_tag:0,_viewDelegate:#"",_backgroundColorSystemColorName:@"orangeColor",_countOfMotionEffectsInSubtree:0,_viewFlags:@error,_retainCount:6,_tintAdjustmentDimmingCount:0,_shouldArchiveUIAppearanceTags:0,_interactionTintColor:null,_layoutEngine:null,_boundsWidthVariable:null,_boundsHeightVariable:null,_minXVariable:null,_minYVariable:null,_internalConstraints:null,_constraintsExceptingSubviewAutoresizingConstraints:null}
cy# view0 = #0x16555de0
#">"
cy# label0 = #0x16555c40
#">"
cy# label1 = #0x16555000
#">"
cy# view1 = #0x16554e70
#">"
cy# view1.backgroundColor =[UIColor redColor];
#"UIDeviceRGBColorSpace 1 0 0 1"
cy#[view frame]
{0:{0:0,1:0},1:{0:320,1:480}}
cy#[view setFrame:{0:{0:55,1:75},1:{0:250,1:90}}]
cy# label1.text
@"20"
cy# label1.text = 'haha'
"haha"
详情请参考百度云